Update version number in package.json and Welcome.vue
This commit is contained in:
parent
117c192c33
commit
df130784bd
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "eis",
|
"name": "eis",
|
||||||
"version": "0.0.1",
|
"version": "0.0.111",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
|
@ -129,6 +129,7 @@
|
|||||||
<dt class="text-xs text-center text-gray-500">
|
<dt class="text-xs text-center text-gray-500">
|
||||||
Copyright © 2023 PT PLN (Persero). All Rights Reserved
|
Copyright © 2023 PT PLN (Persero). All Rights Reserved
|
||||||
</dt>
|
</dt>
|
||||||
|
<dt class="mt-4 text-xs font-bold text-center text-gray-800">Version {{ version }}</dt>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@ -142,6 +143,7 @@ import { type RouteRecordRaw } from 'vue-router'
|
|||||||
import { routes, extractLeafRoutes } from '@/router'
|
import { routes, extractLeafRoutes } from '@/router'
|
||||||
import { navigationIcon } from '@/utils/route'
|
import { navigationIcon } from '@/utils/route'
|
||||||
import { detectOS } from '@/utils/helper'
|
import { detectOS } from '@/utils/helper'
|
||||||
|
import { version } from '../../../package.json'
|
||||||
|
|
||||||
const os = ref(detectOS())
|
const os = ref(detectOS())
|
||||||
const command = useCommandPalattesStore()
|
const command = useCommandPalattesStore()
|
||||||
|
@ -3,7 +3,37 @@ import MenuProvider from '@/components/Pages/MenuProvider.vue'
|
|||||||
import Navigation from '@/components/Navigation/Navigation.vue'
|
import Navigation from '@/components/Navigation/Navigation.vue'
|
||||||
import { useMenuStore } from '@/stores/menu'
|
import { useMenuStore } from '@/stores/menu'
|
||||||
import { RouterView } from 'vue-router'
|
import { RouterView } from 'vue-router'
|
||||||
|
import { useDialogStore } from '@/stores/dialog'
|
||||||
|
import { onMounted } from 'vue'
|
||||||
|
import { version } from '../../package.json'
|
||||||
const menu = useMenuStore()
|
const menu = useMenuStore()
|
||||||
|
const dialog = useDialogStore()
|
||||||
|
|
||||||
|
const showDialogUpdate = () => {
|
||||||
|
dialog.type = 'success'
|
||||||
|
dialog.title = 'Update Aplikasi'
|
||||||
|
dialog.content =
|
||||||
|
'Aplikasi telah diperbarui. Silahkan muat ulang aplikasi untuk melihat perubahan.'
|
||||||
|
dialog.confirmText = 'Muat Ulang'
|
||||||
|
dialog.showCancelButton = false
|
||||||
|
dialog.onConfirm = () => {
|
||||||
|
window.location.reload()
|
||||||
|
}
|
||||||
|
dialog.dismissOnAction = false
|
||||||
|
dialog.open = true
|
||||||
|
}
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
const localVersion = localStorage.getItem('version')
|
||||||
|
if (localVersion) {
|
||||||
|
if (localVersion !== version) {
|
||||||
|
localStorage.setItem('version', version)
|
||||||
|
showDialogUpdate()
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
localStorage.setItem('version', version)
|
||||||
|
}
|
||||||
|
})
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user