{{ c.text }}
{{ c.text }}-
{{ $t("prompts.copyMessage") }}
-+
{{ $t("prompts.deleteMessageSingle") }}
@@ -48,21 +48,22 @@ export default { "selectedCount", "req", "selected", + "currentPrompt", ]), ...mapWritableState(useFileStore, ["reload"]), - ...mapState(useLayoutStore, ["showConfirm"]), }, methods: { ...mapActions(useLayoutStore, ["closeHovers"]), submit: async function () { buttons.loading("delete"); + window.sessionStorage.setItem("modified", "true"); try { if (!this.isListing) { await api.remove(this.$route.path); buttons.success("delete"); - this.showConfirm(); + this.currentPrompt?.confirm(); this.closeHovers(); return; } diff --git a/frontend/src/components/prompts/DeleteUser.vue b/frontend/src/components/prompts/DeleteUser.vue index e45dab8e3c..15539c6934 100644 --- a/frontend/src/components/prompts/DeleteUser.vue +++ b/frontend/src/components/prompts/DeleteUser.vue @@ -17,7 +17,7 @@ diff --git a/frontend/src/components/prompts/FileList.vue b/frontend/src/components/prompts/FileList.vue index 05fe0dea49..b276ce6218 100644 --- a/frontend/src/components/prompts/FileList.vue +++ b/frontend/src/components/prompts/FileList.vue @@ -138,6 +138,17 @@ export default { this.selected = event.currentTarget.dataset.url; this.$emit("update:selected", this.selected); }, + createDir: async function () { + this.$store.commit("showHover", { + prompt: "newDir", + action: null, + confirm: null, + props: { + redirect: false, + base: this.current === this.$route.path ? null : this.current, + }, + }); + }, }, }; diff --git a/frontend/src/components/prompts/Info.vue b/frontend/src/components/prompts/Info.vue index 68a6cc9d5f..687b49fb2f 100644 --- a/frontend/src/components/prompts/Info.vue +++ b/frontend/src/components/prompts/Info.vue @@ -12,10 +12,17 @@
{{ $t("prompts.displayName") }} {{ name }}
+{{ $t("prompts.size") }}: {{ humanSize }}
+ +{{ $t("prompts.lastModified") }}: {{ humanTime }}
@@ -131,7 +138,13 @@ export default { return dayjs(this.req.items[this.selected[0]].modified).fromNow(); }, modTime: function () { - return new Date(Date.parse(this.req.modified)).toLocaleString(); + if (this.selectedCount === 0) { + return new Date(Date.parse(this.req.modified)).toLocaleString(); + } + + return new Date( + Date.parse(this.req.items[this.selected[0]].modified) + ).toLocaleString(); }, name: function () { return this.selectedCount === 0 @@ -146,6 +159,17 @@ export default { : this.req.items[this.selected[0]].isDir) ); }, + resolution: function () { + if (this.selectedCount === 1) { + const selectedItem = this.req.items[this.selected[0]]; + if (selectedItem && selectedItem.type === "image") { + return selectedItem.resolution; + } + } else if (this.req && this.req.type === "image") { + return this.req.resolution; + } + return null; + }, }, methods: { ...mapActions(useLayoutStore, ["closeHovers"]), diff --git a/frontend/src/components/prompts/Move.vue b/frontend/src/components/prompts/Move.vue index 452b475388..bce71f3e1c 100644 --- a/frontend/src/components/prompts/Move.vue +++ b/frontend/src/components/prompts/Move.vue @@ -5,30 +5,50 @@{{ $t("settings.shareDuration") }}