add desktop

This commit is contained in:
2025-10-16 20:56:21 +02:00
parent 033c9135c6
commit a291619f63
27 changed files with 1755 additions and 124 deletions

View File

@ -422,7 +422,7 @@ async function handleContextMethodAsync(request: ExtensionRequest) {
return {
theme: contextGetters.getTheme(),
locale: contextGetters.getLocale(),
platform: detectPlatform(),
platform: contextGetters.getPlatform(),
}
default:
@ -430,13 +430,6 @@ async function handleContextMethodAsync(request: ExtensionRequest) {
}
}
function detectPlatform(): 'desktop' | 'mobile' | 'tablet' {
const width = window.innerWidth
if (width < 768) return 'mobile'
if (width < 1024) return 'tablet'
return 'desktop'
}
// ==========================================
// Storage Methods
// ==========================================