Tweak room edit form
This commit is contained in:
@@ -112,27 +112,25 @@
|
|||||||
<p>Icon</p>
|
<p>Icon</p>
|
||||||
{/snippet}
|
{/snippet}
|
||||||
{#snippet input()}
|
{#snippet input()}
|
||||||
<div class="flex items-center justify-between">
|
<div class="flex flex-grow items-center justify-between gap-4">
|
||||||
<div class="flex items-center gap-4">
|
{#if imagePreview}
|
||||||
{#if imagePreview}
|
<div class="flex items-center gap-2">
|
||||||
<div class="flex items-center gap-2">
|
<span class="text-sm opacity-75">Selected:</span>
|
||||||
<span class="text-sm opacity-75">Selected:</span>
|
<ImageIcon src={imagePreview} alt="" class="rounded-lg" />
|
||||||
<ImageIcon src={imagePreview} alt="" class="rounded-lg" />
|
|
||||||
</div>
|
|
||||||
{:else}
|
|
||||||
<span class="text-sm opacity-75">No icon selected</span>
|
|
||||||
{/if}
|
|
||||||
<div class="flex gap-2">
|
|
||||||
<IconPickerButton onSelect={handleIconSelect} class="btn btn-primary btn-sm">
|
|
||||||
<Icon icon={StickerSmileSquare} size={4} />
|
|
||||||
Select
|
|
||||||
</IconPickerButton>
|
|
||||||
<label class="btn btn-neutral btn-sm cursor-pointer">
|
|
||||||
<Icon icon={UploadMinimalistic} size={4} />
|
|
||||||
Upload
|
|
||||||
<input type="file" accept="image/*" class="hidden" onchange={handleImageUpload} />
|
|
||||||
</label>
|
|
||||||
</div>
|
</div>
|
||||||
|
{:else}
|
||||||
|
<span class="text-sm opacity-75">No icon selected</span>
|
||||||
|
{/if}
|
||||||
|
<div class="flex gap-2">
|
||||||
|
<IconPickerButton onSelect={handleIconSelect} class="btn btn-primary btn-sm">
|
||||||
|
<Icon icon={StickerSmileSquare} size={4} />
|
||||||
|
<span class="hidden sm:inline">Select</span>
|
||||||
|
</IconPickerButton>
|
||||||
|
<label class="btn btn-neutral btn-sm cursor-pointer">
|
||||||
|
<Icon icon={UploadMinimalistic} size={4} />
|
||||||
|
<span class="hidden sm:inline">Upload</span>
|
||||||
|
<input type="file" accept="image/*" class="hidden" onchange={handleImageUpload} />
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{/snippet}
|
{/snippet}
|
||||||
@@ -162,41 +160,22 @@
|
|||||||
</label>
|
</label>
|
||||||
{/snippet}
|
{/snippet}
|
||||||
</FieldInline>
|
</FieldInline>
|
||||||
<FieldInline>
|
<strong class="md:hidden">Permissions</strong>
|
||||||
{#snippet label()}
|
<div class="flex items-center gap-2">
|
||||||
<strong>Restricted</strong>
|
<input type="checkbox" class="checkbox" bind:checked={values.isRestricted} />
|
||||||
{/snippet}
|
<span class="text-sm opacity-75">Only allow members to send messages</span>
|
||||||
{#snippet input()}
|
</div>
|
||||||
<input type="checkbox" class="checkbox" bind:checked={values.isRestricted} />
|
<div class="flex items-center gap-2">
|
||||||
<span class="text-sm opacity-75">Only allow members to send messages</span>
|
<input type="checkbox" class="checkbox" bind:checked={values.isPrivate} />
|
||||||
{/snippet}
|
<span class="text-sm opacity-75">Only allow members to read messages</span>
|
||||||
</FieldInline>
|
</div>
|
||||||
<FieldInline>
|
<div class="flex items-center gap-2">
|
||||||
{#snippet label()}
|
<input type="checkbox" class="checkbox" bind:checked={values.isHidden} />
|
||||||
<strong>Private</strong>
|
<span class="text-sm opacity-75">Hide this group from non-members</span>
|
||||||
{/snippet}
|
</div>
|
||||||
{#snippet input()}
|
<div class="flex items-center gap-2">
|
||||||
<input type="checkbox" class="checkbox" bind:checked={values.isPrivate} />
|
<input type="checkbox" class="checkbox" bind:checked={values.isClosed} />
|
||||||
<span class="text-sm opacity-75">Only allow members to read messages</span>
|
<span class="text-sm opacity-75">Ignore requests to join</span>
|
||||||
{/snippet}
|
</div>
|
||||||
</FieldInline>
|
|
||||||
<FieldInline>
|
|
||||||
{#snippet label()}
|
|
||||||
<strong>Hidden</strong>
|
|
||||||
{/snippet}
|
|
||||||
{#snippet input()}
|
|
||||||
<input type="checkbox" class="checkbox" bind:checked={values.isHidden} />
|
|
||||||
<span class="text-sm opacity-75">Hide this group from non-members</span>
|
|
||||||
{/snippet}
|
|
||||||
</FieldInline>
|
|
||||||
<FieldInline>
|
|
||||||
{#snippet label()}
|
|
||||||
<strong>Closed</strong>
|
|
||||||
{/snippet}
|
|
||||||
{#snippet input()}
|
|
||||||
<input type="checkbox" class="checkbox" bind:checked={values.isClosed} />
|
|
||||||
<span class="text-sm opacity-75">Ignore requests to join</span>
|
|
||||||
{/snippet}
|
|
||||||
</FieldInline>
|
|
||||||
{@render footer({loading})}
|
{@render footer({loading})}
|
||||||
</form>
|
</form>
|
||||||
|
|||||||
@@ -87,7 +87,7 @@
|
|||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
{#each $members as pubkey (pubkey)}
|
{#each $members as pubkey (pubkey)}
|
||||||
<div class="card2 bg-alt relative">
|
<div class="card2 card2-sm bg-alt relative">
|
||||||
<div class="flex items-center justify-between gap-2">
|
<div class="flex items-center justify-between gap-2">
|
||||||
<div class="min-w-0 flex-1">
|
<div class="min-w-0 flex-1">
|
||||||
<Profile {pubkey} {url} />
|
<Profile {pubkey} {url} />
|
||||||
|
|||||||
Reference in New Issue
Block a user