A photo manager for VRChat.

Fixed closing with keybinds closes #7

phaz.uk a263c5fb f33eb4fe

verified
Changed files
+7 -4
src
Components
+7 -4
src/Components/SettingsMenu.tsx
··· 6 6 7 7 let SettingsMenu = () => { 8 8 // let sliderBar: HTMLElement; 9 - let settingsContainer: HTMLElement; 9 + // let settingsContainer: HTMLElement; 10 10 // let currentButton = 0; 11 11 // let lastClickedButton = -1; 12 12 let finalPathConfirm: HTMLElement; ··· 17 17 let closeWithKey = ( e: KeyboardEvent ) => { 18 18 if(e.key === 'Escape'){ 19 19 window.ViewManager.ChangeState(ViewState.PHOTO_LIST); 20 - animate('.settings', { 20 + console.log('h'); 21 + animate('.settings',{ 21 22 opacity: 0, 22 23 translateX: '500px', 23 24 easing: 'easeInOutQuad', 24 25 duration: 250, 25 26 onComplete: () => { 27 + console.log('h'); 26 28 utils.set('.settings', { display: 'none' }); 27 29 } 28 30 }) ··· 77 79 // } 78 80 // }) 79 81 80 - // window.addEventListener('keyup', closeWithKey); 82 + window.addEventListener('keyup', closeWithKey); 81 83 82 84 // window.addEventListener('touchend', ( e: TouchEvent ) => { 83 85 // if(sliderMouseDown){ ··· 194 196 }}> 195 197 <div class="icon"><img draggable="false" src="/icon/x-solid.svg"></img></div> 196 198 </div> 197 - <div class="settings-container" ref={( el ) => settingsContainer = el}> 199 + {/* <div class="settings-container" ref={( el ) => settingsContainer = el}> */} 200 + <div class="settings-container"> 198 201 <div class="settings-block"> 199 202 <h1>Storage Settings</h1> 200 203 <p>{ window.PhotoManager.PhotoCount() } Photos ({ bytesToFormatted(window.PhotoManager.PhotoSize(), 0) })</p>