|
33 | 33 | </p> |
34 | 34 |
|
35 | 35 | <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> |
54 | 56 | </div> |
55 | 57 |
|
56 | 58 | <div class="dialog-row"> |
@@ -100,12 +102,12 @@ const recommended = { |
100 | 102 | icon: imagePath('core', 'apps/spreed.svg'), |
101 | 103 | }, |
102 | 104 | 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.'), |
104 | 107 | icon: imagePath('core', 'apps/richdocuments.svg'), |
105 | 108 | }, |
106 | 109 | 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, |
109 | 111 | }, |
110 | 112 | } |
111 | 113 | const recommendedIds = Object.keys(recommended) |
@@ -185,13 +187,25 @@ export default { |
185 | 187 | } |
186 | 188 | return recommended[appId].icon |
187 | 189 | }, |
| 190 | + customName(app) { |
| 191 | + if (!(app.id in recommended)) { |
| 192 | + return app.name |
| 193 | + } |
| 194 | + return recommended[app.id].name || app.name |
| 195 | + }, |
188 | 196 | customDescription(appId) { |
189 | 197 | if (!(appId in recommended)) { |
190 | 198 | logger.warn(`no app description for recommended app ${appId}`) |
191 | 199 | return '' |
192 | 200 | } |
193 | 201 | return recommended[appId].description |
194 | 202 | }, |
| 203 | + isHidden(appId) { |
| 204 | + if (!(appId in recommended)) { |
| 205 | + return false |
| 206 | + } |
| 207 | + return !!recommended[appId].hidden |
| 208 | + }, |
195 | 209 | goTo(href) { |
196 | 210 | window.location.href = href |
197 | 211 | }, |
|
0 commit comments