feat: move plugins config to setting (#3259)

This commit is contained in:
JimmFly
2023-07-17 17:25:00 +08:00
committed by GitHub
parent d4cd0e763d
commit f21eb5f272
8 changed files with 100 additions and 63 deletions
@@ -1,5 +1,6 @@
import { useAFFiNEI18N } from '@affine/i18n/hooks';
import {
AiIcon,
AppearanceIcon,
InformationIcon,
KeyboardIcon,
@@ -8,9 +9,14 @@ import type { FC, SVGProps } from 'react';
import { AboutAffine } from './about';
import { AppearanceSettings } from './appearance';
import { Plugins } from './plugins';
import { Shortcuts } from './shortcuts';
export type GeneralSettingKeys = 'shortcuts' | 'appearance' | 'about';
export type GeneralSettingKeys =
| 'shortcuts'
| 'appearance'
| 'plugins'
| 'about';
export type GeneralSettingList = {
key: GeneralSettingKeys;
@@ -34,6 +40,12 @@ export const useGeneralSettingList = (): GeneralSettingList => {
icon: KeyboardIcon,
testId: 'shortcuts-panel-trigger',
},
{
key: 'plugins',
title: 'Plugins',
icon: AiIcon,
testId: 'plugins-panel-trigger',
},
{
key: 'about',
title: t['About AFFiNE'](),
@@ -53,6 +65,8 @@ export const GeneralSetting = ({
return <Shortcuts />;
case 'appearance':
return <AppearanceSettings />;
case 'plugins':
return <Plugins />;
case 'about':
return <AboutAffine />;
default: