mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-10 23:36:14 -05:00
Updated theme setting copy in AdminX
refs. https://github.com/TryGhost/Team/issues/3432
This commit is contained in:
parent
b80b90229f
commit
58f51a1838
4 changed files with 4 additions and 18 deletions
|
@ -25,6 +25,7 @@ const Sidebar: React.FC = () => {
|
||||||
</SettingNavSection>
|
</SettingNavSection>
|
||||||
|
|
||||||
<SettingNavSection title="Site">
|
<SettingNavSection title="Site">
|
||||||
|
<SettingNavItem navid='theme' title="Theme" onClick={handleSectionClick} />
|
||||||
<SettingNavItem navid='branding-and-design' title="Branding and design" onClick={handleSectionClick} />
|
<SettingNavItem navid='branding-and-design' title="Branding and design" onClick={handleSectionClick} />
|
||||||
<SettingNavItem navid='navigation' title="Navigation" onClick={handleSectionClick} />
|
<SettingNavItem navid='navigation' title="Navigation" onClick={handleSectionClick} />
|
||||||
</SettingNavSection>
|
</SettingNavSection>
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
import BrandSettings, {BrandSettingValues} from './designAndBranding/BrandSettings';
|
import BrandSettings, {BrandSettingValues} from './designAndBranding/BrandSettings';
|
||||||
import ChangeThemeModal from './designAndBranding/ChangeThemeModal';
|
|
||||||
import ConfirmationModal from '../../../admin-x-ds/global/ConfirmationModal';
|
import ConfirmationModal from '../../../admin-x-ds/global/ConfirmationModal';
|
||||||
import NiceModal, {useModal} from '@ebay/nice-modal-react';
|
import NiceModal, {useModal} from '@ebay/nice-modal-react';
|
||||||
import React, {useContext, useEffect, useState} from 'react';
|
import React, {useContext, useEffect, useState} from 'react';
|
||||||
import StickyFooter from '../../../admin-x-ds/global/StickyFooter';
|
|
||||||
import TabView, {Tab} from '../../../admin-x-ds/global/TabView';
|
import TabView, {Tab} from '../../../admin-x-ds/global/TabView';
|
||||||
import ThemePreview from './designAndBranding/ThemePreview';
|
import ThemePreview from './designAndBranding/ThemePreview';
|
||||||
import ThemeSettings from './designAndBranding/ThemeSettings';
|
import ThemeSettings from './designAndBranding/ThemeSettings';
|
||||||
|
@ -20,14 +18,12 @@ const Sidebar: React.FC<{
|
||||||
themeSettingSections: Array<{id: string, title: string, settings: CustomThemeSetting[]}>
|
themeSettingSections: Array<{id: string, title: string, settings: CustomThemeSetting[]}>
|
||||||
updateThemeSetting: (updated: CustomThemeSetting) => void
|
updateThemeSetting: (updated: CustomThemeSetting) => void
|
||||||
onTabChange: (id: string) => void
|
onTabChange: (id: string) => void
|
||||||
onChangeTheme: () => void
|
|
||||||
}> = ({
|
}> = ({
|
||||||
brandSettings,
|
brandSettings,
|
||||||
updateBrandSetting,
|
updateBrandSetting,
|
||||||
themeSettingSections,
|
themeSettingSections,
|
||||||
updateThemeSetting,
|
updateThemeSetting,
|
||||||
onTabChange,
|
onTabChange
|
||||||
onChangeTheme
|
|
||||||
}) => {
|
}) => {
|
||||||
const tabs: Tab[] = [
|
const tabs: Tab[] = [
|
||||||
{
|
{
|
||||||
|
@ -47,12 +43,6 @@ const Sidebar: React.FC<{
|
||||||
<div className='p-7'>
|
<div className='p-7'>
|
||||||
<TabView tabs={tabs} onTabChange={onTabChange} />
|
<TabView tabs={tabs} onTabChange={onTabChange} />
|
||||||
</div>
|
</div>
|
||||||
<StickyFooter>
|
|
||||||
<button className='m m-3 flex w-full cursor-pointer flex-col rounded p-4 transition-all hover:bg-grey-100' type='button' onClick={onChangeTheme}>
|
|
||||||
<strong>Change theme</strong>
|
|
||||||
<span className='text-sm text-grey-600'>Casper</span>
|
|
||||||
</button>
|
|
||||||
</StickyFooter>
|
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -165,10 +155,6 @@ const DesignModal: React.FC = () => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const showThemeModal = () => {
|
|
||||||
NiceModal.show(ChangeThemeModal);
|
|
||||||
};
|
|
||||||
|
|
||||||
let selectedTabURL = getHomepageUrl(siteData!);
|
let selectedTabURL = getHomepageUrl(siteData!);
|
||||||
switch (selectedPreviewTab) {
|
switch (selectedPreviewTab) {
|
||||||
case 'homepage':
|
case 'homepage':
|
||||||
|
@ -197,7 +183,6 @@ const DesignModal: React.FC = () => {
|
||||||
themeSettingSections={themeSettingSections}
|
themeSettingSections={themeSettingSections}
|
||||||
updateBrandSetting={updateBrandSetting}
|
updateBrandSetting={updateBrandSetting}
|
||||||
updateThemeSetting={updateThemeSetting}
|
updateThemeSetting={updateThemeSetting}
|
||||||
onChangeTheme={showThemeModal}
|
|
||||||
onTabChange={onTabChange}
|
onTabChange={onTabChange}
|
||||||
/>;
|
/>;
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@ const DesignSetting: React.FC = () => {
|
||||||
return (
|
return (
|
||||||
<SettingGroup
|
<SettingGroup
|
||||||
customButtons={<Button color='green' label='Customize' link onClick={openPreviewModal}/>}
|
customButtons={<Button color='green' label='Customize' link onClick={openPreviewModal}/>}
|
||||||
description="Customize your site and manage themes"
|
description="Customize the look and feel of your site"
|
||||||
navid='branding-and-design'
|
navid='branding-and-design'
|
||||||
testId='design'
|
testId='design'
|
||||||
title="Branding and design"
|
title="Branding and design"
|
||||||
|
|
|
@ -7,8 +7,8 @@ const SiteSettings: React.FC = () => {
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<SettingSection title="Site">
|
<SettingSection title="Site">
|
||||||
<DesignSetting />
|
|
||||||
<Theme />
|
<Theme />
|
||||||
|
<DesignSetting />
|
||||||
</SettingSection>
|
</SettingSection>
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
|
|
Loading…
Add table
Reference in a new issue