mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-02-14 05:14:54 +00:00
feat(core): add an entry for admin panel (#10813)

This commit is contained in:
@@ -18,6 +18,11 @@ import type { UserFeatureStore } from '../stores/user-feature';
|
||||
export class UserFeature extends Entity {
|
||||
// undefined means no user, null means loading
|
||||
features$ = new LiveData<FeatureType[] | null | undefined>(null);
|
||||
|
||||
isAdmin$ = this.features$.map(features =>
|
||||
features === null ? null : features?.some(f => f === FeatureType.Admin)
|
||||
);
|
||||
|
||||
isEarlyAccess$ = this.features$.map(features =>
|
||||
features === null
|
||||
? null
|
||||
|
||||
Reference in New Issue
Block a user