diff --git a/build/darwin/Info.dev.plist b/build/darwin/Info.dev.plist
index be2cf98..3aa4484 100644
--- a/build/darwin/Info.dev.plist
+++ b/build/darwin/Info.dev.plist
@@ -6,7 +6,7 @@
CFBundleName
Voidraft
CFBundleExecutable
-
+ Voidraft
CFBundleIdentifier
landaiqing
CFBundleVersion
diff --git a/build/darwin/Info.plist b/build/darwin/Info.plist
index 3949775..dbd1a34 100644
--- a/build/darwin/Info.plist
+++ b/build/darwin/Info.plist
@@ -6,7 +6,7 @@
CFBundleName
Voidraft
CFBundleExecutable
-
+ Voidraft
CFBundleIdentifier
landaiqing
CFBundleVersion
diff --git a/build/linux/nfpm/nfpm.yaml b/build/linux/nfpm/nfpm.yaml
index c4f67ea..8499836 100644
--- a/build/linux/nfpm/nfpm.yaml
+++ b/build/linux/nfpm/nfpm.yaml
@@ -3,7 +3,7 @@
#
# The lines below are called `modelines`. See `:help modeline`
-name: ""
+name: "Voidraft"
arch: ${GOARCH}
platform: "linux"
version: "0.0.1.0"
@@ -17,12 +17,12 @@ license: "MIT"
release: "1"
contents:
- - src: "./bin/"
- dst: "/usr/local/bin/"
+ - src: "./bin/Voidraft"
+ dst: "/usr/local/bin/Voidraft"
- src: "./build/appicon.png"
- dst: "/usr/share/icons/hicolor/128x128/apps/.png"
- - src: "./build/linux/.desktop"
- dst: "/usr/share/applications/.desktop"
+ dst: "/usr/share/icons/hicolor/128x128/apps/Voidraft.png"
+ - src: "./build/linux/Voidraft.desktop"
+ dst: "/usr/share/applications/Voidraft.desktop"
depends:
- gtk3
diff --git a/build/windows/nsis/wails_tools.nsh b/build/windows/nsis/wails_tools.nsh
index 9cb55db..b69c1a4 100644
--- a/build/windows/nsis/wails_tools.nsh
+++ b/build/windows/nsis/wails_tools.nsh
@@ -5,7 +5,7 @@
!include "FileFunc.nsh"
!ifndef INFO_PROJECTNAME
- !define INFO_PROJECTNAME ""
+ !define INFO_PROJECTNAME "Voidraft"
!endif
!ifndef INFO_COMPANYNAME
!define INFO_COMPANYNAME "Voidraft"
diff --git a/frontend/src/App.vue b/frontend/src/App.vue
index 5c2c6c4..67c8b75 100644
--- a/frontend/src/App.vue
+++ b/frontend/src/App.vue
@@ -3,11 +3,13 @@ import { onMounted } from 'vue';
import { useConfigStore } from '@/stores/configStore';
import { useSystemStore } from '@/stores/systemStore';
import { useKeybindingStore } from '@/stores/keybindingStore';
+import { useThemeStore } from '@/stores/themeStore';
import WindowTitleBar from '@/components/titlebar/WindowTitleBar.vue';
const configStore = useConfigStore();
const systemStore = useSystemStore();
const keybindingStore = useKeybindingStore();
+const themeStore = useThemeStore();
// 应用启动时加载配置和初始化系统信息
onMounted(async () => {
@@ -18,7 +20,9 @@ onMounted(async () => {
keybindingStore.loadKeyBindings(),
]);
+ // 初始化语言和主题
await configStore.initializeLanguage();
+ themeStore.initializeTheme();
});
diff --git a/frontend/src/stores/configStore.ts b/frontend/src/stores/configStore.ts
index 0004b10..6f4b1e4 100644
--- a/frontend/src/stores/configStore.ts
+++ b/frontend/src/stores/configStore.ts
@@ -141,7 +141,7 @@ const DEFAULT_CONFIG: AppConfig = {
},
appearance: {
language: LanguageType.LangZhCN,
- systemTheme: SystemThemeType.SystemThemeDark
+ systemTheme: SystemThemeType.SystemThemeAuto
},
updates: {},
metadata: {
diff --git a/frontend/src/stores/editorStore.ts b/frontend/src/stores/editorStore.ts
index ab44690..44d6bd6 100644
--- a/frontend/src/stores/editorStore.ts
+++ b/frontend/src/stores/editorStore.ts
@@ -130,7 +130,7 @@ export const useEditorStore = defineStore('editor', () => {
// 获取主题扩展
const themeExtension = createThemeExtension(
- configStore.config.appearance.systemTheme || SystemThemeType.SystemThemeDark
+ configStore.config.appearance.systemTheme || SystemThemeType.SystemThemeAuto
);
// 获取Tab相关扩展
diff --git a/frontend/src/stores/themeStore.ts b/frontend/src/stores/themeStore.ts
index cbd27e9..218ed65 100644
--- a/frontend/src/stores/themeStore.ts
+++ b/frontend/src/stores/themeStore.ts
@@ -23,6 +23,12 @@ export const useThemeStore = defineStore('theme', () => {
);
};
+ // 初始化主题
+ const initializeTheme = () => {
+ const theme = configStore.config?.appearance?.systemTheme || SystemThemeType.SystemThemeAuto;
+ applyThemeToDOM(theme);
+ };
+
// 设置主题
const setTheme = async (theme: SystemThemeType) => {
await configStore.setSystemTheme(theme);
@@ -32,5 +38,7 @@ export const useThemeStore = defineStore('theme', () => {
return {
currentTheme,
setTheme,
+ initializeTheme,
+ applyThemeToDOM,
};
});
\ No newline at end of file