diff --git a/web/src/app/SettingsDialog.vue b/web/src/app/SettingsDialog.vue index b332eea..919e3f6 100644 --- a/web/src/app/SettingsDialog.vue +++ b/web/src/app/SettingsDialog.vue @@ -6,7 +6,7 @@ import Icon, { type IconName } from './Icon.vue' import AppearanceSettings from './AppearanceSettings.vue' import PluginsPanel from './PluginsPanel.vue' import { installApp, installPrompt } from './pwa' -import { CONTENT_WIDTHS, FONT_SIZES, TAB_SIZES, loadSettings, settings, updateSettings, type Settings } from './settings' +import { CONTENT_WIDTHS, TAB_SIZES, loadSettings, settings, updateSettings, type Settings } from './settings' import SharePanel from './SharePanel.vue' import TokensPanel from './TokensPanel.vue' import TrashPanel from './TrashPanel.vue' @@ -73,6 +73,17 @@ async function change(patch: Partial) { } } +function changeFont(event: Event) { + const input = event.target as HTMLInputElement + const value = input.valueAsNumber + if (!Number.isFinite(value) || value <= 0) { + toast('字号必须为正数') + input.value = String(settings.fontSize) + return + } + if (value !== settings.fontSize) void change({ fontSize: value }) +} + // ---- 修改登录密码 ---- const pw = ref({ current: '', next: '', confirm: '' }) const pwError = ref('') @@ -119,9 +130,7 @@ async function changePassword() {
字号 - +
正文宽度 diff --git a/web/src/app/Sidebar.vue b/web/src/app/Sidebar.vue index f70f5ec..2298176 100644 --- a/web/src/app/Sidebar.vue +++ b/web/src/app/Sidebar.vue @@ -54,7 +54,6 @@ function onRootDrop(e: DragEvent) {

还没有笔记

-
diff --git a/web/src/app/TabBar.vue b/web/src/app/TabBar.vue index ef3d33e..ae789de 100644 --- a/web/src/app/TabBar.vue +++ b/web/src/app/TabBar.vue @@ -1,5 +1,5 @@