Show missing loading placeholders

This commit is contained in:
schroda
2024-04-27 16:24:55 +02:00
parent 35b756e09c
commit 626c4ba6e6
9 changed files with 52 additions and 7 deletions

View File

@@ -23,6 +23,7 @@ import {
SelectSettingValueDisplayInfo,
} from '@/components/settings/SelectSetting.tsx';
import { WebUiChannel, WebUiFlavor, WebUiInterface } from '@/lib/graphql/generated/graphql.ts';
import { LoadingPlaceholder } from '@/components/util/LoadingPlaceholder.tsx';
type WebUISettingsType = Pick<
ServerSettings,
@@ -124,7 +125,7 @@ export const WebUISettings = () => {
};
}, [t]);
const { data } = requestManager.useGetServerSettings();
const { data, loading } = requestManager.useGetServerSettings();
const webUISettings = data ? extractWebUISettings(data.settings) : undefined;
const [mutateSettings] = requestManager.useUpdateServerSettings();
@@ -141,6 +142,10 @@ export const WebUISettings = () => {
mutateSettings({ variables: { input: { settings: { [setting]: value } } } });
};
if (loading) {
return <LoadingPlaceholder />;
}
return (
<List>
<SelectSetting<WebUiFlavor>