User Role (#69)

* fix: window.DisableAnimatedMan as boolean

* chore: auto-fix linting and formatting issues

* feat: user role

* feat: use user agent_secret

* feat: hide setting when user role is not admin

* feat: new waf api

* chore: auto-fix linting and formatting issues

* fix: admin settings page

* feat: online-user setting

* fix: pagination

---------

Co-authored-by: hamster1963 <hamster1963@users.noreply.github.com>
This commit is contained in:
仓鼠andhamster1963 authored and GitHub committed 2024-12-22 23:17:20 +08:00
1 parent 5ad915c973
commit 7fdac38291
15 files changed
+703 -36

No files matched your search

+1
View File
@@ -20,6 +20,7 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => {
;(async () => {
try {
const user = await getProfile()
user.role = user.role || 0
setProfile(user)
} catch (error: any) {
setProfile(undefined)