diff options
author | Vincent Petry <vincent@nextcloud.com> | 2022-09-15 10:22:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-15 10:22:47 +0200 |
commit | 4c1f06170e1f7256bdc0791c40359c5ab6ad5eda (patch) | |
tree | c34bead43ae5cb0346e7f5fa2fb1e5e29bf343e9 /core | |
parent | fde8c081d8d58f92e156628f5b6f2bfd5f5a0272 (diff) | |
parent | 71eab821173e3ad7a336f34675266f7094cc858f (diff) | |
download | nextcloud-server-4c1f06170e1f7256bdc0791c40359c5ab6ad5eda.tar.gz nextcloud-server-4c1f06170e1f7256bdc0791c40359c5ab6ad5eda.zip |
Merge pull request #34084 from nextcloud/bundling-adjustments-25
Adjust recommended apps page
Diffstat (limited to 'core')
-rw-r--r-- | core/src/components/setup/RecommendedApps.vue | 56 |
1 files changed, 35 insertions, 21 deletions
diff --git a/core/src/components/setup/RecommendedApps.vue b/core/src/components/setup/RecommendedApps.vue index 1582658d37e..6b81106ff72 100644 --- a/core/src/components/setup/RecommendedApps.vue +++ b/core/src/components/setup/RecommendedApps.vue @@ -33,24 +33,26 @@ </p> <div v-for="app in recommendedApps" :key="app.id" class="app"> - <img :src="customIcon(app.id)" alt=""> - <div class="info"> - <h3> - {{ app.name }} - <span v-if="app.loading" class="icon icon-loading-small-dark" /> - <span v-else-if="app.active" class="icon icon-checkmark-white" /> - </h3> - <p v-html="customDescription(app.id)" /> - <p v-if="app.installationError"> - <strong>{{ t('core', 'App download or installation failed') }}</strong> - </p> - <p v-else-if="!app.isCompatible"> - <strong>{{ t('core', 'Cannot install this app because it is not compatible') }}</strong> - </p> - <p v-else-if="!app.canInstall"> - <strong>{{ t('core', 'Cannot install this app') }}</strong> - </p> - </div> + <template v-if="!isHidden(app.id)"> + <img :src="customIcon(app.id)" alt=""> + <div class="info"> + <h3> + {{ customName(app) }} + <span v-if="app.loading" class="icon icon-loading-small-dark" /> + <span v-else-if="app.active" class="icon icon-checkmark-white" /> + </h3> + <p v-html="customDescription(app.id)" /> + <p v-if="app.installationError"> + <strong>{{ t('core', 'App download or installation failed') }}</strong> + </p> + <p v-else-if="!app.isCompatible"> + <strong>{{ t('core', 'Cannot install this app because it is not compatible') }}</strong> + </p> + <p v-else-if="!app.canInstall"> + <strong>{{ t('core', 'Cannot install this app') }}</strong> + </p> + </div> + </template> </div> <div class="dialog-row"> @@ -100,12 +102,12 @@ const recommended = { icon: imagePath('core', 'apps/spreed.svg'), }, richdocuments: { - description: t('core', 'Collaboratively edit office documents.'), + name: 'Nextcloud Office', + description: t('core', 'Collaborative documents, spreadsheets and presentations, built on Collabora Online.'), icon: imagePath('core', 'apps/richdocuments.svg'), }, richdocumentscode: { - description: t('core', 'Local document editing back-end used by the Collabora Online app.'), - icon: imagePath('core', 'apps/richdocumentscode.svg'), + hidden: true, }, } const recommendedIds = Object.keys(recommended) @@ -185,6 +187,12 @@ export default { } return recommended[appId].icon }, + customName(app) { + if (!(app.id in recommended)) { + return app.name + } + return recommended[app.id].name || app.name + }, customDescription(appId) { if (!(appId in recommended)) { logger.warn(`no app description for recommended app ${appId}`) @@ -192,6 +200,12 @@ export default { } return recommended[appId].description }, + isHidden(appId) { + if (!(appId in recommended)) { + return false + } + return !!recommended[appId].hidden + }, goTo(href) { window.location.href = href }, |