wip(login): login developing

This commit is contained in:
陈凯龙
2021-12-31 17:19:53 +08:00
parent bc749702b5
commit 45d657d44c
23 changed files with 3413 additions and 12 deletions

View File

@@ -99,3 +99,7 @@ export function isUrl(path: string): boolean {
/(((^https?:(?:\/\/)?)(?:[-:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&%@.\w_]*)#?(?:[\w]*))?)$/
return reg.test(path)
}
export function isDark(): boolean {
return window.matchMedia('(prefers-color-scheme: dark)').matches
}