From 7089f4f1b7c4970d5ccb4ac6f2bff19faad27e09 Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Wed, 7 Sep 2022 13:11:34 +0800 Subject: [PATCH 01/10] fix: release info style & hide menu --- .../nc-gui/components/general/ReleaseInfo.vue | 30 +++++++++++-------- 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/packages/nc-gui/components/general/ReleaseInfo.vue b/packages/nc-gui/components/general/ReleaseInfo.vue index fccb4cc566..e682ad30ed 100644 --- a/packages/nc-gui/components/general/ReleaseInfo.vue +++ b/packages/nc-gui/components/general/ReleaseInfo.vue @@ -6,13 +6,19 @@ const { $api } = useNuxtApp() const { currentVersion, latestRelease, hiddenRelease } = useGlobal() -const releaseAlert = computed( - () => - currentVersion.value && - latestRelease.value && - currentVersion.value !== latestRelease.value && - latestRelease.value !== hiddenRelease.value, -) +const releaseAlert = computed({ + get() { + return ( + currentVersion.value && + latestRelease.value && + currentVersion.value !== latestRelease.value && + latestRelease.value !== hiddenRelease.value + ) + }, + set(val) { + hiddenRelease.value = val ? null : latestRelease.value + }, +}) async function fetchReleaseInfo() { try { @@ -35,7 +41,7 @@ onMounted(async () => await fetchReleaseInfo())