File tree 2 files changed +9
-1
lines changed
2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -18,6 +18,7 @@ import { MustUser } from "./MustUser";
18
18
import "./index.css" ;
19
19
import { useI18n } from "@solid-primitives/i18n" ;
20
20
import { initialLang , langMap , loadedLangs } from "./i18n" ;
21
+ import { Resp } from "~/types" ;
21
22
22
23
const Home = lazy ( ( ) => import ( "~/pages/home/Layout" ) ) ;
23
24
const Manage = lazy ( ( ) => import ( "~/pages/manage" ) ) ;
@@ -46,7 +47,7 @@ const App: Component = () => {
46
47
} ) ( ) ,
47
48
( async ( ) => {
48
49
handleRrespWithoutAuthAndNotify (
49
- await r . get ( "/public/settings" ) ,
50
+ ( await r . get ( "/public/settings" ) ) as Resp < Record < string , string > > ,
50
51
setSettings ,
51
52
setErr
52
53
) ;
Original file line number Diff line number Diff line change @@ -7,6 +7,13 @@ export const setSettings = (items: Record<string, string>) => {
7
7
Object . keys ( items ) . forEach ( ( key ) => {
8
8
settings [ key ] = items [ key ] ;
9
9
} ) ;
10
+ const version = settings [ "version" ] || "Unknown" ;
11
+ console . log (
12
+ `%c AList %c ${ version } %c https://github.com/Xhofe/alist` ,
13
+ "color: #fff; background: #5f5f5f" ,
14
+ "color: #fff; background: #70c6be" ,
15
+ ""
16
+ ) ;
10
17
} ;
11
18
12
19
export const getSetting = ( key : string ) => settings [ key ] ?? "" ;
You can’t perform that action at this time.
0 commit comments