Skip to content

Commit ce525a6

Browse files
committed
Add model to project review page
1 parent 74580a3 commit ce525a6

File tree

1 file changed

+24
-3
lines changed

1 file changed

+24
-3
lines changed

src/routes/dashboard/admin/review/[id]/+page.svelte

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
import relativeDate from 'tiny-relative-date';
33
import Devlog from '$lib/components/Devlog.svelte';
44
import Head from '$lib/components/Head.svelte';
5-
import { ExternalLink } from '@lucide/svelte';
65
import { enhance } from '$app/forms';
76
import { projectStatuses } from '$lib/utils.js';
87
import ProjectLinks from '$lib/components/ProjectLinks.svelte';
8+
import ThreeMFPreview from '$lib/components/ThreeMFPreview.svelte';
9+
import { Download } from '@lucide/svelte';
910
1011
let { data } = $props();
1112
@@ -14,7 +15,9 @@
1415

1516
<Head title={'Review: ' + data.project.project.name} />
1617

17-
<div class="flex h-full flex-row gap-5">
18+
<div
19+
class="-mt-5 -mr-5 flex h-full flex-row [&>*]:-mb-5 [&>*]:overflow-x-clip [&>*]:pt-5 [&>*]:pr-5"
20+
>
1821
<div class="grow overflow-scroll">
1922
<div class="flex grow flex-col gap-3">
2023
<h1 class="mt-5 font-hero text-2xl font-medium">{data.project.project.name}</h1>
@@ -82,6 +85,24 @@
8285
</div>
8386
</div>
8487

88+
<div class="mt-2 flex flex-row">
89+
<h2 class="grow text-2xl font-bold">3D model</h2>
90+
<a
91+
href={`${data.s3PublicUrl}/${data.project.project.modelFile}`}
92+
download
93+
class="button primary flex flex-col justify-center rounded-lg px-3 hover:outline-3 focus:outline-3"
94+
>
95+
<Download />
96+
</a>
97+
</div>
98+
99+
<div class="themed-box flex h-100 flex-col gap-3 overflow-clip">
100+
<ThreeMFPreview
101+
identifier="model"
102+
modelUrl={`${data.s3PublicUrl}/${data.project.project.modelFile}`}
103+
/>
104+
</div>
105+
85106
<h2 class="mt-2 text-2xl font-bold">Review</h2>
86107
<div class="themed-box flex flex-col gap-3 p-3">
87108
<form
@@ -138,7 +159,7 @@
138159
</div>
139160
</div>
140161
</div>
141-
<div class="w-50 min-w-50 overflow-scroll lg:w-65 lg:min-w-65">
162+
<div class="w-60 min-w-60 overflow-scroll lg:w-70 lg:min-w-70">
142163
<div class="mb-5 flex flex-col gap-3">
143164
<h1 class="text-2xl font-bold">Review history</h1>
144165
{#each data.t1Reviews as review}

0 commit comments

Comments
 (0)