From e8ce2647f850ba7d5720a9dd2d7417f9f9849433 Mon Sep 17 00:00:00 2001 From: kozakura913 <98575220+kozakura913@users.noreply.github.com> Date: Fri, 13 Dec 2024 15:53:43 +0900 Subject: [PATCH] fix --- packages/frontend/src/pages/admin/update.vue | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/packages/frontend/src/pages/admin/update.vue b/packages/frontend/src/pages/admin/update.vue index 1ca7ae0963..f1567212f6 100644 --- a/packages/frontend/src/pages/admin/update.vue +++ b/packages/frontend/src/pages/admin/update.vue @@ -24,11 +24,11 @@ SPDX-License-Identifier: AGPL-3.0-only - + - + @@ -99,9 +99,8 @@ import MkButton from '@/components/MkButton.vue'; const enableReceivePrerelease = ref(false); const skipVersion = ref(false); const skipCherryPickVersion = ref(null); -const skipYojoArtVersion = ref(null); -const releasesYojoArt = ref(null); +const releasesYojoArt = ref([]); const releasesCherryPick = ref(null); const releasesMisskey = ref(null); @@ -110,8 +109,7 @@ const meta = await misskeyApi('admin/meta'); async function init() { enableReceivePrerelease.value = meta.enableReceivePrerelease; skipVersion.value = meta.skipVersion; - skipCherryPickVersion.value = meta.skipCherryPickVersion; - skipYojoArtVersion.value = meta.skipYojoArtVersion; + skipCherryPickVersion.value = meta.skipCherryPickVersion ?? null; try { // yojo-art Releases Fetch @@ -119,7 +117,7 @@ async function init() { const yojoArtData = await yojoArtResponse.json(); releasesYojoArt.value = meta.enableReceivePrerelease ? yojoArtData : yojoArtData.filter(x => !x.prerelease); - if (compareVersions(skipYojoArtVersion.value, releasesYojoArt.value[0].tag_name) < 0) { + if (compareVersions(skipCherryPickVersion.value ?? '0.0.0', releasesYojoArt.value[0].tag_name) < 0) { skipVersion.value = false; await misskeyApi('admin/update-meta', { skipVersion: skipVersion.value }); } @@ -168,12 +166,12 @@ function save() { } function skipThisVersion() { - skipYojoArtVersion.value = releasesYojoArt.value[0].tag_name; + skipCherryPickVersion.value = releasesYojoArt.value[0].tag_name; skipVersion.value = true; os.apiWithDialog('admin/update-meta', { skipVersion: skipVersion.value, - skipYojoArtVersion: skipYojoArtVersion.value, + skipCherrypickVersion: skipCherryPickVersion.value, }).then(() => { fetchInstance(true); });