chore: make class to get the device form factor

This commit is contained in:
Shishkevich D.
2025-03-21 15:09:05 +00:00
parent 510c35f450
commit 6f4eefe601
5 changed files with 11 additions and 6 deletions

View File

@@ -709,7 +709,7 @@
showAlert: false,
ipLimitEnable: false,
pageSize: 50,
isMobile: window.innerWidth <= 768,
isMobile: DeviceUtils.isMobile(),
},
methods: {
loading(spinning = true) {
@@ -1473,7 +1473,7 @@
return false
},
onResize() {
this.isMobile = window.innerWidth <= 768;
this.isMobile = DeviceUtils.isMobile();
}
},
watch: {

View File

@@ -601,7 +601,7 @@
loadingTip: '{{ i18n "loading"}}',
showAlert: false,
showIp: false,
isMobile: window.innerWidth <= 768
isMobile: DeviceUtils.isMobile()
},
methods: {
loading(spinning, tip = '{{ i18n "loading"}}') {

View File

@@ -877,7 +877,7 @@
refreshing: false,
restartResult: '',
showAlert: false,
isMobile: window.innerWidth <= 768,
isMobile: DeviceUtils.isMobile(),
advSettings: 'xraySetting',
obsSettings: '',
cm: null,