-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: pretty borders on win10/win11 (#41)
* feat: add pretty borders to win10/11/macos * limit feature to win only * nicer icons, better cross-system behavior * small css fix * use iife for backward compat * better app init state
- Loading branch information
Showing
11 changed files
with
164 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,59 +1,46 @@ | ||
use tauri::AppHandle; | ||
|
||
use crate::WindowInitUtils; | ||
|
||
pub fn handle_exit_menu_click() { | ||
std::process::exit(0); | ||
} | ||
|
||
pub fn handle_about_menu_click(app: &AppHandle) { | ||
match tauri::WindowBuilder::new(app, "main", tauri::WindowUrl::App("index.html".into())) | ||
.always_on_top(true) | ||
.initialization_script( | ||
r#" | ||
tauri::WindowBuilder::new(app, "main", tauri::WindowUrl::App("index.html".into())) | ||
.init_trayasen( | ||
"Trayasen - About/Options", | ||
"Error while trying to open about window", | ||
Some( | ||
r#" | ||
history.replaceState({}, '','/about'); | ||
"#, | ||
) | ||
.title("Trayasen - About/Options") | ||
.build() | ||
{ | ||
Ok(_) => {} | ||
Err(_) => { | ||
println!("Error while trying to open about window"); | ||
} | ||
} | ||
), | ||
); | ||
} | ||
|
||
pub fn handle_new_position_menu_click(app: &AppHandle) { | ||
match tauri::WindowBuilder::new(app, "main", tauri::WindowUrl::App("index.html".into())) | ||
.always_on_top(true) | ||
.initialization_script( | ||
r#" | ||
tauri::WindowBuilder::new(app, "main", tauri::WindowUrl::App("index.html".into())) | ||
.init_trayasen( | ||
"Trayasen - Add position", | ||
"Error while trying to open new postition window", | ||
Some( | ||
r#" | ||
history.replaceState({}, '','/new-position'); | ||
"#, | ||
) | ||
.title("Trayasen - Add position") | ||
.build() | ||
{ | ||
Ok(_) => {} | ||
Err(_) => { | ||
println!("Error while trying to open new postition window"); | ||
} | ||
} | ||
), | ||
); | ||
} | ||
|
||
pub fn handle_manage_positions_menu_click(app: &AppHandle) { | ||
match tauri::WindowBuilder::new(app, "main", tauri::WindowUrl::App("index.html".into())) | ||
.always_on_top(true) | ||
.initialization_script( | ||
r#" | ||
tauri::WindowBuilder::new(app, "main", tauri::WindowUrl::App("index.html".into())) | ||
.init_trayasen( | ||
"Trayasen - Manage positions", | ||
"Error while trying to open manage positions window", | ||
Some( | ||
r#" | ||
history.replaceState({}, '','/manage-positions'); | ||
"#, | ||
) | ||
.title("Trayasen - Manage positions") | ||
.build() | ||
{ | ||
Ok(_) => {} | ||
Err(_) => { | ||
println!("Error while trying to open manage positions window"); | ||
} | ||
} | ||
), | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters