A photo manager for VRChat.

0.2.1 push

Changed files
+31 -6
src
src-tauri
+5 -1
changelog
··· 43 43 - Fixed photos with legacy naming scheme not loading 44 44 45 45 Hotfix 2: 46 - - Added --background flag to always start in background 46 + - Added --background flag to always start in background 47 + 48 + v0.2.1: 49 + - Fixed app using GPU while minimised, might use a tiny bit, but should be much better than before 50 + - Fixed a load a bugs todo with
+1 -1
src-tauri/Cargo.lock
··· 4892 4892 4893 4893 [[package]] 4894 4894 name = "vrcpm-rs" 4895 - version = "0.2.0-hot2" 4895 + version = "0.2.1" 4896 4896 dependencies = [ 4897 4897 "dirs", 4898 4898 "fast_image_resize",
+1 -1
src-tauri/Cargo.toml
··· 1 1 [package] 2 2 name = "vrcpm-rs" 3 - version = "0.2.0-hot2" 3 + version = "0.2.1" 4 4 description = "VRChat Photo Manager" 5 5 authors = ["_phaz"] 6 6 edition = "2021"
+1
src-tauri/src/main.rs
··· 62 62 // Listen for file updates, store each update in an mpsc channel and send to the frontend 63 63 let (sender, receiver) = std::sync::mpsc::channel(); 64 64 let mut watcher = notify::recommended_watcher(move | res: Result<notify::Event, notify::Error> | { 65 + // TODO: Fix this, why does it not work?? 65 66 match res { 66 67 Ok(event) => { 67 68 match event.kind{
+10 -1
src-tauri/src/util/setup_traymenu.rs
··· 1 - use tauri::{ menu::{ MenuBuilder, MenuItemBuilder }, tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent}, AppHandle, Manager }; 1 + use tauri::{ menu::{ MenuBuilder, MenuItemBuilder }, tray::{MouseButton, MouseButtonState, TrayIconBuilder, TrayIconEvent}, AppHandle, Manager, Emitter }; 2 + 3 + #[derive(serde::Serialize, Clone)] 4 + struct EmptyEvent{} 2 5 3 6 pub fn setup_traymenu( handle: &AppHandle ){ 4 7 // Setup the tray icon and menu buttons ··· 29 32 30 33 if window.is_visible().unwrap() { 31 34 window.hide().unwrap(); 35 + 36 + window.emit("hide-window", EmptyEvent {}).unwrap(); 32 37 } else { 33 38 window.show().unwrap(); 34 39 window.set_focus().unwrap(); 40 + 41 + window.emit("show-window", EmptyEvent {}).unwrap(); 35 42 } 36 43 } 37 44 _ => {} ··· 47 54 48 55 window.show().unwrap(); 49 56 window.set_focus().unwrap(); 57 + 58 + window.emit("show-window", EmptyEvent {}).unwrap(); 50 59 } 51 60 }) 52 61 .build(handle)
+2 -2
src/Components/NavBar.tsx
··· 1 1 import { invoke } from '@tauri-apps/api/core'; 2 - import { listen } from '@tauri-apps/api/event'; 2 + import { emit, listen } from '@tauri-apps/api/event'; 3 3 import { fetch } from "@tauri-apps/plugin-http"; 4 4 import { getCurrentWebviewWindow } from '@tauri-apps/api/webviewWindow'; 5 5 import anime from 'animejs'; ··· 140 140 <div class="light" onClick={() => appWindow.toggleMaximize()}> 141 141 <img draggable="false" src="/icon/square-regular.svg"></img> 142 142 </div> 143 - <div class="light" onClick={() => appWindow.hide()}> 143 + <div class="light" onClick={() => { appWindow.hide(); emit('hide-window'); } }> 144 144 <img draggable="false" src="/icon/x-solid.svg"></img> 145 145 </div> 146 146 </div>
+11
src/Components/PhotoList.tsx
··· 367 367 ctxBG.drawImage(photoContainer, 0, 0); 368 368 } 369 369 370 + listen('hide-window', () => { 371 + quitRender = true; 372 + }) 373 + 374 + listen('show-window', () => { 375 + requestAnimationFrame(render); 376 + }) 377 + 370 378 listen('photo_meta_loaded', ( event: any ) => { 371 379 let data: PhotoMetadata = event.payload; 372 380 ··· 386 394 387 395 photo.metaLoaded = true; 388 396 photo.onMetaLoaded(); 397 + 398 + reloadFilters(); 389 399 390 400 if(amountLoaded === photos.length && !hasFirstLoaded){ 391 401 filteredPhotos = photos; ··· 427 437 428 438 listen('photo_remove', ( event: any ) => { 429 439 photos = photos.filter(x => x.path !== event.payload); 440 + filteredPhotos = filteredPhotos.filter(x => x.path !== event.payload); 430 441 431 442 if(event.payload === props.currentPhotoView().path){ 432 443 currentPhotoIndex = -1;