Remove hideFyp setting
This commit is contained in:
parent
5b16b3b058
commit
ec5cd10ab1
6 changed files with 8 additions and 42 deletions
|
@ -2146,9 +2146,13 @@
|
||||||
"Hide Scheduled Livestreams": "Hide Scheduled Livestreams",
|
"Hide Scheduled Livestreams": "Hide Scheduled Livestreams",
|
||||||
"You will not see scheduled livestreams by people you follow on the home or following page.": "You will not see scheduled livestreams by people you follow on the home or following page.",
|
"You will not see scheduled livestreams by people you follow on the home or following page.": "You will not see scheduled livestreams by people you follow on the home or following page.",
|
||||||
"Scheduled streams hidden, you can re-enable them in settings.": "Scheduled streams hidden, you can re-enable them in settings.",
|
"Scheduled streams hidden, you can re-enable them in settings.": "Scheduled streams hidden, you can re-enable them in settings.",
|
||||||
"Hide Personal Recommendations": "Hide Personal Recommendations",
|
"Customize Homepage": "Customize Homepage",
|
||||||
|
"Customize --[Short label for \"Customize Homepage\"]--": "Customize",
|
||||||
|
"Sort and customize your homepage": "Sort and customize your homepage",
|
||||||
"Clean as a whistle! --[title for empty homepage]--": "Clean as a whistle!",
|
"Clean as a whistle! --[title for empty homepage]--": "Clean as a whistle!",
|
||||||
"You will not see the personal recommendations in the homepage.": "You will not see the personal recommendations in the homepage.",
|
"Hidden": "Hidden",
|
||||||
|
"Premium membership required. Become a member, or %learn_more%.": "Premium membership required. Become a member, or %learn_more%.",
|
||||||
|
"No recommendations available at the moment. %learn_more%": "No recommendations available at the moment. %learn_more%",
|
||||||
"Sorry, the service is currently unavailable.": "Sorry, the service is currently unavailable.",
|
"Sorry, the service is currently unavailable.": "Sorry, the service is currently unavailable.",
|
||||||
"Started %time_date%": "Started %time_date%",
|
"Started %time_date%": "Started %time_date%",
|
||||||
"Live %time_date%": "Live %time_date%",
|
"Live %time_date%": "Live %time_date%",
|
||||||
|
@ -2158,6 +2162,7 @@
|
||||||
"Pinned": "Pinned",
|
"Pinned": "Pinned",
|
||||||
"Remove all unavailable claims": "Remove all unavailable claims",
|
"Remove all unavailable claims": "Remove all unavailable claims",
|
||||||
"Recommended For You": "Recommended For You",
|
"Recommended For You": "Recommended For You",
|
||||||
|
"Recommended": "Recommended",
|
||||||
"Recommendation removed. Thanks for the feedback!": "Recommendation removed. Thanks for the feedback!",
|
"Recommendation removed. Thanks for the feedback!": "Recommendation removed. Thanks for the feedback!",
|
||||||
"Hide Chat": "Hide Chat",
|
"Hide Chat": "Hide Chat",
|
||||||
"Popout Chat": "Popout Chat",
|
"Popout Chat": "Popout Chat",
|
||||||
|
|
|
@ -3,11 +3,9 @@ import { selectMyChannelUrls } from 'redux/selectors/claims';
|
||||||
import * as SETTINGS from 'constants/settings';
|
import * as SETTINGS from 'constants/settings';
|
||||||
import { doOpenModal } from 'redux/actions/app';
|
import { doOpenModal } from 'redux/actions/app';
|
||||||
import { doSetPlayingUri } from 'redux/actions/content';
|
import { doSetPlayingUri } from 'redux/actions/content';
|
||||||
import { doFetchPersonalRecommendations } from 'redux/actions/search';
|
|
||||||
import { doSetClientSetting } from 'redux/actions/settings';
|
import { doSetClientSetting } from 'redux/actions/settings';
|
||||||
import { selectPersonalRecommendations } from 'redux/selectors/search';
|
|
||||||
import { selectShowMatureContent, selectClientSetting } from 'redux/selectors/settings';
|
import { selectShowMatureContent, selectClientSetting } from 'redux/selectors/settings';
|
||||||
import { selectHasOdyseeMembership, selectUserVerifiedEmail } from 'redux/selectors/user';
|
import { selectUserVerifiedEmail } from 'redux/selectors/user';
|
||||||
|
|
||||||
import SettingContent from './view';
|
import SettingContent from './view';
|
||||||
|
|
||||||
|
@ -18,21 +16,17 @@ const select = (state) => ({
|
||||||
autoplayNext: selectClientSetting(state, SETTINGS.AUTOPLAY_NEXT),
|
autoplayNext: selectClientSetting(state, SETTINGS.AUTOPLAY_NEXT),
|
||||||
hideReposts: selectClientSetting(state, SETTINGS.HIDE_REPOSTS),
|
hideReposts: selectClientSetting(state, SETTINGS.HIDE_REPOSTS),
|
||||||
hideScheduledLivestreams: selectClientSetting(state, SETTINGS.HIDE_SCHEDULED_LIVESTREAMS),
|
hideScheduledLivestreams: selectClientSetting(state, SETTINGS.HIDE_SCHEDULED_LIVESTREAMS),
|
||||||
hideFyp: selectClientSetting(state, SETTINGS.HIDE_FYP),
|
|
||||||
showNsfw: selectShowMatureContent(state),
|
showNsfw: selectShowMatureContent(state),
|
||||||
myChannelUrls: selectMyChannelUrls(state),
|
myChannelUrls: selectMyChannelUrls(state),
|
||||||
instantPurchaseEnabled: selectClientSetting(state, SETTINGS.INSTANT_PURCHASE_ENABLED),
|
instantPurchaseEnabled: selectClientSetting(state, SETTINGS.INSTANT_PURCHASE_ENABLED),
|
||||||
instantPurchaseMax: selectClientSetting(state, SETTINGS.INSTANT_PURCHASE_MAX),
|
instantPurchaseMax: selectClientSetting(state, SETTINGS.INSTANT_PURCHASE_MAX),
|
||||||
enablePublishPreview: selectClientSetting(state, SETTINGS.ENABLE_PUBLISH_PREVIEW),
|
enablePublishPreview: selectClientSetting(state, SETTINGS.ENABLE_PUBLISH_PREVIEW),
|
||||||
hasMembership: selectHasOdyseeMembership(state),
|
|
||||||
personalRecommendations: selectPersonalRecommendations(state),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const perform = (dispatch) => ({
|
const perform = (dispatch) => ({
|
||||||
setClientSetting: (key, value) => dispatch(doSetClientSetting(key, value)),
|
setClientSetting: (key, value) => dispatch(doSetClientSetting(key, value)),
|
||||||
clearPlayingUri: () => dispatch(doSetPlayingUri({ uri: null })),
|
clearPlayingUri: () => dispatch(doSetPlayingUri({ uri: null })),
|
||||||
openModal: (id, params) => dispatch(doOpenModal(id, params)),
|
openModal: (id, params) => dispatch(doOpenModal(id, params)),
|
||||||
doFetchPersonalRecommendations: () => dispatch(doFetchPersonalRecommendations()),
|
|
||||||
});
|
});
|
||||||
|
|
||||||
export default connect(select, perform)(SettingContent);
|
export default connect(select, perform)(SettingContent);
|
||||||
|
|
|
@ -27,18 +27,14 @@ type Props = {
|
||||||
hideReposts: ?boolean,
|
hideReposts: ?boolean,
|
||||||
showNsfw: boolean,
|
showNsfw: boolean,
|
||||||
hideScheduledLivestreams: boolean,
|
hideScheduledLivestreams: boolean,
|
||||||
hideFyp: boolean,
|
|
||||||
myChannelUrls: ?Array<string>,
|
myChannelUrls: ?Array<string>,
|
||||||
instantPurchaseEnabled: boolean,
|
instantPurchaseEnabled: boolean,
|
||||||
instantPurchaseMax: Price,
|
instantPurchaseMax: Price,
|
||||||
enablePublishPreview: boolean,
|
enablePublishPreview: boolean,
|
||||||
hasMembership: ?boolean,
|
|
||||||
personalRecommendations: { gid: string, uris: Array<string> },
|
|
||||||
// --- perform ---
|
// --- perform ---
|
||||||
setClientSetting: (string, boolean | string | number) => void,
|
setClientSetting: (string, boolean | string | number) => void,
|
||||||
clearPlayingUri: () => void,
|
clearPlayingUri: () => void,
|
||||||
openModal: (string) => void,
|
openModal: (string) => void,
|
||||||
doFetchPersonalRecommendations: () => void,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function SettingContent(props: Props) {
|
export default function SettingContent(props: Props) {
|
||||||
|
@ -50,27 +46,15 @@ export default function SettingContent(props: Props) {
|
||||||
hideReposts,
|
hideReposts,
|
||||||
showNsfw,
|
showNsfw,
|
||||||
hideScheduledLivestreams,
|
hideScheduledLivestreams,
|
||||||
hideFyp,
|
|
||||||
myChannelUrls,
|
myChannelUrls,
|
||||||
instantPurchaseEnabled,
|
instantPurchaseEnabled,
|
||||||
instantPurchaseMax,
|
instantPurchaseMax,
|
||||||
enablePublishPreview,
|
enablePublishPreview,
|
||||||
hasMembership,
|
|
||||||
personalRecommendations,
|
|
||||||
setClientSetting,
|
setClientSetting,
|
||||||
clearPlayingUri,
|
clearPlayingUri,
|
||||||
openModal,
|
openModal,
|
||||||
doFetchPersonalRecommendations,
|
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const fypExists = personalRecommendations && personalRecommendations.uris.length > 0;
|
|
||||||
|
|
||||||
React.useEffect(() => {
|
|
||||||
if (hasMembership) {
|
|
||||||
doFetchPersonalRecommendations();
|
|
||||||
}
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<div className="card__title-section">
|
<div className="card__title-section">
|
||||||
|
@ -135,20 +119,6 @@ export default function SettingContent(props: Props) {
|
||||||
/>
|
/>
|
||||||
</SettingsRow>
|
</SettingsRow>
|
||||||
|
|
||||||
<SettingsRow
|
|
||||||
membersOnly
|
|
||||||
title={__('Hide Personal Recommendations')}
|
|
||||||
subtitle={__(HELP.HIDE_FYP)}
|
|
||||||
disabled={!hasMembership || !fypExists}
|
|
||||||
>
|
|
||||||
<FormField
|
|
||||||
type="checkbox"
|
|
||||||
name="hide_fyp"
|
|
||||||
onChange={() => setClientSetting(SETTINGS.HIDE_FYP, !hideFyp)}
|
|
||||||
checked={hideFyp}
|
|
||||||
/>
|
|
||||||
</SettingsRow>
|
|
||||||
|
|
||||||
{!SIMPLE_SITE && (
|
{!SIMPLE_SITE && (
|
||||||
<>
|
<>
|
||||||
{/*
|
{/*
|
||||||
|
|
|
@ -37,7 +37,6 @@ export const HOMEPAGE = 'homepage';
|
||||||
export const HOMEPAGE_ORDER = 'homepage_order';
|
export const HOMEPAGE_ORDER = 'homepage_order';
|
||||||
export const HIDE_REPOSTS = 'hide_reposts';
|
export const HIDE_REPOSTS = 'hide_reposts';
|
||||||
export const HIDE_SCHEDULED_LIVESTREAMS = 'hide_scheduled_livestreams';
|
export const HIDE_SCHEDULED_LIVESTREAMS = 'hide_scheduled_livestreams';
|
||||||
export const HIDE_FYP = 'hide_fyp';
|
|
||||||
export const SUPPORT_OPTION = 'support_option';
|
export const SUPPORT_OPTION = 'support_option';
|
||||||
export const TILE_LAYOUT = 'tile_layout';
|
export const TILE_LAYOUT = 'tile_layout';
|
||||||
export const VIDEO_THEATER_MODE = 'video_theater_mode';
|
export const VIDEO_THEATER_MODE = 'video_theater_mode';
|
||||||
|
|
|
@ -18,7 +18,6 @@ export const CLIENT_SYNC_KEYS = [
|
||||||
SETTINGS.SHOW_MATURE,
|
SETTINGS.SHOW_MATURE,
|
||||||
SETTINGS.HIDE_REPOSTS,
|
SETTINGS.HIDE_REPOSTS,
|
||||||
SETTINGS.HIDE_SCHEDULED_LIVESTREAMS,
|
SETTINGS.HIDE_SCHEDULED_LIVESTREAMS,
|
||||||
SETTINGS.HIDE_FYP,
|
|
||||||
SETTINGS.SHOW_ANONYMOUS,
|
SETTINGS.SHOW_ANONYMOUS,
|
||||||
SETTINGS.INSTANT_PURCHASE_ENABLED,
|
SETTINGS.INSTANT_PURCHASE_ENABLED,
|
||||||
SETTINGS.INSTANT_PURCHASE_MAX,
|
SETTINGS.INSTANT_PURCHASE_MAX,
|
||||||
|
|
|
@ -73,7 +73,6 @@ const defaultState = {
|
||||||
[SETTINGS.AUTO_DOWNLOAD]: true,
|
[SETTINGS.AUTO_DOWNLOAD]: true,
|
||||||
[SETTINGS.HIDE_REPOSTS]: false,
|
[SETTINGS.HIDE_REPOSTS]: false,
|
||||||
[SETTINGS.HIDE_SCHEDULED_LIVESTREAMS]: false,
|
[SETTINGS.HIDE_SCHEDULED_LIVESTREAMS]: false,
|
||||||
[SETTINGS.HIDE_REPOSTS]: false,
|
|
||||||
|
|
||||||
// OS
|
// OS
|
||||||
[SETTINGS.AUTO_LAUNCH]: true,
|
[SETTINGS.AUTO_LAUNCH]: true,
|
||||||
|
|
Loading…
Reference in a new issue