[feat] Limit release notifications to desktop app only (#4788)

This commit is contained in:
Christian Byrne
2025-08-06 12:00:52 -07:00
committed by GitHub
parent 37099c498b
commit 3f290e2cbd
2 changed files with 133 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ import { computed, ref } from 'vue'
import { type ReleaseNote, useReleaseService } from '@/services/releaseService'
import { useSettingStore } from '@/stores/settingStore'
import { useSystemStatsStore } from '@/stores/systemStatsStore'
import { isElectron } from '@/utils/envUtil'
import { compareVersions, stringToLocale } from '@/utils/formatUtil'
// Store for managing release notes
@@ -76,6 +77,11 @@ export const useReleaseStore = defineStore('release', () => {
// Show toast if needed
const shouldShowToast = computed(() => {
// Only show on desktop version
if (!isElectron()) {
return false
}
// Skip if notifications are disabled
if (!showVersionUpdates.value) {
return false
@@ -103,6 +109,11 @@ export const useReleaseStore = defineStore('release', () => {
// Show red-dot indicator
const shouldShowRedDot = computed(() => {
// Only show on desktop version
if (!isElectron()) {
return false
}
// Skip if notifications are disabled
if (!showVersionUpdates.value) {
return false
@@ -145,6 +156,11 @@ export const useReleaseStore = defineStore('release', () => {
// Show "What's New" popup
const shouldShowPopup = computed(() => {
// Only show on desktop version
if (!isElectron()) {
return false
}
// Skip if notifications are disabled
if (!showVersionUpdates.value) {
return false