Skip to content

Commit 4c1f061

Browse files
authored
Merge pull request #34084 from nextcloud/bundling-adjustments-25
Adjust recommended apps page
2 parents fde8c08 + 71eab82 commit 4c1f061

File tree

3 files changed

+38
-24
lines changed

3 files changed

+38
-24
lines changed

core/src/components/setup/RecommendedApps.vue

Lines changed: 35 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,26 @@
3333
</p>
3434

3535
<div v-for="app in recommendedApps" :key="app.id" class="app">
36-
<img :src="customIcon(app.id)" alt="">
37-
<div class="info">
38-
<h3>
39-
{{ app.name }}
40-
<span v-if="app.loading" class="icon icon-loading-small-dark" />
41-
<span v-else-if="app.active" class="icon icon-checkmark-white" />
42-
</h3>
43-
<p v-html="customDescription(app.id)" />
44-
<p v-if="app.installationError">
45-
<strong>{{ t('core', 'App download or installation failed') }}</strong>
46-
</p>
47-
<p v-else-if="!app.isCompatible">
48-
<strong>{{ t('core', 'Cannot install this app because it is not compatible') }}</strong>
49-
</p>
50-
<p v-else-if="!app.canInstall">
51-
<strong>{{ t('core', 'Cannot install this app') }}</strong>
52-
</p>
53-
</div>
36+
<template v-if="!isHidden(app.id)">
37+
<img :src="customIcon(app.id)" alt="">
38+
<div class="info">
39+
<h3>
40+
{{ customName(app) }}
41+
<span v-if="app.loading" class="icon icon-loading-small-dark" />
42+
<span v-else-if="app.active" class="icon icon-checkmark-white" />
43+
</h3>
44+
<p v-html="customDescription(app.id)" />
45+
<p v-if="app.installationError">
46+
<strong>{{ t('core', 'App download or installation failed') }}</strong>
47+
</p>
48+
<p v-else-if="!app.isCompatible">
49+
<strong>{{ t('core', 'Cannot install this app because it is not compatible') }}</strong>
50+
</p>
51+
<p v-else-if="!app.canInstall">
52+
<strong>{{ t('core', 'Cannot install this app') }}</strong>
53+
</p>
54+
</div>
55+
</template>
5456
</div>
5557

5658
<div class="dialog-row">
@@ -100,12 +102,12 @@ const recommended = {
100102
icon: imagePath('core', 'apps/spreed.svg'),
101103
},
102104
richdocuments: {
103-
description: t('core', 'Collaboratively edit office documents.'),
105+
name: 'Nextcloud Office',
106+
description: t('core', 'Collaborative documents, spreadsheets and presentations, built on Collabora Online.'),
104107
icon: imagePath('core', 'apps/richdocuments.svg'),
105108
},
106109
richdocumentscode: {
107-
description: t('core', 'Local document editing back-end used by the Collabora Online app.'),
108-
icon: imagePath('core', 'apps/richdocumentscode.svg'),
110+
hidden: true,
109111
},
110112
}
111113
const recommendedIds = Object.keys(recommended)
@@ -185,13 +187,25 @@ export default {
185187
}
186188
return recommended[appId].icon
187189
},
190+
customName(app) {
191+
if (!(app.id in recommended)) {
192+
return app.name
193+
}
194+
return recommended[app.id].name || app.name
195+
},
188196
customDescription(appId) {
189197
if (!(appId in recommended)) {
190198
logger.warn(`no app description for recommended app ${appId}`)
191199
return ''
192200
}
193201
return recommended[appId].description
194202
},
203+
isHidden(appId) {
204+
if (!(appId in recommended)) {
205+
return false
206+
}
207+
return !!recommended[appId].hidden
208+
},
195209
goTo(href) {
196210
window.location.href = href
197211
},

0 commit comments

Comments
 (0)