mirror of
https://github.com/Macrame-App/Macrame
synced 2025-12-29 15:29:26 +00:00
Frontend refactor and additions
This commit is contained in:
parent
5de99b32cd
commit
2a9813e7ac
12 changed files with 195 additions and 26 deletions
|
|
@ -18,7 +18,7 @@
|
|||
|
||||
<script setup>
|
||||
import MainMenu from '@/components/base/MainMenu.vue'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { onMounted, onUpdated, ref } from 'vue'
|
||||
import { RouterView, useRoute } from 'vue-router'
|
||||
import { useDeviceStore } from './stores/device'
|
||||
import { isLocal } from './services/ApiService'
|
||||
|
|
@ -30,16 +30,20 @@ const route = useRoute()
|
|||
const handshake = ref(false)
|
||||
|
||||
onMounted(async () => {
|
||||
// Setting device uuid from localstorage
|
||||
// If not present in LocalStorage a new uuidV4 will be generated
|
||||
device.uuid()
|
||||
|
||||
const hsReq = await device.remoteHandshake()
|
||||
handshake.value = hsReq
|
||||
|
||||
device.$subscribe((mutation, state) => {
|
||||
console.log(mutation)
|
||||
if (device.key()) handshake.value = true
|
||||
})
|
||||
// Setting device uuid from localstorage
|
||||
// If not present in LocalStorage a new uuidV4 will be generated
|
||||
})
|
||||
|
||||
onUpdated(() => {
|
||||
console.log(device.key())
|
||||
})
|
||||
</script>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue