Skip to content

Commit 89b5e5a

Browse files
committed
Fixed: alert close
1 parent b37bf89 commit 89b5e5a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

ui/components/Main/main.vue

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ const clearSelectionCallback = ref<(() => void) | null>(null);
88
const { t } = useI18n();
99
const latestVersion = ref("");
1010
const alertType = ref<"" | alertType>("");
11+
const isAlertOpen = ref(false);
1112
1213
const description = computed(() => {
1314
if (alertType.value === "incompatible") return t("Login.VersionIncompatible");
@@ -27,6 +28,7 @@ const providerClearSelection = (callback: () => void) => {
2728
2829
useEventBus().on("versionAlert", ({ type, version }: { type: string; version?: string }) => {
2930
alertType.value = type as alertType;
31+
isAlertOpen.value = true;
3032
3133
if (version) {
3234
latestVersion.value = version;
@@ -62,7 +64,8 @@ provide("providerClearSelection", providerClearSelection);
6264
</template>
6365

6466
<UAlert
65-
v-if="description"
67+
v-if="description && isAlertOpen"
68+
v-model:open="isAlertOpen"
6669
close
6770
color="primary"
6871
variant="soft"

0 commit comments

Comments
 (0)