2424<template >
2525 <!-- Apps list -->
2626 <NcAppContent class="app-settings-content"
27- :page-heading =" pageHeading " >
28- <NcEmptyContent v-if =" isLoading "
27+ :page-heading =" appStoreLabel " >
28+ <h2 class =" app-settings-content__label" v-text =" viewLabel" />
29+
30+ <AppStoreDiscoverSection v-if =" currentCategory === ' discover' " />
31+ <NcEmptyContent v-else-if =" isLoading "
2932 class="empty-content__loading"
3033 :name =" t (' settings' , ' Loading app list' )" >
3134 <template #icon >
3841
3942<script setup lang="ts">
4043import { translate as t } from ' @nextcloud/l10n'
41- import { computed , getCurrentInstance , onBeforeMount , watch } from ' vue'
44+ import { computed , getCurrentInstance , onBeforeMount , watchEffect } from ' vue'
4245import { useRoute } from ' vue-router/composables'
43- import { APPS_SECTION_ENUM } from ' ../constants/AppsConstants.js '
46+
4447import { useAppsStore } from ' ../store/apps-store'
48+ import { APPS_SECTION_ENUM } from ' ../constants/AppsConstants'
4549
4650import NcAppContent from ' @nextcloud/vue/dist/Components/NcAppContent.js'
4751import NcEmptyContent from ' @nextcloud/vue/dist/Components/NcEmptyContent.js'
4852import NcLoadingIcon from ' @nextcloud/vue/dist/Components/NcLoadingIcon.js'
4953import AppList from ' ../components/AppList.vue'
54+ import AppStoreDiscoverSection from ' ../components/AppStoreDiscover/AppStoreDiscoverSection.vue'
5055
5156const route = useRoute ()
5257const store = useAppsStore ()
5358
5459/**
55- * ID of the current active category, default is `installed `
60+ * ID of the current active category, default is `discover `
5661 */
57- const currentCategory = computed (() => route .params ?.category ?? ' installed ' )
62+ const currentCategory = computed (() => route .params ?.category ?? ' discover ' )
5863
59- /**
60- * The H1 to be used on the website
61- */
62- const pageHeading = computed (() => {
63- if (currentCategory .value in APPS_SECTION_ENUM ) {
64- return APPS_SECTION_ENUM [currentCategory .value ]
65- }
66- const category = store .getCategoryById (currentCategory .value )
67- return category ?.displayName ?? t (' settings' , ' Apps' )
68- })
69- watch ([pageHeading ], () => {
70- window .document .title = ` ${pageHeading .value } - Apps - Nextcloud `
64+ const appStoreLabel = t (' settings' , ' App Store' )
65+ const viewLabel = computed (() => APPS_SECTION_ENUM [currentCategory .value ] ?? store .getCategoryById (currentCategory .value )?.displayName ?? appStoreLabel )
66+
67+ watchEffect (() => {
68+ window .document .title = ` ${viewLabel .value } - ${appStoreLabel } - Nextcloud `
7169})
7270
7371// TODO this part should be migrated to pinia
@@ -87,4 +85,12 @@ onBeforeMount(() => {
8785.empty-content__loading {
8886 height : 100% ;
8987}
88+
89+ .app-settings-content__label {
90+ margin-block-start : var (--app-navigation-padding );
91+ margin-inline-start : calc (var (--default-clickable-area ) + var (--app-navigation-padding ) * 2 );
92+ min-height : var (--default-clickable-area );
93+ line-height : var (--default-clickable-area );
94+ vertical-align : center ;
95+ }
9096 </style >
0 commit comments