|
5 | 5 | import CreatePostModal from '$lib/fragments/CreatePostModal/CreatePostModal.svelte';
|
6 | 6 | import { showComments } from '$lib/store/store.svelte';
|
7 | 7 | import { activePostId, comments, createComment, fetchComments } from '$lib/stores/comments';
|
| 8 | + import { closeDisclaimerModal, isDisclaimerModalOpen } from '$lib/stores/disclaimer'; |
8 | 9 | import { isCreatePostModalOpen, openCreatePostModal } from '$lib/stores/posts';
|
9 | 10 | import type { userProfile } from '$lib/types';
|
| 11 | + import { Button, Modal } from '$lib/ui'; |
10 | 12 | import { apiClient, getAuthId, getAuthToken } from '$lib/utils';
|
| 13 | + import { removeAuthId, removeAuthToken } from '$lib/utils'; |
11 | 14 | import type { AxiosError } from 'axios';
|
12 | 15 | import { onMount } from 'svelte';
|
13 | 16 | import { heading } from '../store';
|
|
22 | 25 | let isCommentsLoading = $state(false);
|
23 | 26 | let commentsError = $state<string | null>(null);
|
24 | 27 | let profile = $state<userProfile | null>(null);
|
| 28 | + let confirmedDisclaimer = $state(false); |
25 | 29 |
|
26 | 30 | const handleSend = async () => {
|
27 | 31 | console.log($activePostId, commentValue);
|
|
123 | 127 | </section>
|
124 | 128 | {#if route === '/home' || route === '/messages'}
|
125 | 129 | <aside
|
126 |
| - class="hide-scrollbar relative hidden h-[100dvh] overflow-y-scroll border border-e-0 border-t-0 border-b-0 border-s-gray-200 px-8 pt-14 md:block" |
| 130 | + class="hide-scrollbar relative hidden h-[100dvh] overflow-y-scroll border border-b-0 border-e-0 border-t-0 border-s-gray-200 px-8 pt-14 md:block" |
127 | 131 | >
|
128 | 132 | {#if route === '/home'}
|
129 | 133 | {#if showComments.value}
|
|
156 | 160 | {/each}
|
157 | 161 | {/if}
|
158 | 162 | <MessageInput
|
159 |
| - class="sticky start-0 bottom-4 mt-4 w-full px-2" |
| 163 | + class="sticky bottom-4 start-0 mt-4 w-full px-2" |
160 | 164 | variant="comment"
|
161 | 165 | src={profile?.avatarUrl ?? '/images/user.png'}
|
162 | 166 | bind:value={commentValue}
|
|
175 | 179 | </main>
|
176 | 180 |
|
177 | 181 | <CreatePostModal bind:open={$isCreatePostModalOpen} />
|
| 182 | +<Modal |
| 183 | + open={$isDisclaimerModalOpen} |
| 184 | + onclose={() => { |
| 185 | + if (!confirmedDisclaimer) { |
| 186 | + removeAuthToken(); |
| 187 | + removeAuthId(); |
| 188 | + goto('/auth'); |
| 189 | + } |
| 190 | + }} |
| 191 | +> |
| 192 | + <article class="flex max-w-[400px] flex-col gap-2 p-4"> |
| 193 | + <h1>Disclaimer from MetaState Foundation</h1> |
| 194 | + <p class="font-bold">⚠️ Please note:</p> |
| 195 | + <p> |
| 196 | + Pictique is a <b>functional prototype</b>, intended to showcase <b>interoperability</b> and |
| 197 | + core concepts of the W3DS ecosystem. |
| 198 | + </p> |
| 199 | + <p> |
| 200 | + <b>It is not a production-grade platform</b> and may lack full reliability, performance, |
| 201 | + and security guarantees. |
| 202 | + </p> |
| 203 | + <p> |
| 204 | + We <b>strongly recommend</b> that you avoid sharing <b>sensitive or private content</b>, |
| 205 | + and kindly ask for your understanding regarding any bugs, incomplete features, or |
| 206 | + unexpected behaviours. |
| 207 | + </p> |
| 208 | + <p> |
| 209 | + The app is still in development, so we kindly ask for your understanding regarding any |
| 210 | + potential issues. If you experience issues or have feedback, feel free to contact us at: |
| 211 | + </p> |
| 212 | + < a href= "mailto:[email protected]" class= "font-bold outline-none"> |
| 213 | + |
| 214 | + </a> |
| 215 | + <Button |
| 216 | + variant="secondary" |
| 217 | + size="sm" |
| 218 | + class="mt-2" |
| 219 | + callback={() => { |
| 220 | + closeDisclaimerModal(); |
| 221 | + confirmedDisclaimer = true; |
| 222 | + }}>I Understand</Button |
| 223 | + > |
| 224 | + </article> |
| 225 | +</Modal> |
0 commit comments