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