From 6d5c32ba2e98da7eefdb037a772e2227d762ffd2 Mon Sep 17 00:00:00 2001 From: infinite-persistence Date: Thu, 19 Aug 2021 15:10:04 +0800 Subject: [PATCH] Help string style cleanup for consistency. Changed from constants to object. This allows us to skip prettier's auto line-breaking with just one comment (instead of for each constant), plus I like object style to group things together in general. --- ui/component/settingContent/view.jsx | 31 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/ui/component/settingContent/view.jsx b/ui/component/settingContent/view.jsx index 42c2dbd17..ccb9d92d3 100644 --- a/ui/component/settingContent/view.jsx +++ b/ui/component/settingContent/view.jsx @@ -61,7 +61,7 @@ export default function SettingContent(props: Props) { isBodyList body={ <> - + - + - + */} - + {/* @if TARGET='app' */} - + {/* @endif */} @@ -186,7 +186,7 @@ export default function SettingContent(props: Props) { name="instant_purchases" checked={instantPurchaseEnabled} label={__('Only confirm purchases or tips over a certain amount')} - helper={__(HELP_ONLY_CONFIRM_OVER_AMOUNT)} + helper={__(HELP.ONLY_CONFIRM_OVER_AMOUNT)} onChange={() => setClientSetting(SETTINGS.INSTANT_PURCHASE_ENABLED, true)} /> {instantPurchaseEnabled && ( @@ -205,13 +205,12 @@ export default function SettingContent(props: Props) { ); } -const HELP_FLOATING_PLAYER = 'Keep content playing in the corner when navigating to a different page.'; -const HELP_AUTOPLAY = - 'Autoplay video and audio files when navigating to a file, as well as the next related item when a file finishes playing.'; -const HELP_HIDE_REPOSTS = 'You will not see reposts by people you follow or receive email notifying about them.'; -const HELP_SHOW_MATURE = - 'Mature content may include nudity, intense sexuality, profanity, or other adult content. By displaying mature content, you are affirming you are of legal age to view mature content in your country or jurisdiction. '; -const HELP_MAX_PURCHASE_PRICE = - 'This will prevent you from purchasing any content over a certain cost, as a safety measure.'; -const HELP_ONLY_CONFIRM_OVER_AMOUNT = ''; // feel redundant. Disable for now. -// const HELP_ONLY_CONFIRM_OVER_AMOUNT = "When this option is chosen, LBRY won't ask you to confirm purchases or tips below your chosen amount."; +// prettier-ignore +const HELP = { + FLOATING_PLAYER: 'Keep content playing in the corner when navigating to a different page.', + AUTOPLAY: 'Autoplay video and audio files when navigating to a file, as well as the next related item when a file finishes playing.', + HIDE_REPOSTS: 'You will not see reposts by people you follow or receive email notifying about them.', + SHOW_MATURE: 'Mature content may include nudity, intense sexuality, profanity, or other adult content. By displaying mature content, you are affirming you are of legal age to view mature content in your country or jurisdiction. ', + MAX_PURCHASE_PRICE: 'This will prevent you from purchasing any content over a certain cost, as a safety measure.', + ONLY_CONFIRM_OVER_AMOUNT: '', // [feel redundant. Disable for now] "When this option is chosen, LBRY won't ask you to confirm purchases or tips below your chosen amount.", +};