mirror of
https://github.com/immich-app/immich.git
synced 2025-01-27 22:22:45 +01:00
style tweaks
This commit is contained in:
parent
e6f344856c
commit
ab604f4c8f
1 changed files with 28 additions and 27 deletions
|
@ -22,7 +22,7 @@
|
||||||
export let onClose: () => void;
|
export let onClose: () => void;
|
||||||
let users: UserResponseDto[] = [];
|
let users: UserResponseDto[] = [];
|
||||||
let selectedUsers: UserResponseDto[] = [];
|
let selectedUsers: UserResponseDto[] = [];
|
||||||
let role = AlbumUserRole.Editor
|
let role = AlbumUserRole.Editor;
|
||||||
|
|
||||||
const dispatch = createEventDispatcher<{
|
const dispatch = createEventDispatcher<{
|
||||||
select: AddUserDto[];
|
select: AddUserDto[];
|
||||||
|
@ -116,32 +116,33 @@
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{#if users.length > 0}
|
{#if users.length > 0}
|
||||||
<div class="flex items-center gap-2 py-3">
|
<div class="flex items-baseline gap-2 py-3">
|
||||||
Add users as:
|
<p>Add users as:</p>
|
||||||
<Dropdown
|
<div class="flex-grow">
|
||||||
class="flex-grow"
|
<Dropdown
|
||||||
title="Role"
|
title="Role"
|
||||||
options={[
|
options={[
|
||||||
{ title: 'Editor', value: AlbumUserRole.Editor },
|
{ title: 'Editor', value: AlbumUserRole.Editor },
|
||||||
{ title: 'Viewer', value: AlbumUserRole.Viewer },
|
{ title: 'Viewer', value: AlbumUserRole.Viewer },
|
||||||
]}
|
]}
|
||||||
selectedOption={{ title: 'Editor', value: AlbumUserRole.Editor }}
|
selectedOption={{ title: 'Editor', value: AlbumUserRole.Editor }}
|
||||||
render={({ title }) => title}
|
render={({ title }) => title}
|
||||||
on:select={({ detail: { value } }) => role = value}
|
on:select={({ detail: { value } }) => (role = value)}
|
||||||
/>
|
/>
|
||||||
<div class="flex-grow">
|
</div>
|
||||||
<Button
|
<div class="w-[50%]">
|
||||||
size="sm"
|
<Button
|
||||||
fullwidth
|
size="sm"
|
||||||
rounded="full"
|
fullwidth
|
||||||
disabled={selectedUsers.length === 0}
|
rounded="full"
|
||||||
on:click={() =>
|
disabled={selectedUsers.length === 0}
|
||||||
dispatch(
|
on:click={() =>
|
||||||
'select',
|
dispatch(
|
||||||
Object.values(selectedUsers).map((user) => ({ userId: user.id, role })),
|
'select',
|
||||||
)}>Add</Button
|
Object.values(selectedUsers).map((user) => ({ userId: user.id, role })),
|
||||||
>
|
)}>Add</Button
|
||||||
</div>
|
>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue