feat: modify setting modal (#3008)
This commit is contained in:
@@ -17,8 +17,8 @@ export type AppSetting = {
|
|||||||
windowFrameStyle: 'frameless' | 'NativeTitleBar';
|
windowFrameStyle: 'frameless' | 'NativeTitleBar';
|
||||||
dateFormat: DateFormats;
|
dateFormat: DateFormats;
|
||||||
startWeekOnMonday: boolean;
|
startWeekOnMonday: boolean;
|
||||||
disableBlurBackground: boolean;
|
enableBlurBackground: boolean;
|
||||||
disableNoisyBackground: boolean;
|
enableNoisyBackground: boolean;
|
||||||
autoCheckUpdate: boolean;
|
autoCheckUpdate: boolean;
|
||||||
autoDownloadUpdate: boolean;
|
autoDownloadUpdate: boolean;
|
||||||
};
|
};
|
||||||
@@ -43,8 +43,8 @@ export const AppSettingAtom = atomWithStorage<AppSetting>('AFFiNE settings', {
|
|||||||
windowFrameStyle: 'frameless',
|
windowFrameStyle: 'frameless',
|
||||||
dateFormat: dateFormatOptions[0],
|
dateFormat: dateFormatOptions[0],
|
||||||
startWeekOnMonday: false,
|
startWeekOnMonday: false,
|
||||||
disableBlurBackground: false,
|
enableBlurBackground: true,
|
||||||
disableNoisyBackground: false,
|
enableNoisyBackground: true,
|
||||||
autoCheckUpdate: true,
|
autoCheckUpdate: true,
|
||||||
autoDownloadUpdate: true,
|
autoDownloadUpdate: true,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -10,8 +10,8 @@ export const AppContainer = (props: WorkspaceRootProps) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<AppContainerWithoutSettings
|
<AppContainerWithoutSettings
|
||||||
useNoisyBackground={!appSettings.disableNoisyBackground}
|
useNoisyBackground={appSettings.enableNoisyBackground}
|
||||||
useBlurBackground={!appSettings.disableBlurBackground}
|
useBlurBackground={!appSettings.enableBlurBackground}
|
||||||
{...props}
|
{...props}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ export const AboutAffine = () => {
|
|||||||
<>
|
<>
|
||||||
<SettingHeader
|
<SettingHeader
|
||||||
title={t['About AFFiNE']()}
|
title={t['About AFFiNE']()}
|
||||||
subtitle={t['None yet']()}
|
subtitle={t['Information about AFFiNE']()}
|
||||||
data-testid="about-title"
|
data-testid="about-title"
|
||||||
/>
|
/>
|
||||||
{runtimeConfig.enableNewSettingUnstableApi && environment.isDesktop ? (
|
{runtimeConfig.enableNewSettingUnstableApi && environment.isDesktop ? (
|
||||||
|
|||||||
@@ -145,24 +145,24 @@ export const AppearanceSettings = () => {
|
|||||||
{environment.isDesktop ? (
|
{environment.isDesktop ? (
|
||||||
<SettingWrapper title={t['Sidebar']()}>
|
<SettingWrapper title={t['Sidebar']()}>
|
||||||
<SettingRow
|
<SettingRow
|
||||||
name={t['Disable the noise background on the sidebar']()}
|
name={t['Noise background on the sidebar']()}
|
||||||
desc={t['None yet']()}
|
desc={t['Use background noise effect on the sidebar.']()}
|
||||||
>
|
>
|
||||||
<Switch
|
<Switch
|
||||||
checked={appSettings.disableNoisyBackground}
|
checked={appSettings.enableNoisyBackground}
|
||||||
onChange={checked =>
|
onChange={checked =>
|
||||||
changeSwitch('disableNoisyBackground', checked)
|
changeSwitch('enableNoisyBackground', checked)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</SettingRow>
|
</SettingRow>
|
||||||
<SettingRow
|
<SettingRow
|
||||||
name={t['Disable the blur sidebar']()}
|
name={t['Translucent UI on the sidebar']()}
|
||||||
desc={t['None yet']()}
|
desc={t['Use transparency effect on the sidebar.']()}
|
||||||
>
|
>
|
||||||
<Switch
|
<Switch
|
||||||
checked={!appSettings.disableBlurBackground}
|
checked={appSettings.enableBlurBackground}
|
||||||
onChange={checked =>
|
onChange={checked =>
|
||||||
changeSwitch('disableBlurBackground', !checked)
|
changeSwitch('enableBlurBackground', checked)
|
||||||
}
|
}
|
||||||
/>
|
/>
|
||||||
</SettingRow>
|
</SettingRow>
|
||||||
|
|||||||
@@ -153,7 +153,7 @@ export const RootAppSidebar = ({
|
|||||||
<>
|
<>
|
||||||
<AppSidebar
|
<AppSidebar
|
||||||
router={router}
|
router={router}
|
||||||
hasBackground={!appSettings.disableBlurBackground}
|
hasBackground={!appSettings.enableBlurBackground}
|
||||||
>
|
>
|
||||||
<SidebarContainer>
|
<SidebarContainer>
|
||||||
<NoSsr>
|
<NoSsr>
|
||||||
|
|||||||
@@ -364,8 +364,8 @@
|
|||||||
"Discover what's new": "Discover what's new",
|
"Discover what's new": "Discover what's new",
|
||||||
"Info of legal": "Info of legal",
|
"Info of legal": "Info of legal",
|
||||||
"New version is ready": "New version is ready",
|
"New version is ready": "New version is ready",
|
||||||
"Disable the noise background on the sidebar": "Disable the noise background on the sidebar",
|
"Noise background on the sidebar": "Noise background on the sidebar",
|
||||||
"Disable the blur sidebar": "Disable the blur sidebar",
|
"Translucent UI on the sidebar": "Translucent UI on the sidebar",
|
||||||
"Window frame style": "Window frame style",
|
"Window frame style": "Window frame style",
|
||||||
"Move Up": "Move Up",
|
"Move Up": "Move Up",
|
||||||
"Curve Connector": "Curve Connector",
|
"Curve Connector": "Curve Connector",
|
||||||
@@ -392,5 +392,8 @@
|
|||||||
"com.affine.export.success.title": "Exported successfully",
|
"com.affine.export.success.title": "Exported successfully",
|
||||||
"com.affine.export.success.message": "Please open the download folder to check.",
|
"com.affine.export.success.message": "Please open the download folder to check.",
|
||||||
"com.affine.export.error.title": "Export failed due to an unexpected error",
|
"com.affine.export.error.title": "Export failed due to an unexpected error",
|
||||||
"com.affine.export.error.message": "Please try it again later."
|
"com.affine.export.error.message": "Please try it again later.",
|
||||||
|
"Use background noise effect on the sidebar.": "Use background noise effect on the sidebar.",
|
||||||
|
"Use transparency effect on the sidebar.": "Use transparency effect on the sidebar.",
|
||||||
|
"Information about AFFiNE": "Information about AFFiNE"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user