A photo manager for VRChat.

add close to tray toggle

phaz.uk 1a3ed9d8 41a53b65

verified
Changed files
+38 -4
src
Components
src-tauri
+5 -1
changelog
··· 101 - Removed account login stuff 102 - Fixed app name on windows 103 - Update styles 104 - - Fixed filters removing photos without metadata
··· 101 - Removed account login stuff 102 - Fixed app name on windows 103 - Update styles 104 + - Fixed filters removing photos without metadata 105 + 106 + v0.2.6: 107 + - Fixed photos not being loaded if they're too low resolution 108 + - Added close to tray toggle
+1 -1
src-tauri/Cargo.lock
··· 4 5 [[package]] 6 name = "VRChatPhotoManager" 7 - version = "0.2.5" 8 dependencies = [ 9 "arboard", 10 "dirs 5.0.1",
··· 4 5 [[package]] 6 name = "VRChatPhotoManager" 7 + version = "0.2.6" 8 dependencies = [ 9 "arboard", 10 "dirs 5.0.1",
+1 -1
src-tauri/Cargo.toml
··· 1 [package] 2 name = "VRChatPhotoManager" 3 - version = "0.2.5" 4 description = "VRChat Photo Manager" 5 authors = ["_phaz"] 6 edition = "2021"
··· 1 [package] 2 name = "VRChatPhotoManager" 3 + version = "0.2.6" 4 description = "VRChat Photo Manager" 5 authors = ["_phaz"] 6 edition = "2021"
+2
src-tauri/src/frontend_calls/config.rs
··· 17 path 18 } 19 20 #[tauri::command] 21 pub fn set_config_value_string(key: String, value: String) { 22 let path = get_config_path();
··· 17 path 18 } 19 20 + 21 + // TODO: Redo all of this just, stop please. 22 #[tauri::command] 23 pub fn set_config_value_string(key: String, value: String) { 24 let path = get_config_path();
+2
src-tauri/src/frontend_calls/load_photos.rs
··· 11 size: usize, 12 } 13 14 #[tauri::command] 15 pub fn load_photos(window: tauri::Window, cache: State<Cache> ) { 16 let base_dir = cache.get("photo-path".into()).unwrap();
··· 11 size: usize, 12 } 13 14 + // TODO: Multi-layer photos 15 + 16 #[tauri::command] 17 pub fn load_photos(window: tauri::Window, cache: State<Cache> ) { 18 let base_dir = cache.get("photo-path".into()).unwrap();
+6 -1
src-tauri/src/main.rs
··· 18 use tauri::{ Emitter, Manager, State, WindowEvent }; 19 use tauri_plugin_deep_link::DeepLinkExt; 20 21 // TODO: Linux support 22 23 fn main() { ··· 154 util::handle_uri_proto::handle_uri_proto(req, res, cache); 155 }) 156 .on_window_event(|window, event| match event { 157 - WindowEvent::CloseRequested { api, .. } => { 158 window.hide().unwrap(); 159 api.prevent_close(); 160 }
··· 18 use tauri::{ Emitter, Manager, State, WindowEvent }; 19 use tauri_plugin_deep_link::DeepLinkExt; 20 21 + use crate::frontend_calls::config::get_config_value_string; 22 + 23 // TODO: Linux support 24 25 fn main() { ··· 156 util::handle_uri_proto::handle_uri_proto(req, res, cache); 157 }) 158 .on_window_event(|window, event| match event { 159 + WindowEvent::CloseRequested { api, .. } => { 160 + let val = get_config_value_string("minimise-on-close".into()); 161 + if val.is_some() && val.unwrap() == "false"{ return; } 162 + 163 window.hide().unwrap(); 164 api.prevent_close(); 165 }
+21
src/Components/SettingsMenu.tsx
··· 272 </label> 273 </div> 274 275 <br /> 276 <p> 277 VRChat Photo Path:
··· 272 </label> 273 </div> 274 275 + <div class="selector"> 276 + <input type="checkbox" id="minimise-on-close-check" ref={async ( el ) => { 277 + el.checked = await invoke('get_config_value_string', { key: 'minimise-on-close' }) === "false" ? false : true; 278 + }} onChange={( el ) => { 279 + if(el.target.checked){ 280 + invoke('set_config_value_string', { key: 'minimise-on-close', value: 'true' }); 281 + } else{ 282 + invoke('set_config_value_string', { key: 'minimise-on-close', value: 'false' }); 283 + } 284 + }} /> 285 + Close to tray 286 + 287 + <label for="minimise-on-close-check"> 288 + <div class="selection-box"> 289 + <div class="icon-small" style={{ margin: '0', display: 'inline-flex' }}> 290 + <img draggable="false" width="10" height="10" src="/icon/check-solid.svg"></img> 291 + </div> 292 + </div> 293 + </label> 294 + </div> 295 + 296 <br /> 297 <p> 298 VRChat Photo Path: