df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 1 | <script lang="ts"> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 2 | import { createEventDispatcher } from 'svelte'; |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 3 | import { |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 4 | LINE_HEIGHT_DEFAULT, |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 5 | LINE_HEIGHT_MAX, |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 6 | LINE_HEIGHT_MIN, |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 7 | MESSAGE_SPACING_DEFAULT, |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 8 | MESSAGE_SPACING_MAX, |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 9 | MESSAGE_SPACING_MIN, |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 10 | lineHeight, |
c122e088bece | atagen | 2026-10-25 02:37 UTC | 11 | messageSpacing |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 12 | } from './appearance'; |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 13 | import { DEFAULT_QUICK_REACTIONS } from './quick-reactions'; |
5059ed753f8b | atagen | 2026-10-27 07:20 UTC | 14 | import { sameQuick } from './quick-reactions-model'; |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 15 | import ReactionPicker from './ReactionPicker.svelte'; |
c122e088bece | atagen | 2026-10-25 02:37 UTC | 16 | import ThemeSettings from './ThemeSettings.svelte'; |
a4555a7eae2d | atagen | 2026-10-25 09:18 UTC | 17 | import KeywordSettings from './KeywordSettings.svelte'; |
db4e552594cb | atagen | 2026-10-26 04:43 UTC | 18 | import NotificationSettings from './NotificationSettings.svelte'; |
5059ed753f8b | atagen | 2026-10-27 07:20 UTC | 19 | import type { ImagePack, QuickEntry } from './types'; |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 20 | |
5059ed753f8b | atagen | 2026-10-27 07:20 UTC | 21 | export let quick: QuickEntry[]; |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 22 | export let packs: ImagePack[] = []; |
5059ed753f8b | atagen | 2026-10-27 07:20 UTC | 23 | export let onQuickChange: (list: QuickEntry[]) => void; |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 24 | |
d095131eec0e | atagen | 2026-10-24 08:39 UTC | 25 | const dispatch = createEventDispatcher<{ close: void; packs: void }>(); |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 26 | |
5059ed753f8b | atagen | 2026-10-27 07:20 UTC | 27 | $: quickIsDefault = sameQuick(quick, DEFAULT_QUICK_REACTIONS); |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 28 | |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 29 | </script> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 30 | |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 31 | <div class="modal settings" role="dialog" aria-modal="true" aria-label="Settings"> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 32 | <div class="modal-tabs" role="tablist" aria-label="Settings"> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 33 | <button type="button" role="tab" aria-selected="true" class="active">Settings</button> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 34 | <button type="button" class="icon-btn modal-x" aria-label="Close settings" on:click={() => dispatch('close')}> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 35 | <span aria-hidden="true">✕</span> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 36 | </button> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 37 | </div> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 38 | |
c122e088bece | atagen | 2026-10-25 02:37 UTC | 39 | <ThemeSettings /> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 40 | |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 41 | <section aria-label="Message spacing"> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 42 | <h3 class="sec-h">Space between messages</h3> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 43 | <div class="range"> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 44 | <input |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 45 | type="range" |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 46 | min={MESSAGE_SPACING_MIN} |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 47 | max={MESSAGE_SPACING_MAX} |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 48 | step="1" |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 49 | bind:value={$messageSpacing} |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 50 | aria-label="Space between messages in pixels" |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 51 | /> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 52 | <span class="value">{$messageSpacing}px</span> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 53 | <button |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 54 | type="button" |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 55 | class="ghost-btn" |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 56 | disabled={$messageSpacing === MESSAGE_SPACING_DEFAULT} |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 57 | on:click={() => messageSpacing.set(MESSAGE_SPACING_DEFAULT)} |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 58 | > |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 59 | Reset |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 60 | </button> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 61 | </div> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 62 | <h3 class="sec-h">Line height</h3> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 63 | <div class="range"> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 64 | <input |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 65 | type="range" |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 66 | min={LINE_HEIGHT_MIN} |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 67 | max={LINE_HEIGHT_MAX} |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 68 | step="0.05" |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 69 | bind:value={$lineHeight} |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 70 | aria-label="Line height within messages" |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 71 | /> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 72 | <span class="value">{$lineHeight.toFixed(2)}</span> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 73 | <button |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 74 | type="button" |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 75 | class="ghost-btn" |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 76 | disabled={$lineHeight === LINE_HEIGHT_DEFAULT} |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 77 | on:click={() => lineHeight.set(LINE_HEIGHT_DEFAULT)} |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 78 | > |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 79 | Reset |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 80 | </button> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 81 | </div> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 82 | </section> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 83 | |
db4e552594cb | atagen | 2026-10-26 04:43 UTC | 84 | <NotificationSettings /> |
db4e552594cb | atagen | 2026-10-26 04:43 UTC | 85 | |
a4555a7eae2d | atagen | 2026-10-25 09:18 UTC | 86 | <KeywordSettings /> |
a4555a7eae2d | atagen | 2026-10-25 09:18 UTC | 87 | |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 88 | <section aria-label="Quick reactions"> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 89 | <div class="sec-head"> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 90 | <h3 class="sec-h">Quick reactions</h3> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 91 | <button type="button" class="ghost-btn" disabled={quickIsDefault} on:click={() => onQuickChange(DEFAULT_QUICK_REACTIONS)}> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 92 | Reset |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 93 | </button> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 94 | </div> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 95 | <ReactionPicker embedded {quick} {packs} {onQuickChange} onPick={() => {}} onClose={() => dispatch('close')} /> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 96 | </section> |
d095131eec0e | atagen | 2026-10-24 08:39 UTC | 97 | |
d095131eec0e | atagen | 2026-10-24 08:39 UTC | 98 | <section aria-label="Packs"> |
d095131eec0e | atagen | 2026-10-24 08:39 UTC | 99 | <div class="sec-head"> |
d095131eec0e | atagen | 2026-10-24 08:39 UTC | 100 | <h3 class="sec-h">Sticker and emoji packs</h3> |
d095131eec0e | atagen | 2026-10-24 08:39 UTC | 101 | <button type="button" class="ghost-btn" on:click={() => dispatch('packs')}>Manage</button> |
d095131eec0e | atagen | 2026-10-24 08:39 UTC | 102 | </div> |
d095131eec0e | atagen | 2026-10-24 08:39 UTC | 103 | </section> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 104 | </div> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 105 | |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 106 | <style> |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 107 | .settings { max-height: calc(100dvh - 32px); overflow-y: auto; } |
c122e088bece | atagen | 2026-10-25 02:37 UTC | 108 | section { margin-top: 18px; } |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 109 | .sec-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; } |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 110 | .sec-head .sec-h { margin: 0; } |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 111 | .sec-h { font-size: 12px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); margin: 0 0 6px; } |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 112 | .range + .sec-h { margin-top: 12px; } |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 113 | .range { display: flex; align-items: center; gap: 10px; } |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 114 | .range input[type='range'] { flex: 1; accent-color: var(--accent); } |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 115 | .value { font-size: 13px; min-width: 4ch; text-align: right; font-variant-numeric: tabular-nums; } |
df3c0f2b3da4 | atagen | 2026-10-22 13:07 UTC | 116 | </style> |