@@ -10,9 +10,9 @@ use scap::{capturer::Capturer, frame::Frame};
1010use std:: path:: PathBuf ;
1111use tauri:: { AppHandle , Manager , WebviewUrl , WebviewWindowBuilder } ;
1212use tauri_plugin_global_shortcut;
13+ use tauri_plugin_global_shortcut:: ShortcutState ;
1314use tauri_plugin_store:: StoreBuilder ;
1415use tokio:: sync:: Mutex ;
15- use tauri_plugin_global_shortcut:: ShortcutState ;
1616
1717#[ cfg( target_os = "macos" ) ]
1818use tauri:: ActivationPolicy ;
@@ -83,9 +83,9 @@ fn main() {
8383 . as_bool ( )
8484 . unwrap ( ) ;
8585
86- // If this is the first run, show onboarding screen
86+ // If this is the first run, show welcome screen
8787 if first_run || !scap:: has_permission ( ) {
88- open_onboarding ( app_handle) ;
88+ open_welcome_window ( app_handle) ;
8989 store. insert ( "first_run" . to_string ( ) , false . into ( ) ) . unwrap ( ) ;
9090 store. save ( ) . expect ( "Failed to save store" )
9191 }
@@ -109,20 +109,20 @@ fn main() {
109109 . expect ( "error while running Helmer Micro" ) ;
110110}
111111
112- fn open_onboarding ( app_handle : & AppHandle ) {
113- match app_handle. get_webview_window ( "onboarding " ) {
112+ fn open_welcome_window ( app_handle : & AppHandle ) {
113+ match app_handle. get_webview_window ( "welcome " ) {
114114 Some ( window) => {
115115 if window. is_visible ( ) . unwrap ( ) {
116116 window. set_focus ( ) . unwrap ( ) ;
117117 }
118118 }
119- None => create_onboarding_win ( app_handle) ,
119+ None => create_welcome_win ( app_handle) ,
120120 }
121121}
122122
123- fn create_onboarding_win ( app_handle : & AppHandle ) {
124- let mut onboarding_win =
125- WebviewWindowBuilder :: new ( app_handle, "onboarding " , WebviewUrl :: App ( "/" . into ( ) ) )
123+ fn create_welcome_win ( app_handle : & AppHandle ) {
124+ let mut welcome_win =
125+ WebviewWindowBuilder :: new ( app_handle, "welcome " , WebviewUrl :: App ( "/" . into ( ) ) )
126126 . accept_first_mouse ( true )
127127 . inner_size ( 600.0 , 580.0 )
128128 . title ( "Helmer Micro" )
@@ -131,7 +131,7 @@ fn create_onboarding_win(app_handle: &AppHandle) {
131131 . center ( ) ;
132132 #[ cfg( target_os = "macos" ) ]
133133 {
134- onboarding_win = onboarding_win . title_bar_style ( tauri:: TitleBarStyle :: Overlay ) ;
134+ welcome_win = welcome_win . title_bar_style ( tauri:: TitleBarStyle :: Overlay ) ;
135135 }
136- onboarding_win . build ( ) . expect ( "Failed to open onboarding " ) ;
136+ welcome_win . build ( ) . expect ( "Failed to open welcome window " ) ;
137137}
0 commit comments