Add page titles (affects browser Tab, History, etc.)
## Issue
- While changing the "Back" behavior in the Settings Page PR, it was a pain to troubleshoot when the entire history list is listed as "odysee.com".
- If you have multiple tabs open, it's hard to know which is which for non-claim and non-channel pages.
## Approach
Initially, I thought of overriding the document's title through the `<Page>` component, since the titles are usually defined there. However, given that the router is already doing the overriding, I think it's best to do the same thing all in one place.
Downside: it might get missed when a new page is added.
## Unknown
- Not sure if are rules for titles. There seems to be a mix of sites -- some have specific titles per page, most just use the site title for each page.
- I think the `return` statement in the `useEffect` is unnecessary, since it'll just be setting to the same value now during the cleanup stage. (??)
2021-08-25 16:26:53 +02:00
|
|
|
// Customer-facing title for a page.
|
|
|
|
//
|
|
|
|
// Primarily used for the browser tab and history title.
|
2021-09-30 08:36:27 +02:00
|
|
|
// Ensure new strings are added to 'app-string.json' for localization.
|
Add page titles (affects browser Tab, History, etc.)
## Issue
- While changing the "Back" behavior in the Settings Page PR, it was a pain to troubleshoot when the entire history list is listed as "odysee.com".
- If you have multiple tabs open, it's hard to know which is which for non-claim and non-channel pages.
## Approach
Initially, I thought of overriding the document's title through the `<Page>` component, since the titles are usually defined there. However, given that the router is already doing the overriding, I think it's best to do the same thing all in one place.
Downside: it might get missed when a new page is added.
## Unknown
- Not sure if are rules for titles. There seems to be a mix of sites -- some have specific titles per page, most just use the site title for each page.
- I think the `return` statement in the `useEffect` is unnecessary, since it'll just be setting to the same value now during the cleanup stage. (??)
2021-08-25 16:26:53 +02:00
|
|
|
|
|
|
|
import * as PAGES from 'constants/pages';
|
|
|
|
|
|
|
|
export const PAGE_TITLE = {
|
|
|
|
// --- Categories ---
|
2022-04-29 09:57:23 +02:00
|
|
|
// Dynamically populated in 'window.CATEGORY_PAGE_TITLE'.
|
Add page titles (affects browser Tab, History, etc.)
## Issue
- While changing the "Back" behavior in the Settings Page PR, it was a pain to troubleshoot when the entire history list is listed as "odysee.com".
- If you have multiple tabs open, it's hard to know which is which for non-claim and non-channel pages.
## Approach
Initially, I thought of overriding the document's title through the `<Page>` component, since the titles are usually defined there. However, given that the router is already doing the overriding, I think it's best to do the same thing all in one place.
Downside: it might get missed when a new page is added.
## Unknown
- Not sure if are rules for titles. There seems to be a mix of sites -- some have specific titles per page, most just use the site title for each page.
- I think the `return` statement in the `useEffect` is unnecessary, since it'll just be setting to the same value now during the cleanup stage. (??)
2021-08-25 16:26:53 +02:00
|
|
|
|
|
|
|
// --- Everything else in alphabetical order ---
|
|
|
|
[PAGES.BUY]: 'Buy or Swap',
|
|
|
|
[PAGES.CHANNELS]: 'Your channels',
|
|
|
|
[PAGES.CHANNELS_FOLLOWING]: 'Following',
|
|
|
|
[PAGES.CHANNELS_FOLLOWING_DISCOVER]: 'Discover Channels',
|
|
|
|
[PAGES.CHANNEL_NEW]: 'Create a channel',
|
|
|
|
[PAGES.CHECKOUT]: 'Checkout',
|
|
|
|
[PAGES.CODE_2257]: '2257',
|
|
|
|
[PAGES.CREATOR_DASHBOARD]: 'Creator Analytics',
|
2022-03-17 10:00:03 +01:00
|
|
|
[PAGES.FYP]: 'Recommended Videos (Alpha)',
|
Add page titles (affects browser Tab, History, etc.)
## Issue
- While changing the "Back" behavior in the Settings Page PR, it was a pain to troubleshoot when the entire history list is listed as "odysee.com".
- If you have multiple tabs open, it's hard to know which is which for non-claim and non-channel pages.
## Approach
Initially, I thought of overriding the document's title through the `<Page>` component, since the titles are usually defined there. However, given that the router is already doing the overriding, I think it's best to do the same thing all in one place.
Downside: it might get missed when a new page is added.
## Unknown
- Not sure if are rules for titles. There seems to be a mix of sites -- some have specific titles per page, most just use the site title for each page.
- I think the `return` statement in the `useEffect` is unnecessary, since it'll just be setting to the same value now during the cleanup stage. (??)
2021-08-25 16:26:53 +02:00
|
|
|
[PAGES.HELP]: 'Help',
|
|
|
|
[PAGES.INVITE]: 'Invite',
|
2022-04-07 18:10:39 +02:00
|
|
|
[PAGES.LIBRARY]: 'Purchases',
|
Add page titles (affects browser Tab, History, etc.)
## Issue
- While changing the "Back" behavior in the Settings Page PR, it was a pain to troubleshoot when the entire history list is listed as "odysee.com".
- If you have multiple tabs open, it's hard to know which is which for non-claim and non-channel pages.
## Approach
Initially, I thought of overriding the document's title through the `<Page>` component, since the titles are usually defined there. However, given that the router is already doing the overriding, I think it's best to do the same thing all in one place.
Downside: it might get missed when a new page is added.
## Unknown
- Not sure if are rules for titles. There seems to be a mix of sites -- some have specific titles per page, most just use the site title for each page.
- I think the `return` statement in the `useEffect` is unnecessary, since it'll just be setting to the same value now during the cleanup stage. (??)
2021-08-25 16:26:53 +02:00
|
|
|
[PAGES.LISTS]: 'Lists',
|
|
|
|
[PAGES.LIVESTREAM]: 'Go Live on Odysee',
|
|
|
|
[PAGES.LIVESTREAM_CURRENT]: 'Live (Experimental)',
|
|
|
|
[PAGES.NOTIFICATIONS]: 'Notifications',
|
2022-03-17 10:00:03 +01:00
|
|
|
[PAGES.ODYSEE_MEMBERSHIP]: 'Odysee Premium',
|
2022-07-11 16:12:37 +02:00
|
|
|
[PAGES.POST]: 'Post an Article on Odysee',
|
2022-03-17 10:00:03 +01:00
|
|
|
[PAGES.PRIVACY_POLICY]: 'Privacy Policy',
|
Add page titles (affects browser Tab, History, etc.)
## Issue
- While changing the "Back" behavior in the Settings Page PR, it was a pain to troubleshoot when the entire history list is listed as "odysee.com".
- If you have multiple tabs open, it's hard to know which is which for non-claim and non-channel pages.
## Approach
Initially, I thought of overriding the document's title through the `<Page>` component, since the titles are usually defined there. However, given that the router is already doing the overriding, I think it's best to do the same thing all in one place.
Downside: it might get missed when a new page is added.
## Unknown
- Not sure if are rules for titles. There seems to be a mix of sites -- some have specific titles per page, most just use the site title for each page.
- I think the `return` statement in the `useEffect` is unnecessary, since it'll just be setting to the same value now during the cleanup stage. (??)
2021-08-25 16:26:53 +02:00
|
|
|
[PAGES.RECEIVE]: 'Your address',
|
|
|
|
[PAGES.REPORT]: 'Report an issue or request a feature',
|
|
|
|
[PAGES.REPORT_CONTENT]: 'Report content',
|
2022-05-03 13:57:39 +02:00
|
|
|
[PAGES.REPOST_NEW]: 'Repost',
|
Add page titles (affects browser Tab, History, etc.)
## Issue
- While changing the "Back" behavior in the Settings Page PR, it was a pain to troubleshoot when the entire history list is listed as "odysee.com".
- If you have multiple tabs open, it's hard to know which is which for non-claim and non-channel pages.
## Approach
Initially, I thought of overriding the document's title through the `<Page>` component, since the titles are usually defined there. However, given that the router is already doing the overriding, I think it's best to do the same thing all in one place.
Downside: it might get missed when a new page is added.
## Unknown
- Not sure if are rules for titles. There seems to be a mix of sites -- some have specific titles per page, most just use the site title for each page.
- I think the `return` statement in the `useEffect` is unnecessary, since it'll just be setting to the same value now during the cleanup stage. (??)
2021-08-25 16:26:53 +02:00
|
|
|
[PAGES.REWARDS]: 'Rewards',
|
|
|
|
[PAGES.REWARDS_VERIFY]: 'Verify to earn Credits',
|
|
|
|
[PAGES.SEARCH]: 'Search',
|
|
|
|
[PAGES.SEND]: 'Send Credits',
|
|
|
|
[PAGES.SETTINGS]: 'Settings',
|
2022-02-07 19:15:22 +01:00
|
|
|
[PAGES.SETTINGS_BLOCKED_MUTED]: 'Blocked and muted channels',
|
Add page titles (affects browser Tab, History, etc.)
## Issue
- While changing the "Back" behavior in the Settings Page PR, it was a pain to troubleshoot when the entire history list is listed as "odysee.com".
- If you have multiple tabs open, it's hard to know which is which for non-claim and non-channel pages.
## Approach
Initially, I thought of overriding the document's title through the `<Page>` component, since the titles are usually defined there. However, given that the router is already doing the overriding, I think it's best to do the same thing all in one place.
Downside: it might get missed when a new page is added.
## Unknown
- Not sure if are rules for titles. There seems to be a mix of sites -- some have specific titles per page, most just use the site title for each page.
- I think the `return` statement in the `useEffect` is unnecessary, since it'll just be setting to the same value now during the cleanup stage. (??)
2021-08-25 16:26:53 +02:00
|
|
|
[PAGES.SETTINGS_CREATOR]: 'Creator settings',
|
|
|
|
[PAGES.SETTINGS_NOTIFICATIONS]: 'Manage notifications',
|
2022-03-17 10:00:03 +01:00
|
|
|
[PAGES.SETTINGS_OWN_COMMENTS]: 'Your comments',
|
2021-09-30 08:36:27 +02:00
|
|
|
[PAGES.SETTINGS_STRIPE_ACCOUNT]: 'Bank Accounts',
|
|
|
|
[PAGES.SETTINGS_STRIPE_CARD]: 'Payment Methods',
|
Add page titles (affects browser Tab, History, etc.)
## Issue
- While changing the "Back" behavior in the Settings Page PR, it was a pain to troubleshoot when the entire history list is listed as "odysee.com".
- If you have multiple tabs open, it's hard to know which is which for non-claim and non-channel pages.
## Approach
Initially, I thought of overriding the document's title through the `<Page>` component, since the titles are usually defined there. However, given that the router is already doing the overriding, I think it's best to do the same thing all in one place.
Downside: it might get missed when a new page is added.
## Unknown
- Not sure if are rules for titles. There seems to be a mix of sites -- some have specific titles per page, most just use the site title for each page.
- I think the `return` statement in the `useEffect` is unnecessary, since it'll just be setting to the same value now during the cleanup stage. (??)
2021-08-25 16:26:53 +02:00
|
|
|
[PAGES.SETTINGS_UPDATE_PWD]: 'Update password',
|
|
|
|
[PAGES.SWAP]: 'Swap Credits',
|
|
|
|
[PAGES.TAGS_FOLLOWING]: 'Tags',
|
|
|
|
[PAGES.TAGS_FOLLOWING_MANAGE]: 'Manage tags',
|
2022-03-17 10:00:03 +01:00
|
|
|
[PAGES.TOS]: 'Terms of Service',
|
Add page titles (affects browser Tab, History, etc.)
## Issue
- While changing the "Back" behavior in the Settings Page PR, it was a pain to troubleshoot when the entire history list is listed as "odysee.com".
- If you have multiple tabs open, it's hard to know which is which for non-claim and non-channel pages.
## Approach
Initially, I thought of overriding the document's title through the `<Page>` component, since the titles are usually defined there. However, given that the router is already doing the overriding, I think it's best to do the same thing all in one place.
Downside: it might get missed when a new page is added.
## Unknown
- Not sure if are rules for titles. There seems to be a mix of sites -- some have specific titles per page, most just use the site title for each page.
- I think the `return` statement in the `useEffect` is unnecessary, since it'll just be setting to the same value now during the cleanup stage. (??)
2021-08-25 16:26:53 +02:00
|
|
|
[PAGES.UPLOADS]: 'Your uploads',
|
2022-07-11 16:12:37 +02:00
|
|
|
[PAGES.UPLOAD]: 'Upload a File to Odysee',
|
Add page titles (affects browser Tab, History, etc.)
## Issue
- While changing the "Back" behavior in the Settings Page PR, it was a pain to troubleshoot when the entire history list is listed as "odysee.com".
- If you have multiple tabs open, it's hard to know which is which for non-claim and non-channel pages.
## Approach
Initially, I thought of overriding the document's title through the `<Page>` component, since the titles are usually defined there. However, given that the router is already doing the overriding, I think it's best to do the same thing all in one place.
Downside: it might get missed when a new page is added.
## Unknown
- Not sure if are rules for titles. There seems to be a mix of sites -- some have specific titles per page, most just use the site title for each page.
- I think the `return` statement in the `useEffect` is unnecessary, since it'll just be setting to the same value now during the cleanup stage. (??)
2021-08-25 16:26:53 +02:00
|
|
|
[PAGES.WALLET]: 'Wallet',
|
2021-09-30 08:36:27 +02:00
|
|
|
[PAGES.YOUTUBE_SYNC]: 'YouTube Sync',
|
2022-03-17 10:00:03 +01:00
|
|
|
[PAGES.YOUTUBE_TOS]: 'YouTube Sync Terms of Service',
|
Add page titles (affects browser Tab, History, etc.)
## Issue
- While changing the "Back" behavior in the Settings Page PR, it was a pain to troubleshoot when the entire history list is listed as "odysee.com".
- If you have multiple tabs open, it's hard to know which is which for non-claim and non-channel pages.
## Approach
Initially, I thought of overriding the document's title through the `<Page>` component, since the titles are usually defined there. However, given that the router is already doing the overriding, I think it's best to do the same thing all in one place.
Downside: it might get missed when a new page is added.
## Unknown
- Not sure if are rules for titles. There seems to be a mix of sites -- some have specific titles per page, most just use the site title for each page.
- I think the `return` statement in the `useEffect` is unnecessary, since it'll just be setting to the same value now during the cleanup stage. (??)
2021-08-25 16:26:53 +02:00
|
|
|
};
|