fix(ui): distinguish loading, failed and empty lists, one role label set, en dash for no value
This commit is contained in:
1 parent
5fdac53ca5
commit
c67d475a92
16 files changed
+95
-46
No files matched your search
@@ -30,6 +30,7 @@ const id = ref("");
|
||||
const name = ref("");
|
||||
const environment = ref("");
|
||||
const error = ref("");
|
||||
const loading = ref(true);
|
||||
const busy = ref(false);
|
||||
|
||||
async function load(): Promise<void> {
|
||||
@@ -47,11 +48,12 @@ async function load(): Promise<void> {
|
||||
onMounted(async () => {
|
||||
try {
|
||||
await orgStore.loadOrg();
|
||||
await load();
|
||||
} catch (cause) {
|
||||
error.value = String((cause as Error).message || cause);
|
||||
return;
|
||||
} finally {
|
||||
loading.value = false;
|
||||
}
|
||||
await load();
|
||||
});
|
||||
|
||||
async function create(): Promise<void> {
|
||||
@@ -98,7 +100,10 @@ async function create(): Promise<void> {
|
||||
<TableCell class="font-medium">{{ workspace.name }}</TableCell>
|
||||
<TableCell class="text-fg-subtle">{{ workspace.environment || "–" }}</TableCell>
|
||||
</TableRow>
|
||||
<TableRow v-if="!workspaces.length">
|
||||
<TableRow v-if="loading">
|
||||
<TableCell colspan="3" class="text-sm text-fg-muted" role="status">Loading workspaces…</TableCell>
|
||||
</TableRow>
|
||||
<TableRow v-else-if="!workspaces.length && !error">
|
||||
<TableCell colspan="3">
|
||||
<Empty class="py-6">
|
||||
<EmptyHeader>
|
||||
|
||||
Reference in new issue
Block a user