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