A photo manager for VRChat.

hjkllkjhlhkjhjklkhjl

Changed files
+14 -13
src
+1 -6
src/Components/PhotoList.tsx
··· 64 let filterType: FilterType = FilterType.USER; 65 let filter = ''; 66 67 - let os = "unknown"; 68 - (async () => { 69 - os = await invoke('get_os'); 70 - })(); 71 - 72 let filteredPhotos: Photo[] = []; 73 74 let closeWithKey = ( e: KeyboardEvent ) => { ··· 173 this.imageEl = document.createElement('img'); 174 this.imageEl.crossOrigin = 'anonymous'; 175 176 - this.imageEl.src = os === "windows" ? "http://photo.localhost/" : "photo://localhost" + photoPath + this.path + "?downscale"; 177 178 this.imageEl.onload = () => { 179 this.image!.width = this.scaledWidth!;
··· 64 let filterType: FilterType = FilterType.USER; 65 let filter = ''; 66 67 let filteredPhotos: Photo[] = []; 68 69 let closeWithKey = ( e: KeyboardEvent ) => { ··· 168 this.imageEl = document.createElement('img'); 169 this.imageEl.crossOrigin = 'anonymous'; 170 171 + this.imageEl.src = (window.OS === "windows" ? "http://photo.localhost/" : "photo://localhost") + photoPath + this.path + "?downscale"; 172 173 this.imageEl.onload = () => { 174 this.image!.width = this.scaledWidth!;
+1 -1
src/Components/PhotoViewer.tsx
··· 262 if(!photoPath) 263 photoPath = await invoke('get_user_photos_path') + '/'; 264 265 - imageViewer.src = await invoke('get_os') === "windows" ? "http://photo.localhost/" : 'photo://localhost' + (photoPath + props.currentPhotoView().path).split('\\').join('/') + "?full"; 266 imageViewer.crossOrigin = 'anonymous'; 267 })(); 268
··· 262 if(!photoPath) 263 photoPath = await invoke('get_user_photos_path') + '/'; 264 265 + imageViewer.src = (window.OS === "windows" ? "http://photo.localhost/" : 'photo://localhost') + (photoPath + props.currentPhotoView().path).split('\\').join('/') + "?full"; 266 imageViewer.crossOrigin = 'anonymous'; 267 })(); 268
+12 -6
src/index.tsx
··· 4 declare global{ 5 interface Window { 6 CloseAllPopups: (() => void)[] 7 } 8 } 9 ··· 13 14 import "./styles.css"; 15 import App from "./Components/App"; 16 - 17 - render(() => <App />, document.getElementById("root") as HTMLElement); 18 19 - let f = new FontFace('Rubik', 'url(https://cdn.phaz.uk/fonts/rubik/Rubik-VariableFont_wght.ttf)'); 20 21 - f.load().then((font) => { 22 - document.fonts.add(font); 23 - });
··· 4 declare global{ 5 interface Window { 6 CloseAllPopups: (() => void)[] 7 + OS: string; 8 } 9 } 10 ··· 14 15 import "./styles.css"; 16 import App from "./Components/App"; 17 + import { invoke } from "@tauri-apps/api/core"; 18 19 + (async () => { 20 + window.OS = await invoke('get_os'); 21 22 + render(() => <App />, document.getElementById("root") as HTMLElement); 23 + 24 + let f = new FontFace('Rubik', 'url(https://cdn.phaz.uk/fonts/rubik/Rubik-VariableFont_wght.ttf)'); 25 + 26 + f.load().then((font) => { 27 + document.fonts.add(font); 28 + }); 29 + })();