adjust the interaction for displaying and reordering all explorers on the Insights Explorer page

This commit is contained in:
MaysWind
2026-01-17 00:45:09 +08:00
parent 4b72bfd76d
commit b556efa510
21 changed files with 56 additions and 70 deletions
+1 -1
View File
@@ -1722,7 +1722,6 @@
"No available explorer": "No available explorer", "No available explorer": "No available explorer",
"New Explorer": "New Explorer", "New Explorer": "New Explorer",
"Untitled Explorer": "Untitled Explorer", "Untitled Explorer": "Untitled Explorer",
"More Explorer": "More Explorer",
"Save Explorer": "Save Explorer", "Save Explorer": "Save Explorer",
"Save As New Explorer": "Save As New Explorer", "Save As New Explorer": "Save As New Explorer",
"Restore to Last Saved": "Restore to Last Saved", "Restore to Last Saved": "Restore to Last Saved",
@@ -1732,6 +1731,7 @@
"Hide Explorer": "Hide Explorer", "Hide Explorer": "Hide Explorer",
"Unhide Explorer": "Unhide Explorer", "Unhide Explorer": "Unhide Explorer",
"Delete Explorer": "Delete Explorer", "Delete Explorer": "Delete Explorer",
"Change Explorer Display Order": "Change Explorer Display Order",
"Explorer Name": "Explorer Name", "Explorer Name": "Explorer Name",
"Add Query": "Add Query", "Add Query": "Add Query",
"Remove Query": "Remove Query", "Remove Query": "Remove Query",
+1 -1
View File
@@ -1722,7 +1722,6 @@
"No available explorer": "No available explorer", "No available explorer": "No available explorer",
"New Explorer": "New Explorer", "New Explorer": "New Explorer",
"Untitled Explorer": "Untitled Explorer", "Untitled Explorer": "Untitled Explorer",
"More Explorer": "More Explorer",
"Save Explorer": "Save Explorer", "Save Explorer": "Save Explorer",
"Save As New Explorer": "Save As New Explorer", "Save As New Explorer": "Save As New Explorer",
"Restore to Last Saved": "Restore to Last Saved", "Restore to Last Saved": "Restore to Last Saved",
@@ -1732,6 +1731,7 @@
"Hide Explorer": "Hide Explorer", "Hide Explorer": "Hide Explorer",
"Unhide Explorer": "Unhide Explorer", "Unhide Explorer": "Unhide Explorer",
"Delete Explorer": "Delete Explorer", "Delete Explorer": "Delete Explorer",
"Change Explorer Display Order": "Change Explorer Display Order",
"Explorer Name": "Explorer Name", "Explorer Name": "Explorer Name",
"Add Query": "Add Query", "Add Query": "Add Query",
"Remove Query": "Remove Query", "Remove Query": "Remove Query",
+1 -1
View File
@@ -1722,7 +1722,6 @@
"No available explorer": "No available explorer", "No available explorer": "No available explorer",
"New Explorer": "New Explorer", "New Explorer": "New Explorer",
"Untitled Explorer": "Untitled Explorer", "Untitled Explorer": "Untitled Explorer",
"More Explorer": "More Explorer",
"Save Explorer": "Save Explorer", "Save Explorer": "Save Explorer",
"Save As New Explorer": "Save As New Explorer", "Save As New Explorer": "Save As New Explorer",
"Restore to Last Saved": "Restore to Last Saved", "Restore to Last Saved": "Restore to Last Saved",
@@ -1732,6 +1731,7 @@
"Hide Explorer": "Hide Explorer", "Hide Explorer": "Hide Explorer",
"Unhide Explorer": "Unhide Explorer", "Unhide Explorer": "Unhide Explorer",
"Delete Explorer": "Delete Explorer", "Delete Explorer": "Delete Explorer",
"Change Explorer Display Order": "Change Explorer Display Order",
"Explorer Name": "Explorer Name", "Explorer Name": "Explorer Name",
"Add Query": "Add Query", "Add Query": "Add Query",
"Remove Query": "Remove Query", "Remove Query": "Remove Query",
+1 -1
View File
@@ -1722,7 +1722,6 @@
"No available explorer": "No available explorer", "No available explorer": "No available explorer",
"New Explorer": "New Explorer", "New Explorer": "New Explorer",
"Untitled Explorer": "Untitled Explorer", "Untitled Explorer": "Untitled Explorer",
"More Explorer": "More Explorer",
"Save Explorer": "Save Explorer", "Save Explorer": "Save Explorer",
"Save As New Explorer": "Save As New Explorer", "Save As New Explorer": "Save As New Explorer",
"Restore to Last Saved": "Restore to Last Saved", "Restore to Last Saved": "Restore to Last Saved",
@@ -1732,6 +1731,7 @@
"Hide Explorer": "Hide Explorer", "Hide Explorer": "Hide Explorer",
"Unhide Explorer": "Unhide Explorer", "Unhide Explorer": "Unhide Explorer",
"Delete Explorer": "Delete Explorer", "Delete Explorer": "Delete Explorer",
"Change Explorer Display Order": "Change Explorer Display Order",
"Explorer Name": "Explorer Name", "Explorer Name": "Explorer Name",
"Add Query": "Add Query", "Add Query": "Add Query",
"Remove Query": "Remove Query", "Remove Query": "Remove Query",
+1 -1
View File
@@ -1722,7 +1722,6 @@
"No available explorer": "No available explorer", "No available explorer": "No available explorer",
"New Explorer": "New Explorer", "New Explorer": "New Explorer",
"Untitled Explorer": "Untitled Explorer", "Untitled Explorer": "Untitled Explorer",
"More Explorer": "More Explorer",
"Save Explorer": "Save Explorer", "Save Explorer": "Save Explorer",
"Save As New Explorer": "Save As New Explorer", "Save As New Explorer": "Save As New Explorer",
"Restore to Last Saved": "Restore to Last Saved", "Restore to Last Saved": "Restore to Last Saved",
@@ -1732,6 +1731,7 @@
"Hide Explorer": "Hide Explorer", "Hide Explorer": "Hide Explorer",
"Unhide Explorer": "Unhide Explorer", "Unhide Explorer": "Unhide Explorer",
"Delete Explorer": "Delete Explorer", "Delete Explorer": "Delete Explorer",
"Change Explorer Display Order": "Change Explorer Display Order",
"Explorer Name": "Explorer Name", "Explorer Name": "Explorer Name",
"Add Query": "Add Query", "Add Query": "Add Query",
"Remove Query": "Remove Query", "Remove Query": "Remove Query",
+1 -1
View File
@@ -1722,7 +1722,6 @@
"No available explorer": "No available explorer", "No available explorer": "No available explorer",
"New Explorer": "New Explorer", "New Explorer": "New Explorer",
"Untitled Explorer": "Untitled Explorer", "Untitled Explorer": "Untitled Explorer",
"More Explorer": "More Explorer",
"Save Explorer": "Save Explorer", "Save Explorer": "Save Explorer",
"Save As New Explorer": "Save As New Explorer", "Save As New Explorer": "Save As New Explorer",
"Restore to Last Saved": "Restore to Last Saved", "Restore to Last Saved": "Restore to Last Saved",
@@ -1732,6 +1731,7 @@
"Hide Explorer": "Hide Explorer", "Hide Explorer": "Hide Explorer",
"Unhide Explorer": "Unhide Explorer", "Unhide Explorer": "Unhide Explorer",
"Delete Explorer": "Delete Explorer", "Delete Explorer": "Delete Explorer",
"Change Explorer Display Order": "Change Explorer Display Order",
"Explorer Name": "Explorer Name", "Explorer Name": "Explorer Name",
"Add Query": "Add Query", "Add Query": "Add Query",
"Remove Query": "Remove Query", "Remove Query": "Remove Query",
+1 -1
View File
@@ -1722,7 +1722,6 @@
"No available explorer": "No available explorer", "No available explorer": "No available explorer",
"New Explorer": "New Explorer", "New Explorer": "New Explorer",
"Untitled Explorer": "Untitled Explorer", "Untitled Explorer": "Untitled Explorer",
"More Explorer": "More Explorer",
"Save Explorer": "Save Explorer", "Save Explorer": "Save Explorer",
"Save As New Explorer": "Save As New Explorer", "Save As New Explorer": "Save As New Explorer",
"Restore to Last Saved": "Restore to Last Saved", "Restore to Last Saved": "Restore to Last Saved",
@@ -1732,6 +1731,7 @@
"Hide Explorer": "Hide Explorer", "Hide Explorer": "Hide Explorer",
"Unhide Explorer": "Unhide Explorer", "Unhide Explorer": "Unhide Explorer",
"Delete Explorer": "Delete Explorer", "Delete Explorer": "Delete Explorer",
"Change Explorer Display Order": "Change Explorer Display Order",
"Explorer Name": "Explorer Name", "Explorer Name": "Explorer Name",
"Add Query": "Add Query", "Add Query": "Add Query",
"Remove Query": "Remove Query", "Remove Query": "Remove Query",
+1 -1
View File
@@ -1722,7 +1722,6 @@
"No available explorer": "No available explorer", "No available explorer": "No available explorer",
"New Explorer": "New Explorer", "New Explorer": "New Explorer",
"Untitled Explorer": "Untitled Explorer", "Untitled Explorer": "Untitled Explorer",
"More Explorer": "More Explorer",
"Save Explorer": "Save Explorer", "Save Explorer": "Save Explorer",
"Save As New Explorer": "Save As New Explorer", "Save As New Explorer": "Save As New Explorer",
"Restore to Last Saved": "Restore to Last Saved", "Restore to Last Saved": "Restore to Last Saved",
@@ -1732,6 +1731,7 @@
"Hide Explorer": "Hide Explorer", "Hide Explorer": "Hide Explorer",
"Unhide Explorer": "Unhide Explorer", "Unhide Explorer": "Unhide Explorer",
"Delete Explorer": "Delete Explorer", "Delete Explorer": "Delete Explorer",
"Change Explorer Display Order": "Change Explorer Display Order",
"Explorer Name": "Explorer Name", "Explorer Name": "Explorer Name",
"Add Query": "Add Query", "Add Query": "Add Query",
"Remove Query": "Remove Query", "Remove Query": "Remove Query",
+1 -1
View File
@@ -1722,7 +1722,6 @@
"No available explorer": "No available explorer", "No available explorer": "No available explorer",
"New Explorer": "New Explorer", "New Explorer": "New Explorer",
"Untitled Explorer": "Untitled Explorer", "Untitled Explorer": "Untitled Explorer",
"More Explorer": "More Explorer",
"Save Explorer": "Save Explorer", "Save Explorer": "Save Explorer",
"Save As New Explorer": "Save As New Explorer", "Save As New Explorer": "Save As New Explorer",
"Restore to Last Saved": "Restore to Last Saved", "Restore to Last Saved": "Restore to Last Saved",
@@ -1732,6 +1731,7 @@
"Hide Explorer": "Hide Explorer", "Hide Explorer": "Hide Explorer",
"Unhide Explorer": "Unhide Explorer", "Unhide Explorer": "Unhide Explorer",
"Delete Explorer": "Delete Explorer", "Delete Explorer": "Delete Explorer",
"Change Explorer Display Order": "Change Explorer Display Order",
"Explorer Name": "Explorer Name", "Explorer Name": "Explorer Name",
"Add Query": "Add Query", "Add Query": "Add Query",
"Remove Query": "Remove Query", "Remove Query": "Remove Query",
+1 -1
View File
@@ -1722,7 +1722,6 @@
"No available explorer": "No available explorer", "No available explorer": "No available explorer",
"New Explorer": "New Explorer", "New Explorer": "New Explorer",
"Untitled Explorer": "Untitled Explorer", "Untitled Explorer": "Untitled Explorer",
"More Explorer": "More Explorer",
"Save Explorer": "Save Explorer", "Save Explorer": "Save Explorer",
"Save As New Explorer": "Save As New Explorer", "Save As New Explorer": "Save As New Explorer",
"Restore to Last Saved": "Restore to Last Saved", "Restore to Last Saved": "Restore to Last Saved",
@@ -1732,6 +1731,7 @@
"Hide Explorer": "Hide Explorer", "Hide Explorer": "Hide Explorer",
"Unhide Explorer": "Unhide Explorer", "Unhide Explorer": "Unhide Explorer",
"Delete Explorer": "Delete Explorer", "Delete Explorer": "Delete Explorer",
"Change Explorer Display Order": "Change Explorer Display Order",
"Explorer Name": "Explorer Name", "Explorer Name": "Explorer Name",
"Add Query": "Add Query", "Add Query": "Add Query",
"Remove Query": "Remove Query", "Remove Query": "Remove Query",
+1 -1
View File
@@ -1722,7 +1722,6 @@
"No available explorer": "No available explorer", "No available explorer": "No available explorer",
"New Explorer": "New Explorer", "New Explorer": "New Explorer",
"Untitled Explorer": "Untitled Explorer", "Untitled Explorer": "Untitled Explorer",
"More Explorer": "More Explorer",
"Save Explorer": "Save Explorer", "Save Explorer": "Save Explorer",
"Save As New Explorer": "Save As New Explorer", "Save As New Explorer": "Save As New Explorer",
"Restore to Last Saved": "Restore to Last Saved", "Restore to Last Saved": "Restore to Last Saved",
@@ -1732,6 +1731,7 @@
"Hide Explorer": "Hide Explorer", "Hide Explorer": "Hide Explorer",
"Unhide Explorer": "Unhide Explorer", "Unhide Explorer": "Unhide Explorer",
"Delete Explorer": "Delete Explorer", "Delete Explorer": "Delete Explorer",
"Change Explorer Display Order": "Change Explorer Display Order",
"Explorer Name": "Explorer Name", "Explorer Name": "Explorer Name",
"Add Query": "Add Query", "Add Query": "Add Query",
"Remove Query": "Remove Query", "Remove Query": "Remove Query",
+1 -1
View File
@@ -1722,7 +1722,6 @@
"No available explorer": "Na voljo ni nobenega raziskovanja", "No available explorer": "Na voljo ni nobenega raziskovanja",
"New Explorer": "Novo raziskovanje", "New Explorer": "Novo raziskovanje",
"Untitled Explorer": "Neimenovano raziskovanje", "Untitled Explorer": "Neimenovano raziskovanje",
"More Explorer": "Več raziskovanj",
"Save Explorer": "Shrani raziskovanje", "Save Explorer": "Shrani raziskovanje",
"Save As New Explorer": "Shrani kot novo raziskovanje", "Save As New Explorer": "Shrani kot novo raziskovanje",
"Restore to Last Saved": "Povrni na zadnje shranjeno stanje", "Restore to Last Saved": "Povrni na zadnje shranjeno stanje",
@@ -1732,6 +1731,7 @@
"Hide Explorer": "Skrij raziskovanje", "Hide Explorer": "Skrij raziskovanje",
"Unhide Explorer": "Razkrij raziskovanje", "Unhide Explorer": "Razkrij raziskovanje",
"Delete Explorer": "Izbriši raziskovanje", "Delete Explorer": "Izbriši raziskovanje",
"Change Explorer Display Order": "Change Explorer Display Order",
"Explorer Name": "Ime raziskovanja", "Explorer Name": "Ime raziskovanja",
"Add Query": "Dodaj poizvedbo", "Add Query": "Dodaj poizvedbo",
"Remove Query": "Odstrani poizvedbo", "Remove Query": "Odstrani poizvedbo",
+1 -1
View File
@@ -1722,7 +1722,6 @@
"No available explorer": "No available explorer", "No available explorer": "No available explorer",
"New Explorer": "New Explorer", "New Explorer": "New Explorer",
"Untitled Explorer": "Untitled Explorer", "Untitled Explorer": "Untitled Explorer",
"More Explorer": "More Explorer",
"Save Explorer": "Save Explorer", "Save Explorer": "Save Explorer",
"Save As New Explorer": "Save As New Explorer", "Save As New Explorer": "Save As New Explorer",
"Restore to Last Saved": "Restore to Last Saved", "Restore to Last Saved": "Restore to Last Saved",
@@ -1732,6 +1731,7 @@
"Hide Explorer": "Hide Explorer", "Hide Explorer": "Hide Explorer",
"Unhide Explorer": "Unhide Explorer", "Unhide Explorer": "Unhide Explorer",
"Delete Explorer": "Delete Explorer", "Delete Explorer": "Delete Explorer",
"Change Explorer Display Order": "Change Explorer Display Order",
"Explorer Name": "Explorer Name", "Explorer Name": "Explorer Name",
"Add Query": "Add Query", "Add Query": "Add Query",
"Remove Query": "Remove Query", "Remove Query": "Remove Query",
+1 -1
View File
@@ -1722,7 +1722,6 @@
"No available explorer": "No available explorer", "No available explorer": "No available explorer",
"New Explorer": "New Explorer", "New Explorer": "New Explorer",
"Untitled Explorer": "Untitled Explorer", "Untitled Explorer": "Untitled Explorer",
"More Explorer": "More Explorer",
"Save Explorer": "Save Explorer", "Save Explorer": "Save Explorer",
"Save As New Explorer": "Save As New Explorer", "Save As New Explorer": "Save As New Explorer",
"Restore to Last Saved": "Restore to Last Saved", "Restore to Last Saved": "Restore to Last Saved",
@@ -1732,6 +1731,7 @@
"Hide Explorer": "Hide Explorer", "Hide Explorer": "Hide Explorer",
"Unhide Explorer": "Unhide Explorer", "Unhide Explorer": "Unhide Explorer",
"Delete Explorer": "Delete Explorer", "Delete Explorer": "Delete Explorer",
"Change Explorer Display Order": "Change Explorer Display Order",
"Explorer Name": "Explorer Name", "Explorer Name": "Explorer Name",
"Add Query": "Add Query", "Add Query": "Add Query",
"Remove Query": "Remove Query", "Remove Query": "Remove Query",
+1 -1
View File
@@ -1722,7 +1722,6 @@
"No available explorer": "No available explorer", "No available explorer": "No available explorer",
"New Explorer": "New Explorer", "New Explorer": "New Explorer",
"Untitled Explorer": "Untitled Explorer", "Untitled Explorer": "Untitled Explorer",
"More Explorer": "More Explorer",
"Save Explorer": "Save Explorer", "Save Explorer": "Save Explorer",
"Save As New Explorer": "Save As New Explorer", "Save As New Explorer": "Save As New Explorer",
"Restore to Last Saved": "Restore to Last Saved", "Restore to Last Saved": "Restore to Last Saved",
@@ -1732,6 +1731,7 @@
"Hide Explorer": "Hide Explorer", "Hide Explorer": "Hide Explorer",
"Unhide Explorer": "Unhide Explorer", "Unhide Explorer": "Unhide Explorer",
"Delete Explorer": "Delete Explorer", "Delete Explorer": "Delete Explorer",
"Change Explorer Display Order": "Change Explorer Display Order",
"Explorer Name": "Explorer Name", "Explorer Name": "Explorer Name",
"Add Query": "Add Query", "Add Query": "Add Query",
"Remove Query": "Remove Query", "Remove Query": "Remove Query",
+1 -1
View File
@@ -1722,7 +1722,6 @@
"No available explorer": "No available explorer", "No available explorer": "No available explorer",
"New Explorer": "New Explorer", "New Explorer": "New Explorer",
"Untitled Explorer": "Untitled Explorer", "Untitled Explorer": "Untitled Explorer",
"More Explorer": "More Explorer",
"Save Explorer": "Save Explorer", "Save Explorer": "Save Explorer",
"Save As New Explorer": "Save As New Explorer", "Save As New Explorer": "Save As New Explorer",
"Restore to Last Saved": "Restore to Last Saved", "Restore to Last Saved": "Restore to Last Saved",
@@ -1732,6 +1731,7 @@
"Hide Explorer": "Hide Explorer", "Hide Explorer": "Hide Explorer",
"Unhide Explorer": "Unhide Explorer", "Unhide Explorer": "Unhide Explorer",
"Delete Explorer": "Delete Explorer", "Delete Explorer": "Delete Explorer",
"Change Explorer Display Order": "Change Explorer Display Order",
"Explorer Name": "Explorer Name", "Explorer Name": "Explorer Name",
"Add Query": "Add Query", "Add Query": "Add Query",
"Remove Query": "Remove Query", "Remove Query": "Remove Query",
+1 -1
View File
@@ -1722,7 +1722,6 @@
"No available explorer": "没有可用的探索", "No available explorer": "没有可用的探索",
"New Explorer": "新的探索", "New Explorer": "新的探索",
"Untitled Explorer": "未命名的探索", "Untitled Explorer": "未命名的探索",
"More Explorer": "更多探索",
"Save Explorer": "保存探索", "Save Explorer": "保存探索",
"Save As New Explorer": "另存为新的探索", "Save As New Explorer": "另存为新的探索",
"Restore to Last Saved": "恢复到上次保存", "Restore to Last Saved": "恢复到上次保存",
@@ -1732,6 +1731,7 @@
"Hide Explorer": "隐藏探索", "Hide Explorer": "隐藏探索",
"Unhide Explorer": "取消隐藏探索", "Unhide Explorer": "取消隐藏探索",
"Delete Explorer": "删除探索", "Delete Explorer": "删除探索",
"Change Explorer Display Order": "修改探索显示顺序",
"Explorer Name": "探索名称", "Explorer Name": "探索名称",
"Add Query": "添加查询", "Add Query": "添加查询",
"Remove Query": "移除查询", "Remove Query": "移除查询",
+1 -1
View File
@@ -1722,7 +1722,6 @@
"No available explorer": "沒有可用的探索", "No available explorer": "沒有可用的探索",
"New Explorer": "新的探索", "New Explorer": "新的探索",
"Untitled Explorer": "無標題的探索", "Untitled Explorer": "無標題的探索",
"More Explorer": "更多探索",
"Save Explorer": "儲存探索", "Save Explorer": "儲存探索",
"Save As New Explorer": "另存新探索", "Save As New Explorer": "另存新探索",
"Restore to Last Saved": "還原到上次儲存", "Restore to Last Saved": "還原到上次儲存",
@@ -1732,6 +1731,7 @@
"Hide Explorer": "隱藏探索", "Hide Explorer": "隱藏探索",
"Unhide Explorer": "取消隱藏探索", "Unhide Explorer": "取消隱藏探索",
"Delete Explorer": "刪除探索", "Delete Explorer": "刪除探索",
"Change Explorer Display Order": "變更探索顯示順序",
"Explorer Name": "探索名稱", "Explorer Name": "探索名稱",
"Add Query": "新增查詢", "Add Query": "新增查詢",
"Remove Query": "移除查詢", "Remove Query": "移除查詢",
+11
View File
@@ -423,6 +423,17 @@ html[dir="rtl"] .v-img.img-with-direction > img {
} }
} }
.scrollable-vertical-tabs.v-tabs {
.v-slide-group__prev,
.v-slide-group__next {
max-height: 16px;
}
&:not(:has(.v-slide-group__prev)) {
margin-top: 16px;
}
}
body .v-tabs:not(.v-tabs-pill) { body .v-tabs:not(.v-tabs-pill) {
&.v-tabs--vertical { &.v-tabs--vertical {
border-right: inherit; border-right: inherit;
+22 -35
View File
@@ -8,8 +8,13 @@
<btn-vertical-group :disabled="loading || updating" :buttons="allTabs" v-model="activeTab" /> <btn-vertical-group :disabled="loading || updating" :buttons="allTabs" v-model="activeTab" />
</div> </div>
<v-divider /> <v-divider />
<v-tabs show-arrows class="my-4" direction="vertical" :key="currentExplorer.id" <v-tabs show-arrows
:disabled="loading || updating" :model-value="currentExplorer.id"> class="scrollable-vertical-tabs"
style="max-height: calc(100% - 150px)"
direction="vertical"
:prev-icon="mdiMenuUp" :next-icon="mdiMenuDown"
:key="currentExplorer.id" :disabled="loading || updating"
:model-value="currentExplorer.id">
<v-tab class="tab-text-truncate" key="new" value="" @click="createNewExplorer"> <v-tab class="tab-text-truncate" key="new" value="" @click="createNewExplorer">
<span class="text-truncate">{{ tt('New Explorer') }}</span> <span class="text-truncate">{{ tt('New Explorer') }}</span>
</v-tab> </v-tab>
@@ -19,11 +24,10 @@
@click="loadExplorer(explorer.id)"> @click="loadExplorer(explorer.id)">
<span class="text-truncate">{{ explorer.name || tt('Untitled Explorer') }}</span> <span class="text-truncate">{{ explorer.name || tt('Untitled Explorer') }}</span>
</v-tab> </v-tab>
<v-btn class="text-left justify-start" variant="text" color="default" <template v-if="loading && (!allExplorers || allExplorers.length < 1)">
:disabled="loading || updating || !allExplorers || allExplorers.length < 1" :rounded="false" <v-skeleton-loader class="skeleton-no-margin mx-5 mt-4 mb-3" type="text"
@click="showAllExplorers"> :key="itemIdx" :loading="true" v-for="itemIdx in [ 1, 2, 3, 4, 5 ]"></v-skeleton-loader>
<span class="ps-2">{{ tt('More Explorer') }}</span> </template>
</v-btn>
</v-tabs> </v-tabs>
</v-navigation-drawer> </v-navigation-drawer>
<v-main> <v-main>
@@ -127,6 +131,11 @@
<v-list-item :prepend-icon="mdiDeleteOutline" @click="removeExplorer" v-if="currentExplorer.id"> <v-list-item :prepend-icon="mdiDeleteOutline" @click="removeExplorer" v-if="currentExplorer.id">
<v-list-item-title>{{ tt('Delete Explorer') }}</v-list-item-title> <v-list-item-title>{{ tt('Delete Explorer') }}</v-list-item-title>
</v-list-item> </v-list-item>
<v-divider class="my-2"/>
<v-list-item :prepend-icon="mdiSort"
:disabled="!allExplorers || allExplorers.length < 2"
:title="tt('Change Explorer Display Order')"
@click="showChangeExplorerDisplayOrderDialog"></v-list-item>
</v-list> </v-list>
</v-menu> </v-menu>
</v-btn> </v-btn>
@@ -215,6 +224,8 @@ import {
mdiMenu, mdiMenu,
mdiArrowLeft, mdiArrowLeft,
mdiArrowRight, mdiArrowRight,
mdiMenuUp,
mdiMenuDown,
mdiCheck, mdiCheck,
mdiRefresh, mdiRefresh,
mdiDotsVertical, mdiDotsVertical,
@@ -222,6 +233,7 @@ import {
mdiEyeOutline, mdiEyeOutline,
mdiEyeOffOutline, mdiEyeOffOutline,
mdiDeleteOutline, mdiDeleteOutline,
mdiSort,
mdiHomeClockOutline, mdiHomeClockOutline,
mdiInvoiceTextClockOutline, mdiInvoiceTextClockOutline,
mdiExport mdiExport
@@ -293,15 +305,10 @@ const firstDayOfWeek = computed<WeekDayValue>(() => userStore.currentUserFirstDa
const fiscalYearStart = computed<number>(() => userStore.currentUserFiscalYearStart); const fiscalYearStart = computed<number>(() => userStore.currentUserFiscalYearStart);
const allExplorers = computed<InsightsExplorerBasicInfo[]>(() => { const allExplorers = computed<InsightsExplorerBasicInfo[]>(() => {
const maximumExplorersToShow = 14;
const ret: InsightsExplorerBasicInfo[] = []; const ret: InsightsExplorerBasicInfo[] = [];
let hasCurrentExplorer = false; let hasCurrentExplorer = false;
for (const explorer of explorersStore.allInsightsExplorerBasicInfos) { for (const explorer of explorersStore.allInsightsExplorerBasicInfos) {
if (ret.length >= maximumExplorersToShow) {
break;
}
if (!explorer.hidden || (explorer.id && explorer.id === currentExplorer.value.id)) { if (!explorer.hidden || (explorer.id && explorer.id === currentExplorer.value.id)) {
ret.push(explorer); ret.push(explorer);
@@ -312,23 +319,7 @@ const allExplorers = computed<InsightsExplorerBasicInfo[]>(() => {
} }
if (!hasCurrentExplorer && currentExplorer.value && currentExplorer.value.id) { if (!hasCurrentExplorer && currentExplorer.value && currentExplorer.value.id) {
if (ret.length >= maximumExplorersToShow) { ret.push(InsightsExplorerBasicInfo.of(currentExplorer.value));
ret.pop();
}
let foundCurrentExplorer = false;
for (const explorer of explorersStore.allInsightsExplorerBasicInfos) {
if (explorer.id === currentExplorer.value.id) {
ret.push(explorer);
foundCurrentExplorer = true;
break;
}
}
if (!foundCurrentExplorer) {
ret.push(InsightsExplorerBasicInfo.of(currentExplorer.value));
}
} }
return ret; return ret;
@@ -506,12 +497,8 @@ function loadExplorer(explorerId: string, force?: boolean, init?: boolean): Prom
}); });
} }
function showAllExplorers(): void { function showChangeExplorerDisplayOrderDialog(): void {
explorerListDialog.value?.open().then((selectedExplorer: InsightsExplorerBasicInfo) => { explorerListDialog.value?.open().then(() => {
if (selectedExplorer) {
loadExplorer(selectedExplorer.id);
}
}).catch(() => {
if (explorersStore.insightsExplorerListStateInvalid) { if (explorersStore.insightsExplorerListStateInvalid) {
loading.value = true; loading.value = true;
@@ -63,8 +63,7 @@
<td> <td>
<div class="d-flex align-center"> <div class="d-flex align-center">
<div class="d-flex align-center"> <div class="d-flex align-center">
<span :class="loading || updating ? '' : 'cursor-pointer'" <span>{{ element.name }}</span>
@click="switchToExplorer(element)">{{ element.name }}</span>
</div> </div>
<v-spacer/> <v-spacer/>
@@ -131,8 +130,7 @@ const { tt } = useI18n();
const explorersStore = useExplorersStore(); const explorersStore = useExplorersStore();
let resolveFunc: ((explorer: InsightsExplorerBasicInfo) => void) | null = null; let resolveFunc: (() => void) | null = null;
let rejectFunc: ((reason?: unknown) => void) | null = null;
const snackbar = useTemplateRef<SnackBarType>('snackbar'); const snackbar = useTemplateRef<SnackBarType>('snackbar');
@@ -155,7 +153,7 @@ const noAvailableExplorer = computed<boolean>(() => {
return true; return true;
}); });
function open(): Promise<InsightsExplorerBasicInfo> { function open(): Promise<void> {
showHidden.value = false; showHidden.value = false;
showState.value = true; showState.value = true;
loading.value = true; loading.value = true;
@@ -173,9 +171,8 @@ function open(): Promise<InsightsExplorerBasicInfo> {
} }
}); });
return new Promise<InsightsExplorerBasicInfo>((resolve, reject) => { return new Promise<void>((resolve) => {
resolveFunc = resolve; resolveFunc = resolve;
rejectFunc = reject;
}); });
} }
@@ -241,21 +238,12 @@ function saveDisplayOrder(): void {
}); });
} }
function switchToExplorer(explorer: InsightsExplorerBasicInfo): void {
if (loading.value || updating.value) {
return;
}
resolveFunc?.(explorer);
showState.value = false;
}
function close(): void { function close(): void {
if (loading.value || updating.value) { if (loading.value || updating.value) {
return; return;
} }
rejectFunc?.(); resolveFunc?.();
showState.value = false; showState.value = false;
} }