feat: able to customize system name & logo now

This commit is contained in:
JustSong
2023-05-14 19:29:02 +08:00
parent 2cdc718fde
commit 926951ee03
10 changed files with 87 additions and 29 deletions

View File

@@ -15,6 +15,22 @@ export function isRoot() {
return user.role >= 100;
}
export function getSystemName() {
let system_name = localStorage.getItem('system_name');
if (!system_name) return 'One API';
return system_name;
}
export function getLogo() {
let logo = localStorage.getItem('logo');
if (!logo) return '/logo.png';
return logo
}
export function getFooterHTML() {
return localStorage.getItem('footer_html');
}
export async function copy(text) {
let okay = true;
try {