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 101 - Removed account login stuff 102 102 - Fixed app name on windows 103 103 - Update styles 104 - - Fixed filters removing photos without metadata 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 4 5 5 [[package]] 6 6 name = "VRChatPhotoManager" 7 - version = "0.2.5" 7 + version = "0.2.6" 8 8 dependencies = [ 9 9 "arboard", 10 10 "dirs 5.0.1",
+1 -1
src-tauri/Cargo.toml
··· 1 1 [package] 2 2 name = "VRChatPhotoManager" 3 - version = "0.2.5" 3 + version = "0.2.6" 4 4 description = "VRChat Photo Manager" 5 5 authors = ["_phaz"] 6 6 edition = "2021"
+2
src-tauri/src/frontend_calls/config.rs
··· 17 17 path 18 18 } 19 19 20 + 21 + // TODO: Redo all of this just, stop please. 20 22 #[tauri::command] 21 23 pub fn set_config_value_string(key: String, value: String) { 22 24 let path = get_config_path();
+2
src-tauri/src/frontend_calls/load_photos.rs
··· 11 11 size: usize, 12 12 } 13 13 14 + // TODO: Multi-layer photos 15 + 14 16 #[tauri::command] 15 17 pub fn load_photos(window: tauri::Window, cache: State<Cache> ) { 16 18 let base_dir = cache.get("photo-path".into()).unwrap();
+6 -1
src-tauri/src/main.rs
··· 18 18 use tauri::{ Emitter, Manager, State, WindowEvent }; 19 19 use tauri_plugin_deep_link::DeepLinkExt; 20 20 21 + use crate::frontend_calls::config::get_config_value_string; 22 + 21 23 // TODO: Linux support 22 24 23 25 fn main() { ··· 154 156 util::handle_uri_proto::handle_uri_proto(req, res, cache); 155 157 }) 156 158 .on_window_event(|window, event| match event { 157 - WindowEvent::CloseRequested { api, .. } => { 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 + 158 163 window.hide().unwrap(); 159 164 api.prevent_close(); 160 165 }
+21
src/Components/SettingsMenu.tsx
··· 272 272 </label> 273 273 </div> 274 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 + 275 296 <br /> 276 297 <p> 277 298 VRChat Photo Path: