mirror of
https://github.com/liamcottle/reticulum-meshchat.git
synced 2026-12-04 22:00:05 -05:00
use utils
This commit is contained in:
parent
27015f45af
commit
ec63939b7c
4 changed files with 8 additions and 3 deletions
|
|
@ -255,6 +255,7 @@ import SidebarLink from "./SidebarLink.vue";
|
|||
import DialogUtils from "../js/DialogUtils";
|
||||
import WebSocketConnection from "../js/WebSocketConnection";
|
||||
import GlobalState from "../js/GlobalState";
|
||||
import Utils from "../js/Utils";
|
||||
|
||||
export default {
|
||||
name: 'App',
|
||||
|
|
@ -512,7 +513,7 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
isElectron() {
|
||||
return window.electron != null;
|
||||
return Utils.isElectron();
|
||||
},
|
||||
isMobile() {
|
||||
return /Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent);
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
isElectron() {
|
||||
return window.electron != null;
|
||||
return Utils.isElectron();
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
|
|
@ -727,7 +727,7 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
isElectron() {
|
||||
return window.electron != null;
|
||||
return Utils.isElectron();
|
||||
},
|
||||
interfacesWithStats() {
|
||||
const results = [];
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
class Utils {
|
||||
|
||||
static isElectron() {
|
||||
return window.electron != null;
|
||||
}
|
||||
|
||||
static formatBytes(bytes) {
|
||||
|
||||
if(bytes === 0){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue