From f7d7bcec2d1f9715a8e297e7408d6c3013a800c2 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Mon, 17 Oct 2022 16:49:51 +0200 Subject: [PATCH] update view: add a note to encourage people to check the release note on the forum when there's a major yunohost upgrade before yoloupgrading --- app/src/i18n/locales/en.json | 1 + app/src/views/update/SystemUpdate.vue | 22 +++++++++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/app/src/i18n/locales/en.json b/app/src/i18n/locales/en.json index 5062e796..53e10bc9 100644 --- a/app/src/i18n/locales/en.json +++ b/app/src/i18n/locales/en.json @@ -265,6 +265,7 @@ "id": "ID", "ignore": "Ignore", "ignored": "{count} ignored", + "important_yunohost_upgrade": "A major YunoHost upgrade is available. It is heavily recommended to carefully read the release note(s) on the forum before upgrading : Browse the release notes on the forum", "infos": "Info", "install": "Install", "install_name": "Install {id}", diff --git a/app/src/views/update/SystemUpdate.vue b/app/src/views/update/SystemUpdate.vue index 05c23871..1126e8af 100644 --- a/app/src/views/update/SystemUpdate.vue +++ b/app/src/views/update/SystemUpdate.vue @@ -4,17 +4,22 @@ skeleton="card-list-skeleton" > - + + + + + +
{{ name }} - ({{ $t('from_to', [current_version, new_version]) }}) + ({{ $t('from_to', [current_version, new_version]) }})
@@ -73,21 +78,24 @@ export default { data () { return { queries: [ - ['GET', 'migrations?pending'], ['PUT', 'update/all', {}, 'update'] ], // API data - migrationsNotDone: undefined, system: undefined, - apps: undefined + apps: undefined, + importantYunohostUpgrade: undefined, + pendingMigrations: undefined } }, methods: { - onQueriesResponse ({ migrations }, { apps, system }) { - this.migrationsNotDone = migrations.length !== 0 + // eslint-disable-next-line camelcase + onQueriesResponse ({ apps, system, important_yunohost_upgrade, pending_migrations }) { this.apps = apps.length ? apps : null this.system = system.length ? system : null + // eslint-disable-next-line camelcase + this.importantYunohostUpgrade = important_yunohost_upgrade + this.pendingMigrations = pending_migrations.length !== 0 }, async performUpgrade ({ type, id = null }) {