mirror of
https://github.com/immich-app/immich
synced 2025-11-07 17:27:20 +00: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:
parent
8e39d389b5
commit
f2270ad757
36 changed files with 257 additions and 135 deletions
|
|
@ -11,6 +11,7 @@
|
|||
import { fade } from 'svelte/transition';
|
||||
import { handleError } from '../../../../utils/handle-error';
|
||||
import SettingAccordion from '../setting-accordion.svelte';
|
||||
import type { ResetOptions } from '$lib/utils/dipatch';
|
||||
|
||||
export let libraryConfig: SystemConfigLibraryDto; // this is the config that is being edited
|
||||
export let disabled = false;
|
||||
|
|
@ -25,6 +26,14 @@
|
|||
let savedConfig: SystemConfigLibraryDto;
|
||||
let defaultConfig: SystemConfigLibraryDto;
|
||||
|
||||
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.library),
|
||||
|
|
@ -131,9 +140,8 @@
|
|||
|
||||
<div class="ml-4">
|
||||
<SettingButtonsRow
|
||||
on:reset={reset}
|
||||
on:reset={({ detail }) => handleReset(detail)}
|
||||
on:save={saveSetting}
|
||||
on:reset-to-default={resetToDefault}
|
||||
showResetToDefault={!isEqual(savedConfig, defaultConfig)}
|
||||
{disabled}
|
||||
/>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue