[System Pop Up] Add help center with release notifications and "What's New" popup (#4256)

Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
bmcomfy
2025-06-26 14:11:15 -07:00
committed by GitHub
parent c2ae40bab5
commit 2d2cec2e79
23 changed files with 2952 additions and 1 deletions

View File

@@ -3,6 +3,7 @@ import { ref } from 'vue'
import type { SystemStats } from '@/schemas/apiSchema'
import { api } from '@/scripts/api'
import { isElectron } from '@/utils/envUtil'
export const useSystemStatsStore = defineStore('systemStats', () => {
const systemStats = ref<SystemStats | null>(null)
@@ -26,10 +27,42 @@ export const useSystemStatsStore = defineStore('systemStats', () => {
}
}
function getFormFactor(): string {
if (!systemStats.value?.system?.os) {
return 'other'
}
const os = systemStats.value.system.os.toLowerCase()
const isDesktop = isElectron()
if (isDesktop) {
if (os.includes('windows')) {
return 'desktop-windows'
}
if (os.includes('darwin') || os.includes('mac')) {
return 'desktop-mac'
}
} else {
// Git/source installation
if (os.includes('windows')) {
return 'git-windows'
}
if (os.includes('darwin') || os.includes('mac')) {
return 'git-mac'
}
if (os.includes('linux')) {
return 'git-linux'
}
}
return 'other'
}
return {
systemStats,
isLoading,
error,
fetchSystemStats
fetchSystemStats,
getFormFactor
}
})