mirror of
https://github.com/Macrame-App/Macrame
synced 2025-12-29 07:19:26 +00:00
Frontend update Alpha version
This commit is contained in:
parent
e1b13b3930
commit
84b038b5ee
4 changed files with 8 additions and 4 deletions
|
|
@ -24,9 +24,11 @@ export const decryptAES = (key, str) => {
|
||||||
return encrypted.toString(enc.Utf8)
|
return encrypted.toString(enc.Utf8)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const AuthCall = (data) => {
|
export const AuthCall = (data = false) => {
|
||||||
if (isLocal()) return data
|
if (isLocal()) return data
|
||||||
|
|
||||||
|
if (!data) data = {empty: true}
|
||||||
|
|
||||||
const device = useDeviceStore()
|
const device = useDeviceStore()
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|
|
||||||
|
|
@ -39,7 +39,9 @@ export const usePanelStore = defineStore('panel', () => {
|
||||||
const getList = async () => {
|
const getList = async () => {
|
||||||
if (list.value.length > 0) return list.value
|
if (list.value.length > 0) return list.value
|
||||||
|
|
||||||
const resp = await axios.post(appUrl() + '/panel/list')
|
const data = AuthCall()
|
||||||
|
|
||||||
|
const resp = await axios.post(appUrl() + '/panel/list', data)
|
||||||
list.value = resp.data
|
list.value = resp.data
|
||||||
|
|
||||||
return list.value
|
return list.value
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<div class="panel__content">
|
<div class="panel__content">
|
||||||
<div class="grid gap-1 opacity-50 h-fit">
|
<div class="grid gap-1 opacity-50 h-fit">
|
||||||
<em v-if="isLocal()">This is the server dashboard.</em>
|
<em v-if="isLocal()">This is the server dashboard.</em>
|
||||||
<em v-else>This is the server dashboard.</em>
|
<em v-else>This is the remote dashboard.</em>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="isLocal()">
|
<div v-if="isLocal()">
|
||||||
<h4>Start: Authenticate a device</h4>
|
<h4>Start: Authenticate a device</h4>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue