Edit diff --git a/frontend/src/vite-env.d.ts b/frontend/src/vite-env.d.ts index fc81239..b99f3b9 100644 --- a/frontend/src/vite-env.d.ts +++ b/frontend/src/vite-env.d.ts @@ -5,3 +5,16 @@ declare module "*.vue" { const component: DefineComponent<{}, {}, any>; export default component; } + +namespace app { + declare type Config = { + ColorTheme: string; + DisplayLanguage: string; + LogPath: string; + Web: { + DirCerts: string; + PortHttp: string; + PortHttps: string; + }; + }; +} diff --git a/main.go b/main.go index 2fa5af4..697125a 100644 --- a/main.go +++ b/main.go @@ -4,6 +4,7 @@ import ( "embed" "my-app/backend/app" "my-app/backend/pkg/utils" + "my-app/backend/service" "github.com/wailsapp/wails/v2" "github.com/wailsapp/wails/v2/pkg/logger" @@ -45,8 +46,10 @@ func main() { OnDomReady: wlc.domReady, OnShutdown: wlc.shutdown, OnBeforeClose: wlc.beforeClose, - Bind: []interface{}{}, - WindowStartState: options.Normal, + Bind: []interface{}{ + service.Settings(), + }, + WindowStartState: options.Normal, Windows: &windows.Options{ WebviewIsTransparent: true, WindowIsTranslucent: false,