Frontend refactor and additions

This commit is contained in:
Jesse Malotaux 2025-04-11 16:49:51 +02:00
parent 5de99b32cd
commit 2a9813e7ac
12 changed files with 195 additions and 26 deletions

View file

@ -1,3 +1,4 @@
import { useDeviceStore } from '@/stores/device'
import CryptoJS from 'crypto-js'
export const appUrl = () => {
@ -17,3 +18,15 @@ export const encrypt = (data, key = false) => {
return false
}
}
export const checkAuth = async () => {
const device = useDeviceStore()
const handshake = await device.remoteHandshake()
if (handshake === true) return true
if (device.key()) return true
return false
}