update ui
This commit is contained in:
1 parent
aafe0c8533
commit
d499edabbc
5 files changed
+388
-243
No files matched your search
+1
-1
@@ -12,7 +12,7 @@
|
||||
: matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light';
|
||||
document.documentElement.dataset.theme = theme;
|
||||
document.documentElement.style.colorScheme = theme;
|
||||
document.documentElement.style.backgroundColor = theme === 'dark' ? '#101419' : '#faf9f5';
|
||||
document.documentElement.style.backgroundColor = theme === 'dark' ? '#0b1220' : '#f4f7fb';
|
||||
} catch {
|
||||
// The app applies the theme again during initialization.
|
||||
}
|
||||
|
||||
@@ -74,8 +74,8 @@ const LEGACY_GUI_CONFIG_FILE: &str = "cpa-gui.yaml";
|
||||
const MIN_MAIN_WINDOW_WIDTH: u32 = 640;
|
||||
const MIN_MAIN_WINDOW_HEIGHT: u32 = 600;
|
||||
const MAX_SAVED_WINDOW_DIMENSION: u32 = 16_384;
|
||||
const DEFAULT_MAIN_WINDOW_WIDTH: u32 = 1551;
|
||||
const DEFAULT_MAIN_WINDOW_HEIGHT: u32 = 893;
|
||||
const DEFAULT_MAIN_WINDOW_WIDTH: u32 = 1531;
|
||||
const DEFAULT_MAIN_WINDOW_HEIGHT: u32 = 891;
|
||||
const OAUTH_DIR_NAME: &str = "oauth";
|
||||
const DEFAULT_AUTH_DIR: &str = "../oauth";
|
||||
const DEFAULT_API_KEY: &str = "123456";
|
||||
@@ -13935,8 +13935,8 @@ mod tests {
|
||||
assert!(content.contains("port = 8317"));
|
||||
assert!(content.contains("allow-lan = false"));
|
||||
assert!(content.contains("run-on-startup = false"));
|
||||
assert!(content.contains("window-width = 1551"));
|
||||
assert!(content.contains("window-height = 893"));
|
||||
assert!(content.contains("window-width = 1531"));
|
||||
assert!(content.contains("window-height = 891"));
|
||||
assert!(content.contains("auth-dir = \"../oauth\""));
|
||||
assert!(content.contains("[[api-keys]]"));
|
||||
assert!(content.contains("key = \"123456\""));
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
{
|
||||
"label": "main",
|
||||
"title": "EasyCLIProxyAPI",
|
||||
"width": 1551,
|
||||
"height": 893,
|
||||
"width": 1531,
|
||||
"height": 891,
|
||||
"minWidth": 640,
|
||||
"minHeight": 600
|
||||
}
|
||||
|
||||
+379
-234
File diff suppressed because it is too large.
Load diff
+2
-2
@@ -5,8 +5,8 @@ export type AppTheme = 'light' | 'dark';
|
||||
|
||||
const STORAGE_KEY = 'easy-cli-proxy-api.theme';
|
||||
const WINDOW_BACKGROUND: Record<AppTheme, string> = {
|
||||
light: '#faf9f5',
|
||||
dark: '#101419',
|
||||
light: '#f4f7fb',
|
||||
dark: '#0b1220',
|
||||
};
|
||||
|
||||
async function applyNativeTheme(theme: AppTheme): Promise<void> {
|
||||
|
||||
Reference in new issue
Block a user