mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
appv2: notifications type are now uppercase eg pre_install -> PRE_INSTALL to reflect the filenames
This commit is contained in:
parent
1f5ecb2436
commit
d26a105326
4 changed files with 10 additions and 10 deletions
|
@ -68,8 +68,8 @@
|
|||
},
|
||||
"notifications": {
|
||||
"title": "Notifications",
|
||||
"post_upgrade": "Post-upgrade notifications",
|
||||
"post_install": "Post-install notifications"
|
||||
"POST_UPGRADE": "Post-upgrade notifications",
|
||||
"POST_INSTALL": "Post-install notifications"
|
||||
}
|
||||
},
|
||||
"info": {
|
||||
|
|
|
@ -160,7 +160,7 @@
|
|||
<b-tabs card fill pills>
|
||||
<b-tab v-if="app.doc.notifications" :title="$t('app.doc.notifications.title')" active>
|
||||
<section v-if="app.doc.notifications.postUpgrade.length">
|
||||
<b-card-title title-tag="h3" v-t="'app.doc.notifications.post_upgrade'" />
|
||||
<b-card-title title-tag="h3" v-t="'app.doc.notifications.POST_UPGRADE'" />
|
||||
|
||||
<div
|
||||
v-for="[name, notif] in app.doc.notifications.postUpgrade" :key="name"
|
||||
|
@ -174,7 +174,7 @@
|
|||
|
||||
<section v-if="app.doc.notifications.postInstall.length">
|
||||
<b-card-title title-tag="h3">
|
||||
{{ $t('app.doc.notifications.post_install') }}
|
||||
{{ $t('app.doc.notifications.POST_INSTALL') }}
|
||||
</b-card-title>
|
||||
|
||||
<div
|
||||
|
@ -385,8 +385,8 @@ export default {
|
|||
].filter(([key, val]) => !!val),
|
||||
doc: {
|
||||
notifications: {
|
||||
postInstall: notifs.post_install.main ? [['main', formatI18nField(notifs.post_install.main)]] : [],
|
||||
postUpgrade: Object.entries(notifs.post_upgrade).map(([key, content]) => {
|
||||
postInstall: notifs.POST_INSTALL.main ? [['main', formatI18nField(notifs.POST_INSTALL.main)]] : [],
|
||||
postUpgrade: Object.entries(notifs.POST_UPGRADE).map(([key, content]) => {
|
||||
return [key, formatI18nField(content)]
|
||||
})
|
||||
},
|
||||
|
|
|
@ -232,7 +232,7 @@ export default {
|
|||
quality.state = _app.quality.level >= 8 ? 'highquality' : 'goodquality'
|
||||
}
|
||||
}
|
||||
const preInstall = formatI18nField(_app.notifications.pre_install.main)
|
||||
const preInstall = formatI18nField(_app.notifications.PRE_INSTALL.main)
|
||||
const antifeatures = _app.antifeatures?.length
|
||||
? _app.antifeatures.map((af) => antifeaturesList[af])
|
||||
: null
|
||||
|
|
|
@ -165,8 +165,8 @@ export default {
|
|||
const apps = appList.map((app) => ({
|
||||
id: app.id,
|
||||
name: app.name,
|
||||
notif: app.notifications.pre_upgrade
|
||||
? this.formatAppNotifs(app.notifications.pre_upgrade)
|
||||
notif: app.notifications.PRE_UPGRADE
|
||||
? this.formatAppNotifs(app.notifications.PRE_UPGRADE)
|
||||
: ''
|
||||
}))
|
||||
this.preUpgrade = { apps, hasNotifs: apps.some((app) => app.notif) }
|
||||
|
@ -181,7 +181,7 @@ export default {
|
|||
const continue_ = await api.put(
|
||||
`apps/${app.id}/upgrade`, {}, { key: 'upgrade.app', app: app.name }
|
||||
).then((response) => {
|
||||
const postMessage = this.formatAppNotifs(response.notifications.post_upgrade)
|
||||
const postMessage = this.formatAppNotifs(response.notifications.POST_UPGRADE)
|
||||
const isLast = app.id === lastAppId
|
||||
this.apps = this.apps.filter((a) => app.id !== a.id)
|
||||
|
||||
|
|
Loading…
Reference in a new issue