feat: add uploadFiles prompt
This commit is contained in:
parent
cff50715a0
commit
7f421b421f
@ -19,6 +19,7 @@ import Replace from "./Replace";
|
|||||||
import ReplaceRename from "./ReplaceRename";
|
import ReplaceRename from "./ReplaceRename";
|
||||||
import Share from "./Share";
|
import Share from "./Share";
|
||||||
import Upload from "./Upload";
|
import Upload from "./Upload";
|
||||||
|
import UploadFiles from "./UploadFiles";
|
||||||
import ShareDelete from "./ShareDelete";
|
import ShareDelete from "./ShareDelete";
|
||||||
import { mapState } from "vuex";
|
import { mapState } from "vuex";
|
||||||
import buttons from "@/utils/buttons";
|
import buttons from "@/utils/buttons";
|
||||||
@ -40,6 +41,7 @@ export default {
|
|||||||
ReplaceRename,
|
ReplaceRename,
|
||||||
Upload,
|
Upload,
|
||||||
ShareDelete,
|
ShareDelete,
|
||||||
|
UploadFiles,
|
||||||
},
|
},
|
||||||
data: function () {
|
data: function () {
|
||||||
return {
|
return {
|
||||||
@ -99,15 +101,14 @@ export default {
|
|||||||
"replace-rename",
|
"replace-rename",
|
||||||
"share",
|
"share",
|
||||||
"upload",
|
"upload",
|
||||||
|
"uploadFiles",
|
||||||
"share-delete",
|
"share-delete",
|
||||||
].indexOf(this.show) >= 0;
|
].indexOf(this.show) >= 0;
|
||||||
|
|
||||||
return (matched && this.show) || null;
|
return (matched && this.show) || null;
|
||||||
},
|
},
|
||||||
showOverlay: function () {
|
showOverlay: function () {
|
||||||
return (
|
return this.show !== null && this.show !== "search" && this.show !== "more";
|
||||||
this.show !== null && this.show !== "search" && this.show !== "more"
|
|
||||||
);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
36
frontend/src/components/prompts/UploadFiles.vue
Normal file
36
frontend/src/components/prompts/UploadFiles.vue
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
<template>
|
||||||
|
<div class="upload-files">
|
||||||
|
<div class="card floating">
|
||||||
|
<div class="card-title">
|
||||||
|
<h2>{{ $t("prompts.uploadFiles") }}</h2>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-content">
|
||||||
|
<div class="file" v-for="file in filesInUpload" :key="file.id">
|
||||||
|
<div class="file-name">{{ file.name }}</div>
|
||||||
|
<div class="file-progress">
|
||||||
|
<div v-bind:style="{ width: file.progress + '%' }"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="card-action">
|
||||||
|
<button type="submit" @click="$store.commit('closeHovers')" class="button button--flat" :aria-label="$t('buttons.close')" :title="$t('buttons.close')">
|
||||||
|
{{ $t("buttons.close") }}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { mapGetters } from "vuex";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "uploadFiles",
|
||||||
|
computed: {
|
||||||
|
...mapGetters(["filesInUpload"]),
|
||||||
|
},
|
||||||
|
methods: {},
|
||||||
|
};
|
||||||
|
</script>
|
||||||
@ -116,30 +116,50 @@ main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.progress {
|
.progress {
|
||||||
position: absolute;
|
position: fixed;
|
||||||
bottom: 0;
|
top: 0;
|
||||||
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 30px;
|
height: 3px;
|
||||||
z-index: 9999999999;
|
z-index: 9999999999;
|
||||||
}
|
}
|
||||||
|
|
||||||
.progress div,
|
.progress div {
|
||||||
.files div div {
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
background-color: #40c4ff;
|
background-color: #40c4ff;
|
||||||
width: 0;
|
width: 0;
|
||||||
transition: 0.2s ease width;
|
transition: 0.2s ease width;
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.files div div {
|
|
||||||
height: 30px;
|
|
||||||
overflow: hidden;
|
|
||||||
background-color: #329fd1;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.break-word {
|
.break-word {
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.upload-files .card.floating {
|
||||||
|
top: 4em;
|
||||||
|
left: auto;
|
||||||
|
right: 0;
|
||||||
|
transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-files .file {
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-files .file .file-name {
|
||||||
|
font-size: 1.1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-files .file .file-progress {
|
||||||
|
margin-top: 2px;
|
||||||
|
width: 100%;
|
||||||
|
height: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-files .file .file-progress div {
|
||||||
|
height: 100%;
|
||||||
|
background-color: #40c4ff;
|
||||||
|
width: 0;
|
||||||
|
transition: 0.2s ease width;
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|||||||
@ -100,7 +100,7 @@
|
|||||||
"ru": "Русский",
|
"ru": "Русский",
|
||||||
"sk": "Slovenčina",
|
"sk": "Slovenčina",
|
||||||
"svSE": "Swedish (Sweden)",
|
"svSE": "Swedish (Sweden)",
|
||||||
"tr" : "Türkçe",
|
"tr": "Türkçe",
|
||||||
"ua": "Українська",
|
"ua": "Українська",
|
||||||
"zhCN": "中文 (简体)",
|
"zhCN": "中文 (简体)",
|
||||||
"zhTW": "中文 (繁體)"
|
"zhTW": "中文 (繁體)"
|
||||||
@ -151,6 +151,7 @@
|
|||||||
"show": "Show",
|
"show": "Show",
|
||||||
"size": "Size",
|
"size": "Size",
|
||||||
"upload": "Upload",
|
"upload": "Upload",
|
||||||
|
"uploadFiles": "Files in upload",
|
||||||
"uploadMessage": "Select an option to upload.",
|
"uploadMessage": "Select an option to upload.",
|
||||||
"optionalPassword": "Optional password"
|
"optionalPassword": "Optional password"
|
||||||
},
|
},
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user