mirror of
https://github.com/immich-app/immich.git
synced 2025-12-24 01:11:32 +03:00
feat(web,server): server features (#3756)
* feat: server features * chore: open api * icon size --------- Co-authored-by: Alex Tran <alex.tran1502@gmail.com>
This commit is contained in:
17
web/src/lib/stores/feature-flags.store.ts
Normal file
17
web/src/lib/stores/feature-flags.store.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import { api, ServerFeaturesDto } from '@api';
|
||||
import { writable } from 'svelte/store';
|
||||
|
||||
export type FeatureFlags = ServerFeaturesDto;
|
||||
|
||||
export const featureFlags = writable<FeatureFlags>({
|
||||
machineLearning: true,
|
||||
search: true,
|
||||
oauth: true,
|
||||
oauthAutoLaunch: true,
|
||||
passwordLogin: true,
|
||||
});
|
||||
|
||||
export const loadFeatureFlags = async () => {
|
||||
const { data } = await api.serverInfoApi.getServerFeatures();
|
||||
featureFlags.update(() => data);
|
||||
};
|
||||
Reference in New Issue
Block a user