generated from nhcarrigan/template
feat: add compact mode for minimal widget interface (#36)
Add a compact mode that shrinks the window to a small widget showing just the character sprite, recent messages, and a quick input box. Perfect for quick questions while working without the full UI. - Add CompactMode.svelte component with minimal widget interface - Add compact mode toggle in StatusBar (Ctrl+Shift+M shortcut) - Save/restore window size when toggling compact mode - Handle display scaling by converting physical to logical pixels - Add compact_mode to config (Rust + TypeScript) - Add required Tauri window permissions for resize operations
This commit is contained in:
@@ -19,6 +19,9 @@
|
||||
"core:tray:default",
|
||||
"fs:default",
|
||||
"fs:allow-read-text-file",
|
||||
"fs:allow-write-text-file"
|
||||
"fs:allow-write-text-file",
|
||||
"core:window:allow-set-size",
|
||||
"core:window:allow-set-always-on-top",
|
||||
"core:window:allow-inner-size"
|
||||
]
|
||||
}
|
||||
|
||||
@@ -79,6 +79,9 @@ pub struct HikariConfig {
|
||||
|
||||
#[serde(default)]
|
||||
pub streamer_hide_paths: bool,
|
||||
|
||||
#[serde(default)]
|
||||
pub compact_mode: bool,
|
||||
}
|
||||
|
||||
impl Default for HikariConfig {
|
||||
@@ -101,6 +104,7 @@ impl Default for HikariConfig {
|
||||
minimize_to_tray: false,
|
||||
streamer_mode: false,
|
||||
streamer_hide_paths: false,
|
||||
compact_mode: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -157,6 +161,7 @@ mod tests {
|
||||
assert!(!config.minimize_to_tray);
|
||||
assert!(!config.streamer_mode);
|
||||
assert!(!config.streamer_hide_paths);
|
||||
assert!(!config.compact_mode);
|
||||
}
|
||||
|
||||
#[test]
|
||||
@@ -177,6 +182,9 @@ mod tests {
|
||||
character_panel_width: Some(400),
|
||||
font_size: 16,
|
||||
minimize_to_tray: true,
|
||||
streamer_mode: false,
|
||||
streamer_hide_paths: false,
|
||||
compact_mode: false,
|
||||
};
|
||||
|
||||
let json = serde_json::to_string(&config).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user