Skip to content

Commit 21fc810

Browse files
committed
chore: formatting and added prettier in group-charter-manager.
1 parent 1b131ba commit 21fc810

File tree

7 files changed

+202
-202
lines changed

7 files changed

+202
-202
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# testing
2+
/coverage
3+
4+
# next.js
5+
/.next/
6+
/.vercel/
7+
/out/
8+
9+
# production
10+
/build
11+
12+
# compiled js functions
13+
/functions/lib/
14+
15+
# python
16+
*.py
17+
.mypy_cache/
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"singleQuote": true,
3+
"jsxSingleQuote": true,
4+
"trailingComma": "none"
5+
}
Lines changed: 48 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,50 @@
11
{
2-
"name": "group-charter-manager",
3-
"version": "0.1.0",
4-
"private": true,
5-
"scripts": {
6-
"dev": "next dev --turbopack",
7-
"build": "next build",
8-
"start": "next start",
9-
"lint": "next lint"
10-
},
11-
"dependencies": {
12-
"@hookform/resolvers": "^3.10.0",
13-
"@radix-ui/react-alert-dialog": "^1.1.7",
14-
"@radix-ui/react-dialog": "^1.1.7",
15-
"@radix-ui/react-dropdown-menu": "^2.1.7",
16-
"@radix-ui/react-label": "^2.1.3",
17-
"@radix-ui/react-popover": "^1.1.7",
18-
"@radix-ui/react-slot": "^1.2.0",
19-
"@radix-ui/react-switch": "^1.1.4",
20-
"@tailwindcss/typography": "^0.5.16",
21-
"@tiptap/extension-placeholder": "^2.24.0",
22-
"@tiptap/react": "^2.24.0",
23-
"@tiptap/starter-kit": "^2.24.0",
24-
"class-variance-authority": "^0.7.1",
25-
"clsx": "^2.1.1",
26-
"cmdk": "^1.1.1",
27-
"lucide-react": "^0.453.0",
28-
"next": "15.4.2",
29-
"react": "19.1.0",
30-
"react-dom": "19.1.0",
31-
"react-hook-form": "^7.55.0",
32-
"tailwind-merge": "^3.3.1",
33-
"tailwindcss-animate": "^1.0.7",
34-
"zod": "^3.24.2"
35-
},
36-
"devDependencies": {
37-
"@eslint/eslintrc": "^3",
38-
"@tailwindcss/postcss": "^4.1.11",
39-
"@types/node": "^20",
40-
"@types/react": "^19",
41-
"@types/react-dom": "^19",
42-
"eslint": "^9",
43-
"eslint-config-next": "15.4.2",
44-
"tailwindcss": "^4.1.11",
45-
"typescript": "^5"
46-
}
2+
"name": "group-charter-manager",
3+
"version": "0.1.0",
4+
"private": true,
5+
"scripts": {
6+
"dev": "next dev --turbopack",
7+
"build": "next build",
8+
"start": "next start",
9+
"lint": "next lint",
10+
"format": "prettier --check ."
11+
},
12+
"dependencies": {
13+
"@hookform/resolvers": "^3.10.0",
14+
"@radix-ui/react-alert-dialog": "^1.1.7",
15+
"@radix-ui/react-dialog": "^1.1.7",
16+
"@radix-ui/react-dropdown-menu": "^2.1.7",
17+
"@radix-ui/react-label": "^2.1.3",
18+
"@radix-ui/react-popover": "^1.1.7",
19+
"@radix-ui/react-slot": "^1.2.0",
20+
"@radix-ui/react-switch": "^1.1.4",
21+
"@tailwindcss/typography": "^0.5.16",
22+
"@tiptap/extension-placeholder": "^2.24.0",
23+
"@tiptap/react": "^2.24.0",
24+
"@tiptap/starter-kit": "^2.24.0",
25+
"class-variance-authority": "^0.7.1",
26+
"clsx": "^2.1.1",
27+
"cmdk": "^1.1.1",
28+
"lucide-react": "^0.453.0",
29+
"next": "15.4.2",
30+
"react": "19.1.0",
31+
"react-dom": "19.1.0",
32+
"react-hook-form": "^7.55.0",
33+
"tailwind-merge": "^3.3.1",
34+
"tailwindcss-animate": "^1.0.7",
35+
"zod": "^3.24.2"
36+
},
37+
"devDependencies": {
38+
"@eslint/eslintrc": "^3",
39+
"@tailwindcss/postcss": "^4.1.11",
40+
"@types/node": "^20",
41+
"@types/react": "^19",
42+
"@types/react-dom": "^19",
43+
"eslint": "^9",
44+
"eslint-config-next": "15.4.2",
45+
"prettier": "^3.6.2",
46+
"prettier-plugin-tailwindcss": "^0.6.14",
47+
"tailwindcss": "^4.1.11",
48+
"typescript": "^5"
49+
}
4750
}

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

