mirror of
https://github.com/haexhub/haex-hub.git
synced 2025-12-19 15:20:51 +01:00
add desktop
This commit is contained in:
@ -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
|
||||
// ==========================================
|
||||
|
||||
Reference in New Issue
Block a user