Skip to content

Commit bfee3e3

Browse files
committed
fix: responsiveness
1 parent 13405c7 commit bfee3e3

File tree

1 file changed

+11
-11
lines changed
  • platforms/pictique/src/routes/(protected)/group/[id]

1 file changed

+11
-11
lines changed

platforms/pictique/src/routes/(protected)/group/[id]/+page.svelte

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,20 +3,21 @@
33
import { ChatMessage, MessageInput } from '$lib/fragments';
44
import { Avatar, Button, Input, Label } from '$lib/ui';
55
import { InputFile } from '$lib/fragments';
6-
import { HugeiconsFreeIcons, Edit01FreeIcons } from '@hugeicons/core-free-icons';
6+
import { Edit01FreeIcons } from '@hugeicons/core-free-icons';
7+
import {HugeiconsIcon} from "@hugeicons/svelte";
78
import { goto } from '$app/navigation';
89
import { page } from '$app/state';
910
import Settings from '$lib/icons/Settings.svelte';
1011
import { clickOutside } from '$lib/utils';
12+
import VerticalDots from '$lib/icons/VerticalDots.svelte';
1113
1214
let messagesContainer: HTMLDivElement;
1315
let messageValue = $state('');
14-
let openMenuId = $state<string | null>(null);
1516
1617
let userId = 'user-1';
1718
let id = page.params.id;
1819
19-
let group = {
20+
let group = $state({
2021
id: 'group-123',
2122
name: 'Design Team',
2223
avatar: 'https://i.pravatar.cc/150?img=15',
@@ -26,7 +27,7 @@
2627
{ id: 'user-2', name: 'Bob', avatar: 'https://i.pravatar.cc/150?img=2', role: 'admin' },
2728
{ id: 'user-3', name: 'Charlie', avatar: 'https://i.pravatar.cc/150?img=3', role: 'member' }
2829
]
29-
};
30+
});
3031
3132
let messages = $state([
3233
{
@@ -71,7 +72,6 @@
7172
setTimeout(scrollToBottom, 0);
7273
}
7374
74-
// Edit Dialog state and logic
7575
let openEditDialog = $state(false);
7676
let groupName = $state(group.name);
7777
let groupDescription = $state(group.description);
@@ -102,8 +102,7 @@
102102
}
103103
</script>
104104

105-
<!-- Group Header -->
106-
<section class="flex items-center justify-between gap-4 px-4 py-3 border-b border-gray-200">
105+
<section class="flex flex-col md:flex-row items-center justify-between gap-4 px-2 md:px-4 py-3 border-b border-gray-200">
107106
<div class="flex items-center gap-4">
108107
<Avatar src={group.avatar} />
109108
<div>
@@ -124,13 +123,13 @@
124123
</Button>
125124
<button
126125
onclick={() => (openEditDialog = true)}
126+
class="border border-brand-burnt-orange-900 rounded-full p-2"
127127
>
128128
<Settings size="24px" color="var(--color-brand-burnt-orange)" />
129129
</button>
130130
</div>
131131
</section>
132132

133-
<!-- Chat Area -->
134133
<section class="chat relative px-0">
135134
<div class="h-[calc(100vh-300px)] mt-4 overflow-auto" bind:this={messagesContainer}>
136135
{#each messages as msg (msg.id)}
@@ -152,7 +151,7 @@
152151
/>
153152
</section>
154153

155-
<dialog open={openEditDialog} use:clickOutside={() => openEditDialog = false} onclose={() => (openEditDialog = false)} class="absolute start-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%] p-4" >
154+
<dialog open={openEditDialog} use:clickOutside={() => openEditDialog = false} onclose={() => (openEditDialog = false)} class="w-full max-w-[300px] z-50 absolute start-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%] p-2 border border-gray-100 rounded-4xl" >
156155
<div class="flex flex-col gap-6">
157156
<div>
158157
<InputFile
@@ -166,10 +165,11 @@
166165
}}
167166
/>
168167
{#if groupImageDataUrl}
169-
<img
168+
<Avatar
169+
class="mt-4"
170170
src={groupImageDataUrl}
171171
alt="Group preview"
172-
class="mt-2 h-24 w-24 rounded-full object-cover"
172+
size="lg"
173173
/>
174174
{/if}
175175
</div>

0 commit comments

Comments
 (0)