diff --git a/assets/icon-512-flat.png b/assets/icon-512-flat.png new file mode 100644 index 00000000..5e9edf33 Binary files /dev/null and b/assets/icon-512-flat.png differ diff --git a/assets/icon-512.png b/assets/icon-512.png index 166bddc3..e8154e72 100644 Binary files a/assets/icon-512.png and b/assets/icon-512.png differ diff --git a/src/components/Settings/components/About.vue b/src/components/Settings/components/About.vue index ff02edf9..f3641bcf 100644 --- a/src/components/Settings/components/About.vue +++ b/src/components/Settings/components/About.vue @@ -10,10 +10,16 @@ import { settings } from '~/logic' import { version } from '../../../../package.json' const importSettingsRef = ref() +const hasNewVersion = ref(false) +const flatVersionLogo = ref(false) const dialogVisible = reactive({ justWannaChangeTheJob: false, }) +onMounted(() => { + checkGitHubRelease() +}) + function handleImportSettings() { if (importSettingsRef.value) { importSettingsRef.value.click() @@ -58,6 +64,27 @@ function handleExportSettings() { a.click() URL.revokeObjectURL(url) } + +async function checkGitHubRelease() { + const apiUrl = `https://api.github.com/repos/BewlyBewly/BewlyBewly/releases/latest` + + try { + const response = await fetch(apiUrl) + if (!response.ok) + throw new Error('Network response was not ok') + + const data = await response.json() + const latestVersion = data.tag_name + + // Here you can compare `latestVersion` with your current version + const currentVersion = `v${version}` // Replace with your actual current version + + if (latestVersion !== currentVersion) + hasNewVersion.value = true + } + catch { + } +}