Skip to content

Commit 774554e

Browse files
committed
fix: update control panel css for tailwind 4
1 parent 6fe8d70 commit 774554e

File tree

9 files changed

+167
-171
lines changed

9 files changed

+167
-171
lines changed

infrastructure/control-panel/src/app.css

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -32,40 +32,40 @@
3232
.small {
3333
@apply text-xs/[1.5] font-normal text-black;
3434
}
35-
}
3635

37-
@theme {
38-
/* Custom theme */
39-
--color-primary: #8e52ff;
40-
--color-primary-100: #e8dcff;
41-
--color-primary-200: #d2baff;
42-
--color-primary-300: #bb97ff;
43-
--color-primary-400: #a575ff;
44-
--color-primary-500: #8e52ff;
36+
:root {
37+
/* Custom theme */
38+
--color-primary: #8e52ff;
39+
--color-primary-100: #e8dcff;
40+
--color-primary-200: #d2baff;
41+
--color-primary-300: #bb97ff;
42+
--color-primary-400: #a575ff;
43+
--color-primary-500: #8e52ff;
4544

46-
--color-secondary: #73efd5;
47-
--color-secondary-100: #e3fcf7;
48-
--color-secondary-200: #c7f9ee;
49-
--color-secondary-300: #abf6e6;
50-
--color-secondary-400: #8ff2dd;
51-
--color-secondary-500: #73efd5;
45+
--color-secondary: #73efd5;
46+
--color-secondary-100: #e3fcf7;
47+
--color-secondary-200: #c7f9ee;
48+
--color-secondary-300: #abf6e6;
49+
--color-secondary-400: #8ff2dd;
50+
--color-secondary-500: #73efd5;
5251

53-
--color-white: #ffffff;
54-
--color-gray: #f5f5f5;
52+
--color-white: #ffffff;
53+
--color-gray: #f5f5f5;
5554

56-
--color-black: #1f1f1f;
57-
--color-black-100: #d2d2d2;
58-
--color-black-300: #a5a5a5;
59-
--color-black-500: #797979;
60-
--color-black-700: #4c4c4c;
61-
--color-black-900: #1f1f1f;
55+
--color-black: #1f1f1f;
56+
--color-black-100: #d2d2d2;
57+
--color-black-300: #a5a5a5;
58+
--color-black-500: #797979;
59+
--color-black-700: #4c4c4c;
60+
--color-black-900: #1f1f1f;
6261

63-
--color-danger: #ff5255;
64-
--color-danger-100: #ffdcdd;
65-
--color-danger-200: #ffb1a7;
66-
--color-danger-300: #ff968e;
67-
--color-danger-400: #ff7b77;
68-
--color-danger-500: #ff5255;
62+
--color-danger: #ff5255;
63+
--color-danger-100: #ffdcdd;
64+
--color-danger-200: #ffb1a7;
65+
--color-danger-300: #ff968e;
66+
--color-danger-400: #ff7b77;
67+
--color-danger-500: #ff5255;
6968

70-
--color-green: #0fb340;
69+
--color-green: #0fb340;
70+
}
7171
}
Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
export { default as Icons } from "./Icons.svelte";
2-
export { default as Like } from "./Like.svelte";
3-
export { default as Refresh } from "./Refresh.svelte";
4-
export { default as CommentIcon } from "./CommentIcon.svelte";
5-
export { default as VerticalDots } from "./VerticalDots.svelte";
6-
export { default as Home } from "./Home.svelte";
7-
export { default as Flash } from "./Flash.svelte";
8-
export { default as CommentsTwo } from "./CommentsTwo.svelte";
9-
export { default as Search } from "./Search.svelte";
10-
export { default as Camera } from "./Camera.svelte";
11-
export { default as Settings } from "./Settings.svelte";
12-
export { default as Cross } from "./Cross.svelte";
13-
export { default as W3dslogo } from "./W3dslogo.svelte";
1+
export { default as Icons } from './Icons.svelte';
2+
export { default as Like } from './Like.svelte';
3+
export { default as Refresh } from './Refresh.svelte';
4+
export { default as CommentIcon } from './CommentIcon.svelte';
5+
export { default as VerticalDots } from './VerticalDots.svelte';
6+
export { default as Home } from './Home.svelte';
7+
export { default as Flash } from './Flash.svelte';
8+
export { default as CommentsTwo } from './CommentsTwo.svelte';
9+
export { default as Search } from './Search.svelte';
10+
export { default as Camera } from './Camera.svelte';
11+
export { default as Settings } from './Settings.svelte';
12+
export { default as Cross } from './Cross.svelte';
13+
export { default as W3dslogo } from './W3dslogo.svelte';

platforms/pictique/src/lib/stores/disclaimer.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { writable } from "svelte/store";
1+
import { writable } from 'svelte/store';
22

33
export const isDisclaimerModalOpen = writable(true);
44

Lines changed: 34 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
import type { Post } from "$lib/types";
2-
import { apiClient } from "$lib/utils/axios";
3-
import { writable } from "svelte/store";
1+
import type { Post } from '$lib/types';
2+
import { apiClient } from '$lib/utils/axios';
3+
import { writable } from 'svelte/store';
44

55
export const posts = writable<Post[]>([]);
66
export const isLoading = writable(false);
@@ -11,45 +11,41 @@ export const openCreatePostModal = () => isCreatePostModalOpen.set(true);
1111
export const closeCreatePostModal = () => isCreatePostModalOpen.set(false);
1212

1313
export const fetchFeed = async (page = 1, limit = 10_000) => {
14-
try {
15-
isLoading.set(true);
16-
error.set(null);
17-
const response = await apiClient.get(
18-
`/api/posts/feed?page=${page}&limit=${limit}`,
19-
);
20-
posts.set(response.data.posts);
21-
} catch (err) {
22-
error.set(err instanceof Error ? err.message : "Failed to fetch feed");
23-
} finally {
24-
isLoading.set(false);
25-
}
14+
try {
15+
isLoading.set(true);
16+
error.set(null);
17+
const response = await apiClient.get(`/api/posts/feed?page=${page}&limit=${limit}`);
18+
posts.set(response.data.posts);
19+
} catch (err) {
20+
error.set(err instanceof Error ? err.message : 'Failed to fetch feed');
21+
} finally {
22+
isLoading.set(false);
23+
}
2624
};
2725

2826
export const createPost = async (text: string, images: string[]) => {
29-
try {
30-
isLoading.set(true);
31-
error.set(null);
32-
const response = await apiClient.post("/api/posts", {
33-
text,
34-
images: images.map((img) => img),
35-
});
36-
await fetchFeed(1);
37-
return response.data;
38-
} catch (err) {
39-
error.set(err instanceof Error ? err.message : "Failed to create post");
40-
throw err;
41-
} finally {
42-
isLoading.set(false);
43-
}
27+
try {
28+
isLoading.set(true);
29+
error.set(null);
30+
const response = await apiClient.post('/api/posts', {
31+
text,
32+
images: images.map((img) => img)
33+
});
34+
await fetchFeed(1);
35+
return response.data;
36+
} catch (err) {
37+
error.set(err instanceof Error ? err.message : 'Failed to create post');
38+
throw err;
39+
} finally {
40+
isLoading.set(false);
41+
}
4442
};
4543

4644
export const toggleLike = async (postId: string) => {
47-
try {
48-
const response = await apiClient.post(`/api/posts/${postId}/like`);
49-
return response.data;
50-
} catch (err) {
51-
throw new Error(
52-
err instanceof Error ? err.message : "Failed to toggle like",
53-
);
54-
}
45+
try {
46+
const response = await apiClient.post(`/api/posts/${postId}/like`);
47+
return response.data;
48+
} catch (err) {
49+
throw new Error(err instanceof Error ? err.message : 'Failed to toggle like');
50+
}
5551
};
Lines changed: 84 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -1,111 +1,111 @@
1-
import type { SVGAttributes } from "svelte/elements";
1+
import type { SVGAttributes } from 'svelte/elements';
22

33
export interface ISvgProps extends SVGAttributes<SVGElement> {
4-
size?: number | string;
5-
color?: string;
4+
size?: number | string;
5+
color?: string;
66
}
77

