mirror of
https://github.com/anotherhadi/iknowyou.git
synced 2026-04-11 16:37:25 +02:00
25 lines
616 B
Svelte
25 lines
616 B
Svelte
<script>
|
|
import { FlaskConical } from "@lucide/svelte";
|
|
|
|
let demo = $state(false);
|
|
|
|
async function checkDemo() {
|
|
try {
|
|
const res = await fetch("/api/config");
|
|
if (res.ok) {
|
|
const data = await res.json();
|
|
demo = data.demo === true;
|
|
}
|
|
} catch (_) {}
|
|
}
|
|
|
|
checkDemo();
|
|
</script>
|
|
|
|
{#if demo}
|
|
<div class="w-full bg-warning/15 border-b border-warning/30 py-1.5 px-4 flex items-center justify-center gap-2 text-xs text-warning">
|
|
<FlaskConical size={13} class="shrink-0" />
|
|
<span>Demo mode — searches and configuration changes are disabled</span>
|
|
</div>
|
|
{/if}
|