diff --git a/README.md b/README.md index 685a7508..e26aec7a 100644 --- a/README.md +++ b/README.md @@ -48,7 +48,7 @@ #### Windows 应用 -参见 [Release Electron v3](https://github.com/InfSein/hqhelper-dawntrail/releases/tag/electron.v3) +参见 [Release Electron v4](https://github.com/InfSein/hqhelper-dawntrail/releases/tag/electron.v4) #### iOS 应用 diff --git a/docs/README.en.md b/docs/README.en.md index 15f77bfc..3f7d8071 100644 --- a/docs/README.en.md +++ b/docs/README.en.md @@ -44,7 +44,7 @@ We may provide various types of applications, but it is difficult to guarantee t #### Windows APP -See [Release Electron v3](https://github.com/InfSein/hqhelper-dawntrail/releases/tag/electron.v3) +See [Release Electron v4](https://github.com/InfSein/hqhelper-dawntrail/releases/tag/electron.v4) #### iOS APP diff --git a/docs/README.ja.md b/docs/README.ja.md index 2f609d61..b418f1ac 100644 --- a/docs/README.ja.md +++ b/docs/README.ja.md @@ -45,7 +45,7 @@ #### Windows アプリ - [Release Electron v3](https://github.com/InfSein/hqhelper-dawntrail/releases/tag/electron.v3) をご覧ください。 + [Release Electron v4](https://github.com/InfSein/hqhelper-dawntrail/releases/tag/electron.v4) をご覧ください。 #### iOS アプリ diff --git a/env.electron.d.ts b/env.electron.d.ts index 7ec49ac2..d5a34ddf 100644 --- a/env.electron.d.ts +++ b/env.electron.d.ts @@ -14,6 +14,7 @@ export interface ElectronAPI { onUpdateProgress: (callback: (progressData: ProgressData) => void) => void; openUrlByBrowser: (url: string) => void; copyText: (text: string) => Promise; + createNewWindow: (id: string, url: string, defaultWidth: number, defaultHeight: number) => void; } export interface ProgressData { diff --git a/package-lock.json b/package-lock.json index 54d0d907..dfa83c5a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "hqhelper-dawntrail", - "version": "2.0.8", + "version": "2.0.9", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "hqhelper-dawntrail", - "version": "2.0.8", + "version": "2.0.9", "hasInstallScript": true, "dependencies": { "@voerkai18n/runtime": "^2.1.8", diff --git a/package.json b/package.json index 00838499..fdbe2bcb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hqhelper-dawntrail", - "version": "2.0.8", + "version": "2.0.9", "private": true, "type": "module", "scripts": { diff --git a/public/version.json b/public/version.json index 7ab283e3..361de748 100644 --- a/public/version.json +++ b/public/version.json @@ -1,4 +1,4 @@ { - "hqhelper": "2.0.8", + "hqhelper": "2.0.9", "electron": "v4" } diff --git a/src/App.vue b/src/App.vue index c6dbae87..e3560c5a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -6,8 +6,9 @@ import { computed, provide, ref, getCurrentInstance, onMounted } from 'vue' import { darkTheme, lightTheme, useOsTheme, zhCN, enUS, jaJP, dateZhCN, dateEnUS, dateJaJP, - NConfigProvider, NMessageProvider, - NLayout, NLayoutHeader, NLayoutContent + NConfigProvider, NGlobalStyle, NMessageProvider, + NLayout, NLayoutHeader, NLayoutContent, + type GlobalThemeOverrides } from 'naive-ui' // * import pages and components @@ -216,6 +217,27 @@ onMounted(async () => { } } }) + +const naiveUIThemeOverrides = computed(() : GlobalThemeOverrides => { + let fontFamily = 'Lato, -apple-system, Helvetica Neue, Segoe UI, Microsoft Yahei, 微软雅黑, Arial, Helvetica, sans-serif' + if (userConfig.value.custom_font) { + fontFamily = userConfig.value.custom_font + ', ' + fontFamily + } + fontFamily = 'FFXIV, ' + fontFamily + const fontSize = userConfig.value.custom_font_size || '14px' + return { + common: { + fontFamily, + fontSize, + fontSizeMedium: fontSize, + fontSizeSmall: fontSize, + fontSizeTiny: `calc(${fontSize} - 2px)`, + fontSizeMini: `calc(${fontSize} - 1px)`, + fontSizeLarge: `calc(${fontSize} + 1px)`, + fontSizeHuge: `calc(${fontSize} + 2px)` + } + } +})