feat: Added some styling + removed unused parts of prompt code (#2659)
This commit is contained in:
parent
46445a2392
commit
696c9bd2dd
@ -16,8 +16,7 @@
|
||||
:aria-label="$t('sidebar.newFolder')"
|
||||
:title="$t('sidebar.newFolder')"
|
||||
>
|
||||
<i class="material-icons">create_new_folder</i>
|
||||
<span>{{ $t("sidebar.newFolder") }}</span>
|
||||
<span style="vertical-align: bottom;">{{ $t("sidebar.newFolder") }}</span>
|
||||
</button>
|
||||
</template>
|
||||
<button
|
||||
|
||||
@ -74,7 +74,6 @@ export default {
|
||||
if (this.redirect) {
|
||||
this.$router.push({ path: uri });
|
||||
}else{
|
||||
console.log(uri);
|
||||
const res = await api.fetch(url.removeLastDir(uri) + "/");
|
||||
this.$store.commit("updateRequest", res);
|
||||
}
|
||||
|
||||
@ -3,41 +3,33 @@ import moment from "moment";
|
||||
|
||||
const mutations = {
|
||||
closeHovers: (state) => {
|
||||
state.show = null;
|
||||
state.prompts.pop();
|
||||
console.log(state.prompts);
|
||||
state.showConfirm = null;
|
||||
state.showAction = null;
|
||||
},
|
||||
toggleShell: (state) => {
|
||||
state.showShell = !state.showShell;
|
||||
},
|
||||
showHover: (state, value) => {
|
||||
console.log(value);
|
||||
if (typeof value !== "object") {
|
||||
state.show = value;
|
||||
state.prompts.push({
|
||||
prompt: value,
|
||||
confirm: null,
|
||||
action: null,
|
||||
props: {},
|
||||
props: null,
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
state.show = value.prompt;
|
||||
state.prompts.push(value);
|
||||
state.showConfirm = value.confirm;
|
||||
if (value.action !== undefined) {
|
||||
state.showAction = value.action;
|
||||
}
|
||||
state.prompts.push({
|
||||
prompt: value.prompt, // Should not be null
|
||||
confirm: value?.confirm,
|
||||
action: value?.action,
|
||||
props: value?.props
|
||||
})
|
||||
},
|
||||
showError: (state) => {
|
||||
state.show = "error";
|
||||
state.prompts.push("error");
|
||||
},
|
||||
showSuccess: (state) => {
|
||||
state.show = "success";
|
||||
state.prompts.push("success");
|
||||
},
|
||||
setLoading: (state, value) => {
|
||||
@ -88,7 +80,6 @@ const mutations = {
|
||||
updateRequest: (state, value) => {
|
||||
state.oldReq = state.req;
|
||||
state.req = value;
|
||||
console.log(state.req)
|
||||
},
|
||||
updateClipboard: (state, value) => {
|
||||
state.clipboard.key = value.key;
|
||||
|
||||
@ -301,12 +301,11 @@ export default {
|
||||
"req",
|
||||
"selected",
|
||||
"user",
|
||||
"show",
|
||||
"multiple",
|
||||
"selected",
|
||||
"loading",
|
||||
]),
|
||||
...mapGetters(["selectedCount"]),
|
||||
...mapGetters(["selectedCount", "currentPrompt"]),
|
||||
nameSorted() {
|
||||
return this.req.sorting.by === "name";
|
||||
},
|
||||
@ -443,7 +442,7 @@ export default {
|
||||
},
|
||||
keyEvent(event) {
|
||||
// No prompts are shown
|
||||
if (this.show !== null) {
|
||||
if (this.currentPrompt !== null) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user