fix loading indicator for traversing warrens
This commit is contained in:
@@ -6,16 +6,16 @@ export const useWarrenStore = defineStore('warrens', {
|
||||
state: () => ({
|
||||
warrens: {} as Record<string, Warren>,
|
||||
current: null as { warrenId: string; path: string } | null,
|
||||
loading: false,
|
||||
}),
|
||||
actions: {
|
||||
async setCurrentWarren(warrenId: string, path: string) {
|
||||
setCurrentWarren(warrenId: string, path: string) {
|
||||
this.current = {
|
||||
warrenId,
|
||||
path,
|
||||
};
|
||||
await refreshNuxtData('current-directory');
|
||||
},
|
||||
async addToCurrentWarrenPath(path: string) {
|
||||
addToCurrentWarrenPath(path: string) {
|
||||
if (this.current == null) {
|
||||
return;
|
||||
}
|
||||
@@ -25,9 +25,8 @@ export const useWarrenStore = defineStore('warrens', {
|
||||
}
|
||||
|
||||
this.current.path += path;
|
||||
await refreshNuxtData('current-directory');
|
||||
},
|
||||
async setCurrentWarrenPath(path: string) {
|
||||
setCurrentWarrenPath(path: string) {
|
||||
if (this.current == null) {
|
||||
return;
|
||||
}
|
||||
@@ -37,7 +36,6 @@ export const useWarrenStore = defineStore('warrens', {
|
||||
}
|
||||
|
||||
this.current.path = path;
|
||||
await refreshNuxtData('current-directory');
|
||||
},
|
||||
clearCurrentWarren() {
|
||||
this.current = null;
|
||||
|
||||
Reference in New Issue
Block a user