mirror of
https://github.com/immich-app/immich.git
synced 2025-12-21 17:25:35 +03:00
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:
@@ -9,6 +9,7 @@
|
||||
import { fade } from 'svelte/transition';
|
||||
import SettingButtonsRow from '../setting-buttons-row.svelte';
|
||||
import SettingTextarea from '../setting-textarea.svelte';
|
||||
import type { ResetOptions } from '$lib/utils/dipatch';
|
||||
|
||||
export let themeConfig: SystemConfigThemeDto; // this is the config that is being edited
|
||||
export let disabled = false;
|
||||
@@ -16,6 +17,14 @@
|
||||
let savedConfig: SystemConfigThemeDto;
|
||||
let defaultConfig: SystemConfigThemeDto;
|
||||
|
||||
const handleReset = (detail: ResetOptions) => {
|
||||
if (detail.default) {
|
||||
resetToDefault();
|
||||
} else {
|
||||
reset();
|
||||
}
|
||||
};
|
||||
|
||||
async function getConfigs() {
|
||||
[savedConfig, defaultConfig] = await Promise.all([
|
||||
api.systemConfigApi.getConfig().then((res) => res.data.theme),
|
||||
@@ -84,9 +93,8 @@
|
||||
/>
|
||||
|
||||
<SettingButtonsRow
|
||||
on:reset={reset}
|
||||
on:reset={({ detail }) => handleReset(detail)}
|
||||
on:save={saveSetting}
|
||||
on:reset-to-default={resetToDefault}
|
||||
showResetToDefault={!isEqual(savedConfig, defaultConfig)}
|
||||
{disabled}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user