feat: add minimizable/expandable prompt
This commit is contained in:
parent
f6730e0481
commit
96545d1d0f
@ -1,8 +1,23 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="upload-files">
|
<div
|
||||||
|
v-if="filesInUploadCount > 0"
|
||||||
|
class="upload-files"
|
||||||
|
v-bind:class="{ closed: !open }"
|
||||||
|
>
|
||||||
<div class="card floating">
|
<div class="card floating">
|
||||||
<div class="card-title">
|
<div class="card-title">
|
||||||
<h2>{{ $t("prompts.uploadFiles") }}</h2>
|
<h2>{{ $t("prompts.uploadFiles", { files: filesInUploadCount }) }}</h2>
|
||||||
|
|
||||||
|
<button
|
||||||
|
class="action"
|
||||||
|
@click="toggle"
|
||||||
|
:aria-label="$t('sidebar.newFolder')"
|
||||||
|
:title="$t('sidebar.newFolder')"
|
||||||
|
>
|
||||||
|
<i class="material-icons">{{
|
||||||
|
open ? "keyboard_arrow_down" : "keyboard_arrow_up"
|
||||||
|
}}</i>
|
||||||
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="card-content">
|
<div class="card-content">
|
||||||
@ -13,18 +28,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</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>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -34,9 +37,18 @@ import { mapGetters } from "vuex";
|
|||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "uploadFiles",
|
name: "uploadFiles",
|
||||||
computed: {
|
data: function () {
|
||||||
...mapGetters(["filesInUpload"]),
|
return {
|
||||||
|
open: false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapGetters(["filesInUpload", "filesInUploadCount"]),
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toggle: function () {
|
||||||
|
this.open = !this.open;
|
||||||
|
},
|
||||||
},
|
},
|
||||||
methods: {},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@ -136,9 +136,11 @@ main {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.upload-files .card.floating {
|
.upload-files .card.floating {
|
||||||
top: 4em;
|
|
||||||
left: auto;
|
left: auto;
|
||||||
|
top: auto;
|
||||||
|
margin: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
transform: none;
|
transform: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -163,3 +165,19 @@ main {
|
|||||||
transition: 0.2s ease width;
|
transition: 0.2s ease width;
|
||||||
border-radius: 10px;
|
border-radius: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.upload-files.closed .card-content {
|
||||||
|
display: none;
|
||||||
|
padding: 0em 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-files .card-title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.upload-files.closed .card-title {
|
||||||
|
font-size: 0.7em;
|
||||||
|
padding: 0.5em 1em;
|
||||||
|
}
|
||||||
|
|||||||
@ -151,7 +151,7 @@
|
|||||||
"show": "Show",
|
"show": "Show",
|
||||||
"size": "Size",
|
"size": "Size",
|
||||||
"upload": "Upload",
|
"upload": "Upload",
|
||||||
"uploadFiles": "Files in upload",
|
"uploadFiles": "Uploading {files} files...",
|
||||||
"uploadMessage": "Select an option to upload.",
|
"uploadMessage": "Select an option to upload.",
|
||||||
"optionalPassword": "Optional password"
|
"optionalPassword": "Optional password"
|
||||||
},
|
},
|
||||||
|
|||||||
@ -9,6 +9,7 @@
|
|||||||
<shell v-if="isExecEnabled && isLogged && user.perm.execute" />
|
<shell v-if="isExecEnabled && isLogged && user.perm.execute" />
|
||||||
</main>
|
</main>
|
||||||
<prompts></prompts>
|
<prompts></prompts>
|
||||||
|
<upload-files></upload-files>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -17,6 +18,7 @@ import { mapState, mapGetters } from "vuex";
|
|||||||
import Sidebar from "@/components/Sidebar";
|
import Sidebar from "@/components/Sidebar";
|
||||||
import Prompts from "@/components/prompts/Prompts";
|
import Prompts from "@/components/prompts/Prompts";
|
||||||
import Shell from "@/components/Shell";
|
import Shell from "@/components/Shell";
|
||||||
|
import UploadFiles from "../components/prompts/UploadFiles";
|
||||||
import { enableExec } from "@/utils/constants";
|
import { enableExec } from "@/utils/constants";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -25,6 +27,7 @@ export default {
|
|||||||
Sidebar,
|
Sidebar,
|
||||||
Prompts,
|
Prompts,
|
||||||
Shell,
|
Shell,
|
||||||
|
UploadFiles,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters(["isLogged", "progress"]),
|
...mapGetters(["isLogged", "progress"]),
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user