Skip to content

Commit

Permalink
feat: Adjust Default configuration on first Server startup - MEED-7833
Browse files Browse the repository at this point in the history
  • Loading branch information
boubaker committed Nov 22, 2024
1 parent 751f1e7 commit 2268b7d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ private Map<String, String> buildSpaceTemplateProperties(SpaceTemplate spaceTemp
Map<String, String> properties = new HashMap<>();
properties.put(SPACE_TEMPLATE_ID_PROP_NAME, String.valueOf(spaceTemplate.getId()));
properties.put(SPACES_LIMIT, String.valueOf(SPACES_LIMIT_DEFAULT));
properties.put(SPACES_SORT_BY, SidebarSpaceSortBy.TITLE.name());
properties.put(SPACES_SORT_BY, SidebarSpaceSortBy.LAST_ACCESS.name());
return properties;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public class NavigationConfigurationInitService {
@Value("${navigation.configuration.allowUserCustomHome:true}")
private boolean allowUserCustomHome;

@Value("${navigation.configuration.defaultMode:HIDDEN}")
@Value("${navigation.configuration.defaultMode:ICON}")
private SidebarMode defaultMode;

private List<TopbarApplication> defaultTopbarApplications;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
</template>
</div>
<div v-else-if="isSpaces || isSpaceTemplate">
<template v-if="item?.items?.length">
<v-list-item class="d-flex" dense>
<template v-if="item?.items?.length || isSpaces">
<v-list-item
class="d-flex"
dense>
<v-list-item-avatar min-width="36">
<v-icon size="18">{{ item.icon || 'fa-folder' }}</v-icon>
</v-list-item-avatar>
Expand All @@ -42,11 +44,13 @@
</v-list-item-title>
</v-list-item-content>
</v-list-item>
<portal-general-settings-navigation-settings-sidebar-preview-item
v-for="(subItem, index) in item.items"
:key="`${subItem.name}_${subItem.icon}_${index}`"
:settings="settings"
:item="subItem" />
<template v-if="item?.items?.length">
<portal-general-settings-navigation-settings-sidebar-preview-item
v-for="(subItem, index) in item.items"
:key="`${subItem.name}_${subItem.icon}_${index}`"
:settings="settings"
:item="subItem" />
</template>
</template>
</div>
<v-list-item
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<number-input
v-model="limit"
:step="1"
:min="1"
:min="minSpaces"
:max="10" />
</div>
</div>
Expand Down Expand Up @@ -141,6 +141,9 @@ export default {
spaceTemplate() {
return this.spaceTemplateId && this.spaceTemplates?.find?.(t => Number(t.id) === Number(this.spaceTemplateId)) || null;
},
minSpaces() {
return this.option === 'SPACES' ? 0 : 1;
},
disabled() {
return !this.modified
|| (this.option === 'SPACE_TEMPLATE' && !this.spaceTemplteId)
Expand Down

0 comments on commit 2268b7d

Please sign in to comment.