feat: update button (download, verify, stage)
This commit is contained in:
1 parent
834493a4f5
commit
70460e4170
41 files changed
+5345
-97
No files matched your search
@@ -115,6 +115,23 @@ function onArticleCreated(article: Article) {
|
||||
})
|
||||
}
|
||||
|
||||
const readyBannerDismissed = ref(false)
|
||||
|
||||
const bannerState = computed(() => {
|
||||
if (update.readyToInstall) {
|
||||
return readyBannerDismissed.value ? null : 'ready'
|
||||
}
|
||||
return update.bannerVisible ? 'available' : null
|
||||
})
|
||||
|
||||
function dismissBanner() {
|
||||
if (bannerState.value === 'ready') {
|
||||
readyBannerDismissed.value = true
|
||||
return
|
||||
}
|
||||
update.dismissBanner()
|
||||
}
|
||||
|
||||
watch(
|
||||
() => update.isOwner,
|
||||
(isOwner) => {
|
||||
@@ -160,11 +177,11 @@ onMounted(loadArticles)
|
||||
</div>
|
||||
|
||||
<UpdateBanner
|
||||
v-if="update.bannerVisible && update.status"
|
||||
state="available"
|
||||
v-if="bannerState && update.status"
|
||||
:state="bannerState"
|
||||
:version="displayVersion(update.status.latest)"
|
||||
@go-to-settings="router.push('/settings')"
|
||||
@dismiss="update.dismissBanner"
|
||||
@dismiss="dismissBanner"
|
||||
/>
|
||||
|
||||
<template v-if="(loadState === 'loading' && showSkeleton) || loadState === 'default'">
|
||||
|
||||
Reference in new issue
Block a user