mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 05:37:34 +03:00
Moved Recommendations settings under Membership section
refs https://github.com/TryGhost/Product/issues/3787
This commit is contained in:
parent
875fe939a5
commit
d04c077be5
@ -2,6 +2,7 @@ import Access from './Access';
|
||||
import Analytics from './Analytics';
|
||||
import Portal from './Portal';
|
||||
import React from 'react';
|
||||
import Recommendations from '../site/Recommendations';
|
||||
import SettingSection from '../../../admin-x-ds/settings/SettingSection';
|
||||
import Tiers from './Tiers';
|
||||
import TipsOrDonations from './TipsOrDonations';
|
||||
@ -12,11 +13,13 @@ const searchKeywords = {
|
||||
access: ['default', 'access', 'subscription', 'post', 'membership'],
|
||||
tiers: ['tiers', 'payment', 'paid'],
|
||||
tips: ['tip', 'donation', 'one time', 'payment'],
|
||||
analytics: ['analytics', 'tracking', 'privacy', 'membership']
|
||||
analytics: ['analytics', 'tracking', 'privacy', 'membership'],
|
||||
recommendations: ['recommendation', 'recommend', 'blogroll']
|
||||
};
|
||||
|
||||
const MembershipSettings: React.FC = () => {
|
||||
const hasTipsAndDonations = useFeatureFlag('tipsAndDonations');
|
||||
const hasRecommendations = useFeatureFlag('recommendations');
|
||||
|
||||
return (
|
||||
<SettingSection keywords={Object.values(searchKeywords).flat()} title='Membership'>
|
||||
@ -25,6 +28,7 @@ const MembershipSettings: React.FC = () => {
|
||||
<Tiers keywords={searchKeywords.tiers} />
|
||||
{hasTipsAndDonations && <TipsOrDonations keywords={searchKeywords.tips} />}
|
||||
<Analytics keywords={searchKeywords.analytics} />
|
||||
{hasRecommendations && <Recommendations keywords={searchKeywords.recommendations} />}
|
||||
</SettingSection>
|
||||
);
|
||||
};
|
||||
|
@ -1,27 +1,22 @@
|
||||
import DesignSetting from './DesignSetting';
|
||||
import Navigation from './Navigation';
|
||||
import React from 'react';
|
||||
import Recommendations from './Recommendations';
|
||||
import SettingSection from '../../../admin-x-ds/settings/SettingSection';
|
||||
import useFeatureFlag from '../../../hooks/useFeatureFlag';
|
||||
// import Theme from './Theme';
|
||||
|
||||
const searchKeywords = {
|
||||
theme: ['themes', 'design', 'appearance', 'style'],
|
||||
design: ['design', 'branding', 'logo', 'cover', 'colors', 'fonts', 'background'],
|
||||
navigation: ['navigation', 'menus', 'primary', 'secondary', 'links'],
|
||||
recommendations: ['recommendation', 'recommend', 'blog roll', 'recommending']
|
||||
navigation: ['navigation', 'menus', 'primary', 'secondary', 'links']
|
||||
};
|
||||
|
||||
const SiteSettings: React.FC = () => {
|
||||
const hasRecommendations = useFeatureFlag('recommendations');
|
||||
return (
|
||||
<>
|
||||
<SettingSection keywords={Object.values(searchKeywords).flat()} title="Site">
|
||||
{/* <Theme keywords={searchKeywords.theme} /> */}
|
||||
<DesignSetting keywords={searchKeywords.design} />
|
||||
<Navigation keywords={searchKeywords.navigation} />
|
||||
{hasRecommendations && <Recommendations keywords={searchKeywords.recommendations} />}
|
||||
</SettingSection>
|
||||
</>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user