feat(core): add an entry for admin panel (#10813)

![CleanShot 2025-03-13 at 13 02 25@2x](https://github.com/user-attachments/assets/82f50a5b-f079-4c64-a3fa-6554735bea82)
This commit is contained in:
JimmFly
2025-03-13 10:46:26 +00:00
parent 7df06ea98b
commit 0c9591f08e
5 changed files with 81 additions and 22 deletions

View File

@@ -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