init:first commit of plus-ui

This commit is contained in:
Teo
2025-05-21 11:24:53 +08:00
commit 95e38df6a5
2219 changed files with 2478311 additions and 0 deletions

35
src/utils/auth.ts Normal file
View File

@ -0,0 +1,35 @@
import { getLocal } from '.';
const TokenKey = 'Admin-Token';
const tokenStorage = useStorage<null | string>(TokenKey, null);
export const getToken = () => tokenStorage.value;
export const setToken = (access_token: string) => (tokenStorage.value = access_token);
export const removeToken = () => (tokenStorage.value = null);
export const getDockSocketUrl = () => {
return getLocal('dockSocketUrl');
};
export const getHost = () => {
return getLocal('host');
};
export const getRtmpPort = () => {
return getLocal('rtmpPort');
};
export const getRtcPort = () => {
return getLocal('rtcPort');
};
export const getDockAir = () => {
return getLocal('dockAir');
};
export const getAiUrl = () => {
return getLocal('aiUrl');
};