Lines changed: 43 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
import Settings from '$lib/icons/Settings.svelte';
88
import { clickOutside } from '$lib/utils';
99
import { Pen01FreeIcons } from '@hugeicons/core-free-icons';
10-
import {HugeiconsIcon} from "@hugeicons/svelte"
10+
import { HugeiconsIcon } from '@hugeicons/svelte';
1111
1212
let messagesContainer: HTMLDivElement;
1313
let messageValue = $state('');
@@ -20,9 +20,19 @@
2020
avatar: 'https://i.pravatar.cc/150?img=15',
2121
description: 'Discuss all design-related tasks and updates here.',
2222
members: [
23-
{ id: 'user-1', name: 'Alice', avatar: 'https://i.pravatar.cc/150?img=1', role: 'owner' },
23+
{
24+
id: 'user-1',
25+
name: 'Alice',
26+
avatar: 'https://i.pravatar.cc/150?img=1',
27+
role: 'owner'
28+
},
2429
{ id: 'user-2', name: 'Bob', avatar: 'https://i.pravatar.cc/150?img=2', role: 'admin' },
25-
{ id: 'user-3', name: 'Charlie', avatar: 'https://i.pravatar.cc/150?img=3', role: 'member' }
30+
{
31+
id: 'user-3',
32+
name: 'Charlie',
33+
avatar: 'https://i.pravatar.cc/150?img=3',
34+
role: 'member'
35+
}
2636
]
2737
});
2838
@@ -75,7 +85,7 @@
7585
let groupImageDataUrl = $state(group.avatar);
7686
let groupImageFiles = $state<FileList | undefined>();
7787
78-
$effect(()=> {
88+
$effect(() => {
7989
if (groupImageFiles?.[0]) {
8090
const file = groupImageFiles[0];
8191
const reader = new FileReader();
@@ -86,8 +96,8 @@
8696
};
8797
reader.readAsDataURL(file);
8898
}
89-
})
90-
99+
});
100+
91101
function saveGroupInfo() {
92102
group.name = groupName;
93103
group.description = groupDescription;
@@ -99,7 +109,9 @@
99109
const canEdit = currentUser?.role === 'admin' || currentUser?.role === 'owner';
100110
</script>
101111

102-
<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">
112+
<section
113+
class="flex flex-col items-center justify-between gap-4 border-b border-gray-200 px-2 py-3 md:flex-row md:px-4"
114+
>
103115
<div class="flex items-center gap-4">
104116
<Avatar src={group.avatar} />
105117
<div>
@@ -120,15 +132,15 @@
120132
</Button>
121133
<button
122134
onclick={() => (openEditDialog = true)}
123-
class="border border-brand-burnt-orange-900 rounded-full p-2"
135+
class="border-brand-burnt-orange-900 rounded-full border p-2"
124136
>
125137
<Settings size="24px" color="var(--color-brand-burnt-orange)" />
126138
</button>
127139
</div>
128140
</section>
129141

130142
<section class="chat relative px-0">
131-
<div class="h-[calc(100vh-300px)] mt-4 overflow-auto" bind:this={messagesContainer}>
143+
<div class="mt-4 h-[calc(100vh-300px)] overflow-auto" bind:this={messagesContainer}>
132144
{#each messages as msg (msg.id)}
133145
<ChatMessage
134146
isOwn={msg.isOwn}
@@ -152,14 +164,14 @@
152164
open={openEditDialog}
153165
use:clickOutside={() => (openEditDialog = false)}
154166
onclose={() => (openEditDialog = false)}
155-
class="w-[90vw] md:max-w-[30vw] z-50 absolute start-[50%] top-[50%] translate-x-[-50%] translate-y-[-50%] p-4 border border-gray-400 rounded-3xl bg-white shadow-xl"
167+
class="absolute start-[50%] top-[50%] z-50 w-[90vw] translate-x-[-50%] translate-y-[-50%] rounded-3xl border border-gray-400 bg-white p-4 shadow-xl md:max-w-[30vw]"
156168
>
157169
<div class="flex flex-col gap-6">
158-
<div class="relative w-[96px] h-[96px] self-center">
170+
<div class="relative h-[96px] w-[96px] self-center">
159171
<img
160172
src={groupImageDataUrl || '/images/avatar-placeholder.png'}
161173
alt="Group Avatar"
162-
class="w-full h-full object-cover rounded-full border border-gray-300"
174+
class="h-full w-full rounded-full border border-gray-300 object-cover"
163175
/>
164176
{#if canEdit}
165177
<input
@@ -174,8 +186,11 @@
174186
}
175187
}}
176188
/>
177-
<label for="group-avatar-input" class="absolute bottom-0 right-0 bg-brand-burnt-orange border border-brand-burnt-orange rounded-full p-1 shadow cursor-pointer">
178-
<HugeiconsIcon icon={Pen01FreeIcons} color="white"/>
189+
<label
190+
for="group-avatar-input"
191+
class="bg-brand-burnt-orange border-brand-burnt-orange absolute right-0 bottom-0 cursor-pointer rounded-full border p-1 shadow"
192+
>
193+
<HugeiconsIcon icon={Pen01FreeIcons} color="white" />
179194
</label>
180195
{/if}
181196
</div>
@@ -193,8 +208,13 @@
193208
<Label>Description</Label>
194209
{#if canEdit}
195210
<!-- svelte-ignore element_invalid_self_closing_tag -->
196-
<textarea rows="2"
197-
maxlength="260" placeholder="Edit group description" class="w-full bg-grey py-3.5 px-6 text-[15px] text-black-800 font-geist font-normal placeholder:text-black-600 rounded-4xl outline-0 border border-transparent invalid:border-red invalid:text-red focus:invalid:text-black-800 focus:invalid:border-transparent" bind:value={groupDescription} />
211+
<textarea
212+
rows="2"
213+
maxlength="260"
214+
placeholder="Edit group description"
215+
class="bg-grey text-black-800 font-geist placeholder:text-black-600 invalid:border-red invalid:text-red focus:invalid:text-black-800 w-full rounded-4xl border border-transparent px-6 py-3.5 text-[15px] font-normal outline-0 focus:invalid:border-transparent"
216+
bind:value={groupDescription}
217+
/>
198218
{:else}
199219
<p class="text-gray-700">{group.description}</p>
200220
{/if}
@@ -203,11 +223,16 @@
203223
<hr class="text-grey" />
204224

205225
<div class="flex items-center gap-2">
206-
<Button size="sm" variant="primary" callback={() => {(openEditDialog = false)}}>Cancel</Button>
226+
<Button
227+
size="sm"
228+
variant="primary"
229+
callback={() => {
230+
openEditDialog = false;
231+
}}>Cancel</Button
232+
>
207233
{#if canEdit}
208234
<Button size="sm" variant="secondary" callback={saveGroupInfo}>Save Changes</Button>
209235
{/if}
210236
</div>
211237
</div>
212238
</dialog>
213-

0 commit comments

Comments
 (0)