mirror of
https://github.com/taigrr/wails.git
synced 2026-04-02 05:08:54 -07:00
Improved runtime.System
This commit is contained in:
@@ -51,6 +51,8 @@ export function Init() {
|
||||
IsDarkMode: Store.New('isdarkmode'),
|
||||
LogLevel: Store.New('loglevel'),
|
||||
};
|
||||
// Copy platform specific information into it
|
||||
Object.assign(window.wails.System, Platform.System);
|
||||
|
||||
// Do platform specific Init
|
||||
Platform.Init();
|
||||
|
||||
2
v2/internal/runtime/js/runtime/runtime.d.ts
vendored
2
v2/internal/runtime/js/runtime/runtime.d.ts
vendored
@@ -38,6 +38,8 @@ declare const wailsapp__runtime: {
|
||||
DarkModeEnabled(): Promise<boolean>;
|
||||
OnThemeChange(callback: (darkModeEnabled: boolean) => void): void;
|
||||
LogLevel(): Store;
|
||||
Platform: string;
|
||||
AppType: string
|
||||
};
|
||||
Store: {
|
||||
New(name: string, defaultValue?: any): Store;
|
||||
|
||||
@@ -37,4 +37,6 @@ module.exports = {
|
||||
OnThemeChange: OnThemeChange,
|
||||
DarkModeEnabled: DarkModeEnabled,
|
||||
LogLevel: window.wails.System.LogLevel,
|
||||
Platform: window.wails.System.Platform,
|
||||
AppType: window.wails.System.AppType
|
||||
};
|
||||
Reference in New Issue
Block a user