[Snow Team] frontend-mobile: auto-commit work

This commit is contained in:
yml
2026-05-22 19:11:08 +08:00
parent 236518ade4
commit b78736def4
3 changed files with 755 additions and 69 deletions
+13
View File
@@ -0,0 +1,13 @@
export function isMobileHost(hostname = window.location.hostname) {
return hostname === 'm.localhost' || hostname.startsWith('m.')
}
export function toMobilePath(path: string) {
if (path === '/') {
return '/m'
}
if (path.startsWith('/m') || path.startsWith('/admin')) {
return path
}
return `/m${path}`
}