This commit is contained in:
ThatOneCalculator 2023-02-18 20:09:14 -08:00
parent 19c88fc68b
commit 0a3e39b6ec
No known key found for this signature in database
GPG Key ID: 8703CACD01000000
2 changed files with 13 additions and 1 deletions

View File

@ -15,6 +15,7 @@
</template>
<script lang="ts" setup>
import { shallowRef } from 'vue';
import MkModal from '@/components/MkModal.vue';
import MkSparkle from '@/components/MkSparkle.vue';
import MkButton from '@/components/MkButton.vue';
@ -22,7 +23,7 @@ import { version } from '@/config';
import { i18n } from '@/i18n';
import * as os from '@/os';
const modal = $ref<InstanceType<typeof MkModal>>();
const modal = shallowRef<InstanceType<typeof MkModal>>();
let newRelease = $ref(false);
let data = $ref(Object);
@ -31,6 +32,7 @@ os.api('release').then(res => {
data = res;
newRelease = (version === data?.version);
});
console.log(`Version: ${version}`)
console.log(`Data version: ${data.version}`)
console.log(newRelease)

View File

@ -251,6 +251,16 @@ import { getAccountFromId } from "@/scripts/get-account-from-id";
// クライアントが更新されたか?
const lastVersion = localStorage.getItem("lastVersion");
// TESTING
popup(
defineAsyncComponent(() => import("@/components/MkUpdated.vue")),
{},
{},
"closed",
);
if (lastVersion !== version) {
localStorage.setItem("lastVersion", version);