diff --git a/SKILL.md b/SKILL.md index cc1e65e..66332d0 100644 --- a/SKILL.md +++ b/SKILL.md @@ -21,7 +21,7 @@ This document outlines all the modifications and setups performed during this se ## 3. Docker Environment (`Dockerfile` & `docker-compose.yml`) - Built a streamlined `Dockerfile` utilizing the `oven/bun:latest` image. The setup uses Bun for package installation (`bun install`), building (`bun run build`), and starting the app (`bun start`). -- Set up a `docker-compose.yml` file to run the Next.js container, mapping the host port `8606` to the container port `3000` (`8606:3000`) with a persistent `unless-stopped` restart policy. +- Set up `docker-compose.yml` with host port `8888` mapped to nginx on port `80` (`8888:80`); nginx proxies to the Next.js process on internal port `3000`. Keep the persistent `unless-stopped` restart policy. ## 4. Application Configuration - Configured `next.config.ts` to support specific dev origins (`allowedDevOrigins`). diff --git a/app/admin/form/[id]/client.tsx b/app/admin/form/[id]/client.tsx index 2644a18..ee7f87f 100644 --- a/app/admin/form/[id]/client.tsx +++ b/app/admin/form/[id]/client.tsx @@ -86,7 +86,7 @@ const RichTextEditor = dynamic( { ssr: false, loading: () => ( -
+
), }, ); @@ -582,7 +582,7 @@ export default function FormEditorClient({ form, initialQuestions }: FormEditorC />
-
+
))}
-
+
Preview

{previewWebhookTemplate(webhookTemplate)} @@ -383,7 +383,7 @@ export default function FormExtraClient({ form }: FormExtraClientProps) { ))}

-
+
Preview

