diff --git a/frontend/components.d.ts b/frontend/components.d.ts index 386399d..db92b48 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -17,6 +17,7 @@ declare module 'vue' { DriverFormComponent: typeof import('./src/components/DriverFormComponent.vue')['default'] DriverInspectModal: typeof import('./src/components/DriverInspectModal.vue')['default'] DriverSelector: typeof import('./src/components/DriverSelector.vue')['default'] + HardwareInfo: typeof import('./src/components/HardwareInfo.vue')['default'] LoadingOverlay: typeof import('./src/components/LoadingOverlay.vue')['default'] MatchRuleFormComponent: typeof import('./src/components/MatchRuleFormComponent.vue')['default'] MatchRuleInputModal: typeof import('./src/components/MatchRuleInputModal.vue')['default'] diff --git a/frontend/src/App.vue b/frontend/src/App.vue index 96b5575..3e54f37 100644 --- a/frontend/src/App.vue +++ b/frontend/src/App.vue @@ -4,7 +4,7 @@ import * as appSettingStorage from '@/wailsjs/go/storage/AppSettingStorage' import * as driverGroupStorage from '@/wailsjs/go/storage/DriverGroupStorage' import * as ruleSetStorage from '@/wailsjs/go/storage/RuleSetStorage' import { CheckForUpdates } from '@/wailsjs/go/update/Updater' -import { ref } from 'vue' +import { ref, watch } from 'vue' import { useI18n } from 'vue-i18n' import type { RouteLocationRaw } from 'vue-router' @@ -21,6 +21,14 @@ const [settingsStore, groupStore, matchStore, unsavedFormStore] = [ const initilisating = ref(true) +watch( + () => settingsStore.settings.ui_scale, + scale => { + document.documentElement.style.fontSize = `${Number(scale) || 100}%` + }, + { immediate: true } +) + const hasUpdate = ref(false) Promise.all([ diff --git a/frontend/src/components/HardwareInfo.vue b/frontend/src/components/HardwareInfo.vue new file mode 100644 index 0000000..4740bd1 --- /dev/null +++ b/frontend/src/components/HardwareInfo.vue @@ -0,0 +1,77 @@ + + + diff --git a/frontend/src/i18n/en.json b/frontend/src/i18n/en.json index a8496fc..3217de2 100644 --- a/frontend/src/i18n/en.json +++ b/frontend/src/i18n/en.json @@ -190,6 +190,7 @@ "settingSuccessAction": "On Completion", "settingSuccessActionDelay": "Success Action Delay", "settingTask": "Task", + "settingTextScale": "Text Size", "statusAborted": "aborted", "statusAborting": "aborting", "statusCompleted": "completed", @@ -229,6 +230,7 @@ "titleImportExport": "Import/Export", "titleImportPreview": "Import Preview", "titleInspectGroup": "Inspect Option", + "titleLargeView": "Hardware Summary", "titleMatchRule": "Match Rule", "titleSettings": "Settings", "titleSetupTools": "Setup Tools", diff --git a/frontend/src/i18n/zh_Hant_HK.json b/frontend/src/i18n/zh_Hant_HK.json index 68dd3a9..e0d70e7 100644 --- a/frontend/src/i18n/zh_Hant_HK.json +++ b/frontend/src/i18n/zh_Hant_HK.json @@ -190,6 +190,7 @@ "settingSuccessAction": "關機設定", "settingSuccessActionDelay": "關機選項延遲", "settingTask": "額外工作", + "settingTextScale": "介面文字大小", "statusAborted": "已取消", "statusAborting": "取消中", "statusCompleted": "完成", @@ -229,6 +230,7 @@ "titleImportExport": "匯入/匯出資料", "titleImportPreview": "匯入預覽", "titleInspectGroup": "檢視選項", + "titleLargeView": "硬體摘要", "titleMatchRule": "配對規則", "titleSettings": "設定", "titleSetupTools": "系統工具", diff --git a/frontend/src/pages/index.vue b/frontend/src/pages/index.vue index f698fef..85d9d04 100644 --- a/frontend/src/pages/index.vue +++ b/frontend/src/pages/index.vue @@ -1,5 +1,6 @@