Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion src/lib/features/room/MediaViewer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,9 @@
const settled = { x: swipeX, y: swipeY };
endSwipe();
if (axis === 'vertical') {
if (Math.abs(settled.y) > SWIPE_THRESHOLD || Math.abs(velocityY) > VELOCITY_THRESHOLD) {
const travelled = Math.abs(settled.y);
const flicked = Math.abs(velocityY) > VELOCITY_THRESHOLD && travelled > SWIPE_THRESHOLD / 2;
if (travelled > SWIPE_THRESHOLD || flicked) {
onClose();
return true;
}
Expand Down
18 changes: 11 additions & 7 deletions src/lib/ui/primitives/EmoteBoard.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
});

let gifTab = $derived(tab === 'gif');
let cellSize = $derived(tab === 'sticker' ? 72 : 32);
let cellSize = $derived(tab === 'sticker' ? 72 : tab === 'emoticon' ? 48 : 32);

let boardStyle = $derived.by(() => {
const size = resizable ? readBoardSize() : null;
Expand Down Expand Up @@ -365,7 +365,7 @@
{/if}
</nav>

<div class={['grids', { sticker: tab === 'sticker' }]}>
<div class={['grids', { sticker: tab === 'sticker', emoji: tab === 'emoticon' }]}>
{#if onPickUnicode && query.trim() !== ''}
{@const text = query.trim()}
<button
Expand Down Expand Up @@ -665,16 +665,20 @@
display: flex;
flex-wrap: wrap;
gap: var(--space-100);
justify-content: center;
list-style: none;
margin: 0 0 var(--space-300);
justify-content: center;
padding: 0;
}

.grids.sticker {
--emote-cell: 5rem;
}

.grids.emoji {
--emote-cell: 3.5rem;
}

.grids li button,
.grids .unicode button {
align-items: center;
Expand All @@ -688,10 +692,10 @@
padding: var(--space-100);
width: var(--emote-cell, 2.5rem);

span {
max-width: 100%;
max-height: 100%;
}
:global(span) {
max-height: 100%;
max-width: 100%;
}
}

/* Sized to the 32px custom emote beside it, not to the surrounding type. */
Expand Down
6 changes: 3 additions & 3 deletions src/lib/ui/primitives/SettingsRow.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@
min-height: calc(var(--control-height-medium) + var(--space-300));
padding: var(--space-300) var(--space-400);

img {
max-height: var(--space-900);
}
:global(img) {
max-height: var(--space-900);
}
}

:global(.setting-row + .setting-row) {
Expand Down
Loading