2018-02-01 12:17:04 +00:00
|
|
|
<template>
|
|
|
|
<div>
|
2022-02-21 18:30:42 +00:00
|
|
|
<div v-if="progress" class="progress">
|
2020-07-07 19:41:13 +00:00
|
|
|
<div v-bind:style="{ width: this.progress + '%' }"></div>
|
2018-02-01 12:17:04 +00:00
|
|
|
</div>
|
2023-08-31 22:15:44 +00:00
|
|
|
<editorBar v-if="getCurrentView === 'editor'"></editorBar>
|
|
|
|
<listingBar v-else-if="getCurrentView === 'listing'"></listingBar>
|
|
|
|
<previewBar v-else-if="getCurrentView === 'preview'"></previewBar>
|
|
|
|
<defaultBar v-else></defaultBar>
|
2018-02-01 12:17:04 +00:00
|
|
|
<sidebar></sidebar>
|
|
|
|
<main>
|
2019-01-05 16:12:09 +00:00
|
|
|
<router-view></router-view>
|
2020-10-01 14:45:24 +00:00
|
|
|
<shell v-if="isExecEnabled && isLogged && user.perm.execute" />
|
2018-02-01 12:17:04 +00:00
|
|
|
</main>
|
|
|
|
<prompts></prompts>
|
2022-02-21 18:30:42 +00:00
|
|
|
<upload-files></upload-files>
|
2018-02-01 12:17:04 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2023-08-31 22:15:44 +00:00
|
|
|
import editorBar from "./files/Editor.vue"
|
|
|
|
import defaultBar from "./files/Default.vue"
|
|
|
|
import listingBar from"./files/Listing.vue"
|
|
|
|
import previewBar from "./files/Preview.vue"
|
|
|
|
import Action from "@/components/header/Action.vue";
|
2021-03-21 11:51:58 +00:00
|
|
|
import { mapState, mapGetters } from "vuex";
|
2023-08-31 22:15:44 +00:00
|
|
|
import Sidebar from "@/components/Sidebar.vue";
|
|
|
|
import Prompts from "@/components/header/Action.vue";
|
|
|
|
import Shell from "@/components/Shell.vue";
|
|
|
|
import UploadFiles from "../components/prompts/UploadFiles.vue";
|
2021-03-21 11:51:58 +00:00
|
|
|
import { enableExec } from "@/utils/constants";
|
2018-02-01 12:17:04 +00:00
|
|
|
|
|
|
|
export default {
|
2021-03-21 11:51:58 +00:00
|
|
|
name: "layout",
|
2018-02-01 12:17:04 +00:00
|
|
|
components: {
|
2023-08-31 22:15:44 +00:00
|
|
|
defaultBar,
|
|
|
|
editorBar,
|
|
|
|
listingBar,
|
|
|
|
previewBar,
|
2023-08-19 18:32:29 +00:00
|
|
|
Action,
|
2018-02-01 12:17:04 +00:00
|
|
|
Sidebar,
|
2019-01-05 16:12:09 +00:00
|
|
|
Prompts,
|
2021-03-21 11:51:58 +00:00
|
|
|
Shell,
|
2022-02-21 18:30:42 +00:00
|
|
|
UploadFiles,
|
2019-01-05 16:12:09 +00:00
|
|
|
},
|
2023-08-31 22:15:44 +00:00
|
|
|
data: function () {
|
|
|
|
return {
|
|
|
|
showContexts: true,
|
|
|
|
dragCounter: 0,
|
|
|
|
width: window.innerWidth,
|
|
|
|
itemWeight: 0,
|
|
|
|
};
|
|
|
|
},
|
2019-01-05 16:12:09 +00:00
|
|
|
computed: {
|
2021-03-21 11:51:58 +00:00
|
|
|
...mapGetters(["isLogged", "progress"]),
|
2023-08-31 22:15:44 +00:00
|
|
|
...mapState(["req", "user", "currentView"]),
|
|
|
|
|
2021-03-21 11:51:58 +00:00
|
|
|
isExecEnabled: () => enableExec,
|
2023-08-31 22:15:44 +00:00
|
|
|
getCurrentView() {
|
|
|
|
return this.currentView;
|
|
|
|
},
|
2018-02-01 12:17:04 +00:00
|
|
|
},
|
|
|
|
watch: {
|
2023-08-31 22:15:44 +00:00
|
|
|
getCurrentView: function () {
|
|
|
|
console.log(this.currentView)
|
|
|
|
},
|
2021-03-21 11:51:58 +00:00
|
|
|
$route: function () {
|
|
|
|
this.$store.commit("resetSelected");
|
|
|
|
this.$store.commit("multiple", false);
|
2023-08-31 22:15:44 +00:00
|
|
|
if (this.$store.state.show !== "success") this.$store.commit("closeHovers");
|
2021-03-21 11:51:58 +00:00
|
|
|
},
|
|
|
|
},
|
2023-08-19 18:32:29 +00:00
|
|
|
methods: {
|
2023-08-31 22:15:44 +00:00
|
|
|
getTitle() {
|
|
|
|
let title = "Title"
|
|
|
|
if (this.$route.path.startsWith('/settings/')){
|
|
|
|
title = "Settings"
|
|
|
|
}
|
|
|
|
return title
|
2023-08-19 18:32:29 +00:00
|
|
|
},
|
2023-08-31 22:15:44 +00:00
|
|
|
},
|
2021-03-21 11:51:58 +00:00
|
|
|
};
|
2018-02-01 12:17:04 +00:00
|
|
|
</script>
|