-
-
Notifications
You must be signed in to change notification settings - Fork 123
/
Copy pathOutdatedModal.vue
41 lines (38 loc) · 1.1 KB
/
OutdatedModal.vue
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<template>
<BaseModal v-model="modal">
<template #title>🎉 {{ $t("components.app.outdated.new_version_available") }} 🎉</template>
<div class="p-4">
<p>{{ $t("components.app.outdated.current_version") }}: {{ current }}</p>
<p>{{ $t("components.app.outdated.latest_version") }}: {{ latest }}</p>
<p>
<a href="https://github.com/sysadminsmedia/homebox/releases" target="_blank" rel="noopener" class="link">
{{ $t("components.app.outdated.new_version_available_link") }}
</a>
</p>
</div>
<button class="btn btn-warning" @click="hide">
{{ $t("components.app.outdated.dismiss") }}
</button>
</BaseModal>
</template>
<script setup lang="ts">
const props = defineProps({
modelValue: {
type: Boolean,
required: true,
},
current: {
type: String,
required: true,
},
latest: {
type: String,
required: true,
},
});
const modal = useVModel(props, "modelValue");
const hide = () => {
modal.value = false;
localStorage.setItem("latestVersion", props.latest);
};
</script>