From ff48c88d0dd0b00fef36fc01ad7fae7d5eafc8a4 Mon Sep 17 00:00:00 2001 From: John Obelenus Date: Tue, 25 Jun 2024 15:36:14 -0400 Subject: [PATCH] Fix authoring empty states when selecting multiple assets --- app/web/src/components/AssetEditorTabs.vue | 12 ++++++++++- app/web/src/components/AssetFuncListPanel.vue | 20 +++++++++++++------ .../WorkspaceCustomizeEmptyState.vue | 9 ++++++++- 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/app/web/src/components/AssetEditorTabs.vue b/app/web/src/components/AssetEditorTabs.vue index 344532aa90..953bb5f71a 100644 --- a/app/web/src/components/AssetEditorTabs.vue +++ b/app/web/src/components/AssetEditorTabs.vue @@ -14,6 +14,11 @@ { - if (!requestStatus.isSuccess || !assetId) { + // no asset/multiple assets selected, don't show tabs + if (!assetId) { + currentTabs.value = []; + return; + } + if (!requestStatus.isSuccess) { return; } diff --git a/app/web/src/components/AssetFuncListPanel.vue b/app/web/src/components/AssetFuncListPanel.vue index 2a9cf250f7..629e95ddc8 100644 --- a/app/web/src/components/AssetFuncListPanel.vue +++ b/app/web/src/components/AssetFuncListPanel.vue @@ -25,12 +25,20 @@ context="workspace-lab-assets" defaultOpen /> - + diff --git a/app/web/src/components/WorkspaceCustomizeEmptyState.vue b/app/web/src/components/WorkspaceCustomizeEmptyState.vue index f631ed2cf0..285555e5c3 100644 --- a/app/web/src/components/WorkspaceCustomizeEmptyState.vue +++ b/app/web/src/components/WorkspaceCustomizeEmptyState.vue @@ -13,7 +13,7 @@
- Use the left panel to get started! + {{ $props.instructions }}
, required: true }, loadingMessage: { type: String, required: true }, + instructions: { + type: String, + required: false, + default() { + return "Use the left panel to get started!"; + }, + }, });