diff --git a/models/card/src/index.ts b/models/card/src/index.ts
index eea197503b2..fa6539429f7 100644
--- a/models/card/src/index.ts
+++ b/models/card/src/index.ts
@@ -472,7 +472,7 @@ export function createModel (builder: Builder): void {
_class: card.class.Card,
icon: card.icon.All,
label: card.string.AllCards,
- defaultViewletDescriptor: card.viewlet.CardFeedDescriptor
+ defaultViewletDescriptor: view.viewlet.Table
},
position: 'top'
},
@@ -491,7 +491,17 @@ export function createModel (builder: Builder): void {
position: 'top'
}
],
- spaces: [],
+ spaces: [
+ {
+ id: 'spaces',
+ label: core.string.Spaces,
+ spaceClass: card.class.CardSpace,
+ addSpaceLabel: core.string.Space,
+ icon: card.icon.Space,
+ // intentionally left empty in order to make space presenter working
+ specials: []
+ }
+ ],
groups: [
{
id: 'types',
@@ -503,14 +513,12 @@ export function createModel (builder: Builder): void {
{
id: 'type',
label: card.string.Cards,
- component: card.component.Main,
- componentProps: {
- defaultViewletDescriptor: card.viewlet.CardFeedDescriptor
- }
+ component: card.component.Main
}
]
}
- ]
+ ],
+ hideStarred: true
},
navHeaderActions: card.component.CardHeaderButton
},
diff --git a/plugins/card-resources/src/components/Favorites.svelte b/plugins/card-resources/src/components/Favorites.svelte
index f9ae52af8cf..87d7fc6fecd 100644
--- a/plugins/card-resources/src/components/Favorites.svelte
+++ b/plugins/card-resources/src/components/Favorites.svelte
@@ -26,6 +26,5 @@
_class={card.class.FavoriteCard}
icon={view.icon.Star}
label={preference.string.Starred}
- defaultViewletDescriptor={view.viewlet.List}
baseQuery={{ application }}
/>
diff --git a/plugins/card-resources/src/components/Main.svelte b/plugins/card-resources/src/components/Main.svelte
index 340fc0850e5..c78fa887a40 100644
--- a/plugins/card-resources/src/components/Main.svelte
+++ b/plugins/card-resources/src/components/Main.svelte
@@ -14,7 +14,7 @@
-->
-
+
{#if favoriteRootClasses.length > 0}
{
selectType(e.detail)
@@ -152,7 +153,7 @@
allClasses={classes}
{_class}
space={undefined}
- currentSpace={undefined}
+ {currentSpace}
{getItemActions}
excludedClasses={favoriteTypes}
on:select={(e) => {
diff --git a/plugins/workbench-resources/src/components/Navigator.svelte b/plugins/workbench-resources/src/components/Navigator.svelte
index 8126c5bf072..ca09ae04e37 100644
--- a/plugins/workbench-resources/src/components/Navigator.svelte
+++ b/plugins/workbench-resources/src/components/Navigator.svelte
@@ -81,8 +81,8 @@
let requestIndex = 0
async function update (model: NavigatorModel, spaces: Space[], preferences: Map[, SpacePreference>) {
- shownSpaces = spaces.filter((sp) => !sp.archived && !preferences.has(sp._id))
- starred = spaces.filter((sp) => preferences.has(sp._id))
+ shownSpaces = spaces.filter((sp) => !sp.archived && (model.hideStarred || !preferences.has(sp._id)))
+ starred = model.hideStarred ? [] : spaces.filter((sp) => preferences.has(sp._id))
if (model.specials !== undefined) {
const [sp, resIndex] = await updateSpecials(model.specials, spaces, ++requestIndex)
if (resIndex !== requestIndex) return
@@ -173,7 +173,7 @@
(menuSelection = res.detail)} />
- {#if starred.length}
+ {#if starred.length > 0 && !model.hideStarred}
{/if}
+ {#if model.groups && model.groups.length > 0}
+
+ {#each model.groups as group (group.id)}
+ {#if group.component}
+
+ {/if}
+ {/each}
+ {/if}
+
{#each model.spaces as m (m.label)}
hierarchy.isDerived(it._class, m.spaceClass))}
@@ -198,14 +207,5 @@
deselect={menuSelection || starred.some((s) => s._id === currentSpace)}
/>
{/each}
-
- {#if model.groups && model.groups.length > 0}
-
- {#each model.groups as group (group.id)}
- {#if group.component}
-
- {/if}
- {/each}
- {/if}
{/if}
diff --git a/plugins/workbench/src/types.ts b/plugins/workbench/src/types.ts
index 981533013a3..f15bf520815 100644
--- a/plugins/workbench/src/types.ts
+++ b/plugins/workbench/src/types.ts
@@ -159,6 +159,7 @@ export interface NavigatorModel {
spaces: SpacesNavModel[]
specials?: SpecialNavModel[]
groups?: GroupsNavModel[]
+ hideStarred?: boolean
}
/** @public */
]