{previewWebhookTemplate(webhookUpdateTemplate, { update: true })} diff --git a/app/admin/form/[id]/result/[submissionId]/client.tsx b/app/admin/form/[id]/result/[submissionId]/client.tsx index 74b4f96..fd03adc 100644 --- a/app/admin/form/[id]/result/[submissionId]/client.tsx +++ b/app/admin/form/[id]/result/[submissionId]/client.tsx @@ -131,7 +131,7 @@ export default function SubmissionDetailClient({ >

{q.imageUrl && ( -
+
Question image {answerValue && ( -
+
{answerValue} @@ -428,7 +428,7 @@ function AnswerImagePreview({ src, label }: { src: string; label: string }) { className="max-h-40 max-w-56 rounded object-contain" onError={() => setUnavailable(true)} /> - + @@ -444,7 +444,7 @@ function AnswerImagePreview({ src, label }: { src: string; label: string }) { width={1920} height={1080} unoptimized - className="max-h-[calc(100vh-10rem)] w-full rounded-md object-contain" + className="max-h-[calc(100vh-10rem)] w-full object-contain" onError={() => setUnavailable(true)} /> diff --git a/app/admin/form/page.tsx b/app/admin/form/page.tsx index 939df55..7f51316 100644 --- a/app/admin/form/page.tsx +++ b/app/admin/form/page.tsx @@ -49,7 +49,7 @@ export default async function AdminFormsPage() {
-
+
diff --git a/app/admin/login/page.tsx b/app/admin/login/page.tsx index c08e558..38710b2 100644 --- a/app/admin/login/page.tsx +++ b/app/admin/login/page.tsx @@ -31,7 +31,7 @@ type LoginMethodProps = { function EnvironmentBlock({ variables }: { variables: string[] }) { return ( -
+    
       {variables.map((variable) => `${variable}=\n`).join("")}
     
); diff --git a/app/admin/page.tsx b/app/admin/page.tsx index 2466d93..cdaee15 100644 --- a/app/admin/page.tsx +++ b/app/admin/page.tsx @@ -209,12 +209,12 @@ export default async function AdminPage() { {recentSubmissions.length === 0 ? ( -

+

Responses will appear here after someone submits a form.

) : ( <> -
+
diff --git a/app/admin/upload/history/page.tsx b/app/admin/upload/history/page.tsx index 03db38c..b025579 100644 --- a/app/admin/upload/history/page.tsx +++ b/app/admin/upload/history/page.tsx @@ -59,7 +59,7 @@ export default async function AdminUploadHistoryPage() { uploads.map((upload) => (

{upload.title}

diff --git a/app/admin/upload/video/latest-card.tsx b/app/admin/upload/video/latest-card.tsx index 10508ea..0329c8d 100644 --- a/app/admin/upload/video/latest-card.tsx +++ b/app/admin/upload/video/latest-card.tsx @@ -34,9 +34,9 @@ export function LatestCard({ key={video.id} href={video.url} target="_blank" - className="group flex gap-3 rounded-lg border p-2 transition-colors hover:border-primary/60" + className="group flex gap-3 border p-2 transition-colors hover:border-primary/60" > -
+
{video.thumbnailUrl ? ( -
+

404 ไม่พบหน้านี้

diff --git a/app/form/client.tsx b/app/form/client.tsx index 22451ca..5190e42 100644 --- a/app/form/client.tsx +++ b/app/form/client.tsx @@ -589,7 +589,7 @@ export function FormFillerClient({ alt={`รูปประกอบคำถาม ${plainQuestionLabel}`} fill unoptimized - className="rounded-md object-contain" + className="object-contain" sizes="(max-width: 768px) 100vw, (max-width: 1200px) 75vw, 60vw" />
@@ -879,7 +879,7 @@ export function FormFillerClient({ width={1200} height={800} unoptimized - className="max-h-[70vh] w-full rounded-md object-contain" + className="max-h-[70vh] w-full object-contain" onError={(event) => { event.currentTarget.style.display = "none"; }} diff --git a/app/form/page.tsx b/app/form/page.tsx index 3d15d90..fe6dd28 100644 --- a/app/form/page.tsx +++ b/app/form/page.tsx @@ -41,7 +41,7 @@ export default async function FormsListingPage() { return ( <> -
+

Form ทั้งหมด

{visibleForms.length === 0 ? (

ตอนนี้ยังไม่เปิดรับสัก Form

@@ -49,7 +49,7 @@ export default async function FormsListingPage() {
{visibleForms.map((form) => ( - +
{form.title} diff --git a/app/globals.css b/app/globals.css index 052b7cb..2fc4e8a 100644 --- a/app/globals.css +++ b/app/globals.css @@ -51,71 +51,71 @@ :root { --background: oklch(1 0 0); - --foreground: oklch(0.145 0 0); + --foreground: oklch(0.148 0.004 228.8); --card: oklch(1 0 0); - --card-foreground: oklch(0.145 0 0); + --card-foreground: oklch(0.148 0.004 228.8); --popover: oklch(1 0 0); - --popover-foreground: oklch(0.145 0 0); - --primary: oklch(0.518 0.253 323.949); - --primary-foreground: oklch(0.977 0.017 320.058); - --secondary: oklch(0.967 0.001 286.375); - --secondary-foreground: oklch(0.21 0.006 285.885); - --muted: oklch(0.97 0 0); - --muted-foreground: oklch(0.556 0 0); - --accent: oklch(0.97 0 0); - --accent-foreground: oklch(0.205 0 0); + --popover-foreground: oklch(0.148 0.004 228.8); + --primary: oklch(0.546 0.245 262.881); + --primary-foreground: oklch(0.97 0.014 254.604); + --secondary: oklch(0.963 0.002 197.1); + --secondary-foreground: oklch(0.218 0.008 223.9); + --muted: oklch(0.963 0.002 197.1); + --muted-foreground: oklch(0.56 0.021 213.5); + --accent: oklch(0.963 0.002 197.1); + --accent-foreground: oklch(0.218 0.008 223.9); --destructive: oklch(0.577 0.245 27.325); - --border: oklch(0.922 0 0); - --input: oklch(0.922 0 0); - --ring: oklch(0.708 0 0); - --chart-1: oklch(0.833 0.145 321.434); - --chart-2: oklch(0.667 0.295 322.15); - --chart-3: oklch(0.591 0.293 322.896); - --chart-4: oklch(0.518 0.253 323.949); - --chart-5: oklch(0.452 0.211 324.591); - --radius: 0.625rem; - --sidebar: oklch(0.985 0 0); - --sidebar-foreground: oklch(0.145 0 0); - --sidebar-primary: oklch(0.591 0.293 322.896); - --sidebar-primary-foreground: oklch(0.977 0.017 320.058); - --sidebar-accent: oklch(0.97 0 0); - --sidebar-accent-foreground: oklch(0.205 0 0); - --sidebar-border: oklch(0.922 0 0); - --sidebar-ring: oklch(0.708 0 0); + --border: oklch(0.925 0.005 214.3); + --input: oklch(0.925 0.005 214.3); + --ring: oklch(0.623 0.214 259.815); + --chart-1: oklch(0.809 0.105 251.813); + --chart-2: oklch(0.623 0.214 259.815); + --chart-3: oklch(0.546 0.245 262.881); + --chart-4: oklch(0.488 0.243 264.376); + --chart-5: oklch(0.424 0.199 265.638); + --radius: 0; + --sidebar: oklch(0.987 0.002 197.1); + --sidebar-foreground: oklch(0.148 0.004 228.8); + --sidebar-primary: oklch(0.546 0.245 262.881); + --sidebar-primary-foreground: oklch(0.97 0.014 254.604); + --sidebar-accent: oklch(0.963 0.002 197.1); + --sidebar-accent-foreground: oklch(0.218 0.008 223.9); + --sidebar-border: oklch(0.925 0.005 214.3); + --sidebar-ring: oklch(0.623 0.214 259.815); } .dark { - --background: oklch(0.145 0 0); - --foreground: oklch(0.985 0 0); - --card: oklch(0.205 0 0); - --card-foreground: oklch(0.985 0 0); - --popover: oklch(0.205 0 0); - --popover-foreground: oklch(0.985 0 0); - --primary: oklch(0.452 0.211 324.591); - --primary-foreground: oklch(0.977 0.017 320.058); - --secondary: oklch(0.274 0.006 286.033); - --secondary-foreground: oklch(0.985 0 0); - --muted: oklch(0.269 0 0); - --muted-foreground: oklch(0.708 0 0); - --accent: oklch(0.269 0 0); - --accent-foreground: oklch(0.985 0 0); + --background: oklch(0.148 0.004 228.8); + --foreground: oklch(0.987 0.002 197.1); + --card: oklch(0.218 0.008 223.9); + --card-foreground: oklch(0.987 0.002 197.1); + --popover: oklch(0.218 0.008 223.9); + --popover-foreground: oklch(0.987 0.002 197.1); + --primary: oklch(0.707 0.165 254.624); + --primary-foreground: oklch(0.97 0.014 254.604); + --secondary: oklch(0.275 0.011 216.9); + --secondary-foreground: oklch(0.987 0.002 197.1); + --muted: oklch(0.275 0.011 216.9); + --muted-foreground: oklch(0.723 0.014 214.4); + --accent: oklch(0.275 0.011 216.9); + --accent-foreground: oklch(0.987 0.002 197.1); --destructive: oklch(0.704 0.191 22.216); --border: oklch(1 0 0 / 10%); --input: oklch(1 0 0 / 15%); - --ring: oklch(0.556 0 0); - --chart-1: oklch(0.833 0.145 321.434); - --chart-2: oklch(0.667 0.295 322.15); - --chart-3: oklch(0.591 0.293 322.896); - --chart-4: oklch(0.518 0.253 323.949); - --chart-5: oklch(0.452 0.211 324.591); - --sidebar: oklch(0.205 0 0); - --sidebar-foreground: oklch(0.985 0 0); - --sidebar-primary: oklch(0.667 0.295 322.15); - --sidebar-primary-foreground: oklch(0.977 0.017 320.058); - --sidebar-accent: oklch(0.269 0 0); - --sidebar-accent-foreground: oklch(0.985 0 0); + --ring: oklch(0.623 0.214 259.815); + --chart-1: oklch(0.809 0.105 251.813); + --chart-2: oklch(0.623 0.214 259.815); + --chart-3: oklch(0.546 0.245 262.881); + --chart-4: oklch(0.488 0.243 264.376); + --chart-5: oklch(0.424 0.199 265.638); + --sidebar: oklch(0.218 0.008 223.9); + --sidebar-foreground: oklch(0.987 0.002 197.1); + --sidebar-primary: oklch(0.707 0.165 254.624); + --sidebar-primary-foreground: oklch(0.97 0.014 254.604); + --sidebar-accent: oklch(0.275 0.011 216.9); + --sidebar-accent-foreground: oklch(0.987 0.002 197.1); --sidebar-border: oklch(1 0 0 / 10%); - --sidebar-ring: oklch(0.556 0 0); + --sidebar-ring: oklch(0.623 0.214 259.815); } @layer base { diff --git a/app/not-found.tsx b/app/not-found.tsx index 3fbdc00..661caac 100644 --- a/app/not-found.tsx +++ b/app/not-found.tsx @@ -23,7 +23,7 @@ export default function NotFound() { const [message] = useState(() => MESSAGES[Math.floor(Math.random() * MESSAGES.length)]); return ( -
+
-
+

404 ไม่พบหน้านี้

diff --git a/app/page.tsx b/app/page.tsx index 3b4d485..f5ce372 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -42,7 +42,7 @@ export default async function Home() { return ( -
+