Skip to content

Commit 0709474

Browse files
committed
bug fixes due to merge
1 parent 9c8a033 commit 0709474

File tree

14 files changed

+136
-529
lines changed

14 files changed

+136
-529
lines changed

frontend/package-lock.json

Lines changed: 115 additions & 492 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frontend/src/api/pub.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export async function fetch(url: string, password: string = "") {
1313
);
1414

1515
const data = (await res.json()) as Resource;
16-
console.log(data);
1716
data.url = `/share${url}`;
1817

1918
if (data.isDir) {

frontend/src/components/Search.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ onMounted(() => {
165165
});
166166
167167
const open = () => {
168-
layoutStore.showHover("search");
168+
!active.value && layoutStore.showHover("search");
169169
};
170170
171171
const close = (event: Event) => {
@@ -209,7 +209,6 @@ const submit = async (event: Event) => {
209209
210210
try {
211211
results.value = await search(path, prompt.value);
212-
console.log("Search: ", results.value);
213212
} catch (error: any) {
214213
$showError(error);
215214
}

frontend/src/components/files/ListingItem.vue

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,6 @@ const isThumbsEnabled = computed(() => {
103103
return enableThumbs;
104104
});
105105
106-
// ...mapActions(useFileStore, ["removeSelected"]),
107-
// ...mapActions(useLayoutStore, ["showHover", "closeHovers"]),
108-
109106
const humanSize = () => {
110107
return props.type == "invalid_link" ? "invalid link" : filesize(props.size);
111108
};

frontend/src/components/prompts/BaseModal.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
initialFocus: '#focus-prompt',
88
fallbackFocus: 'div.vfm__content',
99
}"
10+
style="z-index: 9999999"
1011
>
1112
<slot />
1213
</VueFinalModal>

frontend/src/components/prompts/DiscardEditorChanges.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,21 @@
77
</div>
88
<div class="card-action">
99
<button
10-
@click="closeHovers()"
1110
class="button button--flat button--grey"
11+
@click="closeHovers"
1212
:aria-label="$t('buttons.cancel')"
1313
:title="$t('buttons.cancel')"
14+
tabindex="2"
1415
>
1516
{{ $t("buttons.cancel") }}
1617
</button>
1718
<button
19+
id="focus-prompt"
1820
@click="submit"
1921
class="button button--flat button--red"
2022
:aria-label="$t('buttons.discardChanges')"
2123
:title="$t('buttons.discardChanges')"
24+
tabindex="1"
2225
>
2326
{{ $t("buttons.discardChanges") }}
2427
</button>

frontend/src/components/prompts/Share.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,17 @@
6262
@click="closeHovers"
6363
:aria-label="$t('buttons.close')"
6464
:title="$t('buttons.close')"
65+
tabindex="2"
6566
>
6667
{{ $t("buttons.close") }}
6768
</button>
6869
<button
70+
id="focus-prompt"
6971
class="button button--flat button--blue"
7072
@click="() => switchListing()"
7173
:aria-label="$t('buttons.new')"
7274
:title="$t('buttons.new')"
75+
tabindex="1"
7376
>
7477
{{ $t("buttons.new") }}
7578
</button>
@@ -81,14 +84,14 @@
8184
<p>{{ $t("settings.shareDuration") }}</p>
8285
<div class="input-group input">
8386
<vue-number-input
84-
tabindex="1"
8587
center
8688
controls
8789
size="small"
8890
:max="2147483647"
8991
:min="0"
9092
@keyup.enter="submit"
9193
v-model="time"
94+
tabindex="1"
9295
/>
9396
<select
9497
class="right"

frontend/src/components/prompts/UploadFiles.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,16 +71,16 @@ export default {
7171
"filesInUpload",
7272
"filesInUploadCount",
7373
"uploadSpeed",
74-
"eta",
74+
"getETA",
7575
]),
7676
...mapWritableState(useFileStore, ["reload"]),
7777
...mapActions(useUploadStore, ["reset"]),
7878
formattedETA() {
79-
if (!this.eta || this.eta === Infinity) {
79+
if (!this.getETA || this.getETA === Infinity) {
8080
return "--:--:--";
8181
}
8282
83-
let totalSeconds = this.eta;
83+
let totalSeconds = this.getETA;
8484
const hours = Math.floor(totalSeconds / 3600);
8585
totalSeconds %= 3600;
8686
const minutes = Math.floor(totalSeconds / 60);

frontend/src/css/styles.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ main .spinner .bounce2 {
330330
left: 0;
331331
height: 100%;
332332
width: 100%;
333-
z-index: 9999;
333+
z-index: 9998;
334334
overflow: hidden;
335335
}
336336

frontend/src/stores/upload.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export const useUploadStore = defineStore("upload", {
7878
uploadSpeed: (state) => {
7979
return state.speedMbyte;
8080
},
81-
eta: (state) => state.eta,
81+
getETA: (state) => state.eta,
8282
},
8383
actions: {
8484
// no context as first argument, use `this` instead

frontend/src/utils/upload.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,8 +141,6 @@ export function handleFiles(
141141
path += "/";
142142
}
143143

144-
// console.log("File", file);
145-
146144
const item: UploadItem = {
147145
id,
148146
path,

frontend/src/views/Files.vue

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
/>
88

99
<breadcrumbs base="/files" />
10-
<listing />
1110
<errors v-if="error" :errorCode="error.status" />
1211
<component v-else-if="currentView" :is="currentView"></component>
1312
<div v-else-if="currentView !== null">

frontend/src/views/Share.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@
4040
</div>
4141
<div v-else-if="error">
4242
<div v-if="error.status === 401">
43-
<div class="card floating" id="password">
43+
<div class="card floating" id="password" style="z-index: 9999999">
4444
<div v-if="attemptedPasswordLogin" class="share__wrong__password">
4545
{{ t("login.wrongCredentials") }}
4646
</div>

frontend/src/views/files/FileListing.vue

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -326,18 +326,6 @@ const { t } = useI18n();
326326
327327
const listing = ref<HTMLElement | null>(null);
328328
329-
// ...mapStores(useClipboardStore),
330-
// ...mapState(useAuthStore, ["user"]),
331-
// ...mapState(useFileStore, ["selectedCount", "toggleMultiple"]),
332-
// ...mapState(useLayoutStore, ["show"]),
333-
// ...mapWritableState(useFileStore, [
334-
// "req",
335-
// "selected",
336-
// "multiple",
337-
// "loading",
338-
// "reload",
339-
// ])
340-
341329
const nameSorted = computed(() =>
342330
fileStore.req ? fileStore.req.sorting.by === "name" : false
343331
);
@@ -521,16 +509,14 @@ const keyEvent = (event: KeyboardEvent) => {
521509
return;
522510
}
523511
524-
let key = String.fromCharCode(event.which).toLowerCase();
525-
526-
switch (key) {
512+
switch (event.key) {
527513
case "f":
528514
event.preventDefault();
529515
layoutStore.showHover("search");
530516
break;
531517
case "c":
532518
case "x":
533-
copyCut(event, key);
519+
copyCut(event);
534520
break;
535521
case "v":
536522
paste(event);
@@ -560,7 +546,7 @@ const preventDefault = (event: Event) => {
560546
event.preventDefault();
561547
};
562548
563-
const copyCut = (event: Event, key: string): void => {
549+
const copyCut = (event: Event | KeyboardEvent): void => {
564550
if ((event.target as HTMLElement).tagName?.toLowerCase() === "input") return;
565551
566552
if (fileStore.req === null) return;
@@ -579,7 +565,7 @@ const copyCut = (event: Event, key: string): void => {
579565
}
580566
581567
clipboardStore.$patch({
582-
key,
568+
key: (event as KeyboardEvent).key,
583569
items,
584570
path: route.path,
585571
});
@@ -628,8 +614,7 @@ const paste = (event: Event) => {
628614
return;
629615
}
630616
631-
// @ts-ignore
632-
let conflict = upload.checkConflict(items, fileStore.req.items);
617+
let conflict = upload.checkConflict(items, fileStore.req!.items);
633618
634619
let overwrite = false;
635620
let rename = false;

0 commit comments

Comments
 (0)