before_redesign
This commit is contained in:
@@ -25,16 +25,15 @@ export default defineBoot(({ app }) => {
|
||||
'webk'
|
||||
].includes(platform)
|
||||
const isTablet = window.innerWidth > 1024
|
||||
if (!isDesktopOrWeb && !isTablet) {
|
||||
if (tg.isVersionAtLeast('8.0')) tg.requestFullscreen()
|
||||
else tg.expand()
|
||||
}
|
||||
if (!isDesktopOrWeb && !isTablet) tg.expand()
|
||||
|
||||
tg.SettingsButton.show()
|
||||
|
||||
app.config.globalProperties.$tg = tg
|
||||
app.config.globalProperties.$isDesktop = isDesktopOrWeb || isTablet
|
||||
app.config.globalProperties.$isMobile = !isDesktopOrWeb && !isTablet
|
||||
app.config.globalProperties.$isIOS = platform === 'ios'
|
||||
app.config.globalProperties.$isAndroid = platform === 'android'
|
||||
|
||||
app.provide('tg', tg)
|
||||
})
|
||||
@@ -46,7 +45,6 @@ export default defineBoot(({ app }) => {
|
||||
|
||||
script setup
|
||||
import { getCurrentInstance } from 'vue'
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
and use proxy.$isMobile
|
||||
const app = getCurrentInstance()
|
||||
const isMobile = app?.appContext.config.globalProperties.$isMobile
|
||||
*/
|
||||
Reference in New Issue
Block a user