fix(web): user management responsive design (#5698)

* fix: user management tailwind

* use top instead of inset-y-0

* add types to createEventDispatcher
This commit is contained in:
martin 2023-12-14 17:55:15 +01:00 committed by GitHub
parent 8e39d389b5
commit f2270ad757
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 257 additions and 135 deletions

View file

@ -9,6 +9,7 @@
import { fade } from 'svelte/transition';
import SettingButtonsRow from '../setting-buttons-row.svelte';
import SettingSwitch from '../setting-switch.svelte';
import type { ResetOptions } from '$lib/utils/dipatch';
export let newVersionCheckConfig: SystemConfigNewVersionCheckDto; // this is the config that is being edited
@ -22,6 +23,14 @@
]);
}
const handleReset = (detail: ResetOptions) => {
if (detail.default) {
resetToDefault();
} else {
reset();
}
};
async function saveSetting() {
try {
const { data: configs } = await api.systemConfigApi.getConfig();
@ -79,9 +88,8 @@
bind:checked={newVersionCheckConfig.enabled}
/>
<SettingButtonsRow
on:reset={reset}
on:reset={({ detail }) => handleReset(detail)}
on:save={saveSetting}
on:reset-to-default={resetToDefault}
showResetToDefault={!isEqual(savedConfig, defaultConfig)}
/>
</div>