diff --git a/src/i18n/en-US.json b/src/i18n/en-US.json index bb44aae..5dfd59d 100644 --- a/src/i18n/en-US.json +++ b/src/i18n/en-US.json @@ -15,7 +15,9 @@ "copy": { "title": "Copy url", "success": "Copied" - } + }, + "fontIncrease": "Larger", + "fontDecrease": "Smaller" }, "form": { diff --git a/src/i18n/zh-CN.json b/src/i18n/zh-CN.json index 7f5af7d..41966df 100644 --- a/src/i18n/zh-CN.json +++ b/src/i18n/zh-CN.json @@ -15,7 +15,9 @@ "copy": { "title": "复制链接", "success": "已复制到剪贴板" - } + }, + "fontIncrease": "更大", + "fontDecrease": "更小" }, "form": { diff --git a/src/router/settings/electron-main/settings.ts b/src/router/settings/electron-main/settings.ts index 2c9aa06..a16dfa9 100644 --- a/src/router/settings/electron-main/settings.ts +++ b/src/router/settings/electron-main/settings.ts @@ -5,6 +5,6 @@ export const router = new Router({ prefix: '/settings' }) // const getTheme = () => settings.appearance === 'auto' ? 'system' : settings.appearance -router.use('get', () => settingService.get()) +router.use('get', (_, path) => settingService.get(path)) router.use('set', (_, { path, value }: { path: string, value: any }) => settingService.set(path, value)) diff --git a/src/ui/apps/reader/MainPanel/Article/Toolbar/font-decrease-button.tsx b/src/ui/apps/reader/MainPanel/Article/Toolbar/font-decrease-button.tsx new file mode 100644 index 0000000..bac5eaf --- /dev/null +++ b/src/ui/apps/reader/MainPanel/Article/Toolbar/font-decrease-button.tsx @@ -0,0 +1,17 @@ +import intl from 'react-intl-universal' +import { FontDecreaseRegular } from '@fluentui/react-icons' +import { Button } from '@/ui/apps/reader/components/toolbar' +import { store } from '@/ui/store' + +const { readerStore } = store + +export default function FontDecreaseButton() { + return ( +