From cc21ed354be1b30b5e6829986dbc2f62ebef0db5 Mon Sep 17 00:00:00 2001 From: Andrew Kingston Date: Fri, 21 May 2021 10:37:19 +0100 Subject: [PATCH] Improve app list empty state screen and fix order of app context menu options --- .../src/components/start/AppCard.svelte | 14 ++-- .../src/components/start/AppRow.svelte | 21 ++--- .../pages/builder/portal/apps/index.svelte | 79 +++++++++---------- 3 files changed, 58 insertions(+), 56 deletions(-) diff --git a/packages/builder/src/components/start/AppCard.svelte b/packages/builder/src/components/start/AppCard.svelte index 6f0dcdb640..dc1043c09e 100644 --- a/packages/builder/src/components/start/AppCard.svelte +++ b/packages/builder/src/components/start/AppCard.svelte @@ -39,23 +39,25 @@ viewApp(app)} icon="GlobeOutline"> View published app - unpublishApp(app)} icon="GlobeRemove"> - Unpublish - {/if} {#if app.lockedBy && app.lockedBy?.email === $auth.user?.email} releaseLock(app)} icon="LockOpen"> Release lock {/if} + exportApp(app)} icon="Download"> + Export + + {#if app.deployed} + unpublishApp(app)} icon="GlobeRemove"> + Unpublish + + {/if} {#if !app.deployed} deleteApp(app)} icon="Delete"> Delete {/if} - exportApp(app)} icon="Download"> - Export -
diff --git a/packages/builder/src/components/start/AppRow.svelte b/packages/builder/src/components/start/AppRow.svelte index e5eaac98ba..460c4a8df5 100644 --- a/packages/builder/src/components/start/AppRow.svelte +++ b/packages/builder/src/components/start/AppRow.svelte @@ -17,10 +17,9 @@ export let deleteApp export let unpublishApp export let releaseLock - export let last -
+
editApp(app)}> @@ -28,10 +27,10 @@
-
+
Updated {Math.round(Math.random() * 10 + 1)} months ago
-
+
-
+
{#if app.deployed}Published{:else}Unpublished{/if}
-
+
diff --git a/packages/builder/src/pages/builder/portal/apps/index.svelte b/packages/builder/src/pages/builder/portal/apps/index.svelte index 13282f6d64..1729efe101 100644 --- a/packages/builder/src/pages/builder/portal/apps/index.svelte +++ b/packages/builder/src/pages/builder/portal/apps/index.svelte @@ -179,47 +179,47 @@ - -
- Apps - - - - -
-
-
- +
+ + (layout = "grid")} + selected={layout === "grid"} + quiet + icon="ClassicGridView" + /> + (layout = "table")} + selected={layout === "table"} + quiet + icon="ViewRow" + /> +
- - (layout = "grid")} - selected={layout === "grid"} - quiet - icon="ClassicGridView" - /> - (layout = "table")} - selected={layout === "table"} - quiet - icon="ViewRow" - /> - -
- {#if loaded && enrichedApps.length}
- {#each enrichedApps as app, idx (app.appId)} + {#each enrichedApps as app (app.appId)} {/each}
- {/if} - + + {/if} {#if !enrichedApps.length && !creatingApp && loaded}
@@ -318,7 +317,7 @@ text-overflow: ellipsis; padding: 0 var(--spacing-s); } - .appTable :global(> div:not(.last)) { + .appTable :global(> div) { border-bottom: var(--border-light); } .empty-wrapper {