This commit is contained in:
Graham Steffaniak 2023-09-04 14:39:06 -05:00
parent eb33db5d87
commit a7c6f637f0
6 changed files with 27 additions and 23 deletions

View File

@ -40,6 +40,7 @@ header {
}
#search.active #input {
background: var(--surfacePrimary);
border-color: white;
}
#search.active input {
color: var(--textPrimary);
@ -131,8 +132,8 @@ nav > div {
.input {
background: var(--surfaceSecondary);
color: var(--textPrimary);
border: 1px solid rgba(255, 255, 255, 0.05);
}
.input:hover,
.input:focus {
border-color: rgba(255, 255, 255, 0.15);
@ -215,5 +216,5 @@ nav {
}
#result-desktop #result-list {
background: #2a3137;
max-height: unset;
}

View File

@ -5,9 +5,6 @@
</div>
<listingBar v-if="currentView === 'listing'"></listingBar>
<editorBar v-else-if="currentView === 'editor'"></editorBar>
<editorBar v-else-if="currentView === 'share'"></editorBar>
<editorBar v-else-if="currentView === 'dashboard'"></editorBar>
<editorBar v-else-if="currentView === 'error'"></editorBar>
<defaultBar v-else></defaultBar>
<sidebar></sidebar>
<main>
@ -19,10 +16,9 @@
</template>
<script>
import editorBar from "./files/EditorBar.vue"
import defaultBar from "./files/Default.vue"
import listingBar from "./files/ListingBar.vue"
import previewBar from "./files/Preview.vue"
import editorBar from "./bars/EditorBar.vue"
import defaultBar from "./bars/Default.vue"
import listingBar from "./bars/ListingBar.vue"
import Prompts from "@/components/prompts/Prompts";
import Action from "@/components/header/Action";
import { mapState, mapGetters } from "vuex";
@ -35,7 +31,6 @@ export default {
defaultBar,
editorBar,
listingBar,
previewBar,
Action,
Sidebar,
Prompts,

View File

@ -52,6 +52,10 @@ import { mapState } from "vuex";
export default {
name: "settings",
mounted() {
// Update the req name property
this.$store.commit("updateRequest", { name: "Settings" });
},
computed: {
...mapState(["user", "loading","req"]),
},

View File

@ -1,11 +1,6 @@
<template>
<header-bar>
<action
class="menu-button"
icon="menu"
:label="$t('buttons.toggleSidebar')"
@action="toggleSidebar()"
/>
<action icon="close" :label="$t('buttons.close')" @action="close()" />
<title class="topTitle">{{ req.name }}</title>
</header-bar>
@ -24,6 +19,7 @@ import Vue from "vue";
import { mapState, mapGetters, mapMutations } from "vuex";
import { users, files as api } from "@/api";
import { enableExec } from "@/utils/constants";
import url from "@/utils/url";
import HeaderBar from "@/components/header/HeaderBar.vue";
import Action from "@/components/header/Action.vue";
import * as upload from "@/utils/upload";
@ -53,6 +49,9 @@ export default {
computed: {
...mapState(["req", "selected", "user", "show", "multiple", "selected", "loading"]),
...mapGetters(["selectedCount"]),
isSettings() {
return this.$route.path.includes("/settings/")
},
nameSorted() {
return this.req.sorting.by === "name";
},
@ -582,7 +581,17 @@ export default {
},
});
},
close() {
if (this.isSettings) { // Use this.isSettings to access the computed property
this.$router.push({ path: "/files/" }, () => { });
this.$store.commit("closeHovers");
return;
}
this.$store.commit("updateRequest", {});
let uri = url.removeLastDir(this.$route.path) + "/";
console.log(url)
this.$router.push({ path: uri });
},
upload: function () {
if (
typeof window.DataTransferItem !== "undefined" &&

View File

@ -132,11 +132,6 @@ export default {
}
},
close() {
if (this.isSettings) { // Use this.isSettings to access the computed property
this.$router.push({ path: "/files/" }, () => { });
this.$store.commit("closeHovers");
return;
}
this.$store.commit("updateRequest", {});
let uri = url.removeLastDir(this.$route.path) + "/";
this.$router.push({ path: uri });

View File

@ -28,9 +28,9 @@
import Vue from "vue";
import { mapState, mapGetters, mapMutations } from "vuex";
import { users, files as api } from "@/api";
import { enableExec } from "@/utils/constants";
import HeaderBar from "@/components/header/HeaderBar.vue";
import Action from "@/components/header/Action.vue";
import url from "@/utils/url";
import * as upload from "@/utils/upload";
import css from "@/utils/css";
import throttle from "lodash.throttle";