88
export type CommentType = {
9-
commentId: string;
10-
name: string;
11-
userImgSrc: string;
12-
comment: string;
13-
isUpVoted: boolean;
14-
isDownVoted: boolean;
15-
upVotes: number;
16-
time: string;
17-
replies: CommentType[];
9+
commentId: string;
10+
name: string;
11+
userImgSrc: string;
12+
comment: string;
13+
isUpVoted: boolean;
14+
isDownVoted: boolean;
15+
upVotes: number;
16+
time: string;
17+
replies: CommentType[];
1818
};
1919

2020
export type PostData = {
21-
createdAt: string | number | Date;
22-
id: string;
23-
avatar: string;
24-
userId: string;
25-
username: string;
26-
imgUris: string[];
27-
caption: string;
28-
time: string;
29-
count: {
30-
likes: number;
31-
comments: number;
32-
};
21+
createdAt: string | number | Date;
22+
id: string;
23+
avatar: string;
24+
userId: string;
25+
username: string;
26+
imgUris: string[];
27+
caption: string;
28+
time: string;
29+
count: {
30+
likes: number;
31+
comments: number;
32+
};
3333
};
3434

3535
export interface Post {
36-
id: string;
37-
text: string;
38-
images: string[];
39-
author: {
40-
id: string;
41-
handle: string;
42-
name: string;
43-
avatarUrl: string;
44-
};
45-
createdAt: string;
46-
likedBy: userProfile[];
47-
comments: {
48-
id: string;
49-
text: string;
50-
author: {
51-
id: string;
52-
handle: string;
53-
name: string;
54-
avatarUrl: string;
55-
};
56-
createdAt: string;
57-
}[];
36+
id: string;
37+
text: string;
38+
images: string[];
39+
author: {
40+
id: string;
41+
handle: string;
42+
name: string;
43+
avatarUrl: string;
44+
};
45+
createdAt: string;
46+
likedBy: userProfile[];
47+
comments: {
48+
id: string;
49+
text: string;
50+
author: {
51+
id: string;
52+
handle: string;
53+
name: string;
54+
avatarUrl: string;
55+
};
56+
createdAt: string;
57+
}[];
5858
}
5959

6060
export type userProfile = {
61-
id: string;
62-
handle: string;
63-
name: string;
64-
description: string;
65-
avatarUrl: string;
66-
totalPosts: number;
67-
followers: number;
68-
following: number;
69-
posts: PostData[];
70-
username: string;
61+
id: string;
62+
handle: string;
63+
name: string;
64+
description: string;
65+
avatarUrl: string;
66+
totalPosts: number;
67+
followers: number;
68+
following: number;
69+
posts: PostData[];
70+
username: string;
7171
};
7272

7373
export type Image = {
74-
url: string;
75-
alt: string;
74+
url: string;
75+
alt: string;
7676
};
7777

7878
export type GroupInfo = {
79-
id: string;
80-
name: string;
81-
avatar: string;
79+
id: string;
80+
name: string;
81+
avatar: string;
8282
};
8383

8484
export type Chat = {
85-
id: string;
86-
avatar: string;
87-
handle: string;
88-
unread: boolean;
89-
text: string;
90-
participants: {
91-
id: string;
92-
name?: string;
93-
handle?: string;
94-
ename?: string;
95-
avatarUrl: string;
96-
}[];
97-
latestMessage: {
98-
text: string;
99-
isRead: boolean;
100-
};
85+
id: string;
86+
avatar: string;
87+
handle: string;
88+
unread: boolean;
89+
text: string;
90+
participants: {
91+
id: string;
92+
name?: string;
93+
handle?: string;
94+
ename?: string;
95+
avatarUrl: string;
96+
}[];
97+
latestMessage: {
98+
text: string;
99+
isRead: boolean;
100+
};
101101
};
102102

103103
export type MessageType = {
104-
id: string;
105-
avatar: string;
106-
handle: string;
107-
unread: boolean;
108-
text: string;
109-
name: string;
110-
username: string;
104+
id: string;
105+
avatar: string;
106+
handle: string;
107+
unread: boolean;
108+
text: string;
109+
name: string;
110+
username: string;
111111
};

0 commit comments

Comments
 (0)