schema index

This commit is contained in:
2026-01-08 18:50:32 +02:00
parent 238283bb9a
commit 2a718ac9ee
12 changed files with 241 additions and 138 deletions
@@ -1,5 +1,5 @@
<script>
import ChannelLayout from "../../layouts/ChannelLayout.svelte";
import SchemaLayout from "../../layouts/SchemaLayout.svelte";
import { post } from "../../modules/remote";
import { getApp } from "../../app";
let { channel, user, data, newRank } = $props();
@@ -28,7 +28,7 @@
}
</script>
<ChannelLayout {body} {channel} {user}></ChannelLayout>
<SchemaLayout {body} {channel} {user}></SchemaLayout>
{#snippet body()}
<h3 class="header-small mb-4 mt-5">Create a <em>{data.type}</em> field</h3>
@@ -1,5 +1,5 @@
<script>
import ChannelLayout from "../../layouts/ChannelLayout.svelte";
import SchemaLayout from "../../layouts/SchemaLayout.svelte";
import TextFieldProps from "./TextFieldProps.svelte";
import DeleteButton from "../../common/DeleteButton.svelte";
import { post } from "../../modules/remote";
@@ -42,7 +42,7 @@
}
</script>
<ChannelLayout {body} {channel} {user}></ChannelLayout>
<SchemaLayout {body} {channel} {user}></SchemaLayout>
{#snippet body()}
<h3 class="header-small mb-4 mt-5">
Edit <em>{data.field.type}</em> field {data.field.name}
+2 -2
View File
@@ -3,7 +3,7 @@
import RecordRow from "./RecordRow.svelte";
import ChannelLayout from "../../layouts/ChannelLayout.svelte";
import { get } from "../../modules/remote";
let { channel, user } = $props();
let { channel, user, data } = $props();
let records = $state([]);
let graph = $state(null);
let users = $state([]);
@@ -16,7 +16,7 @@
});
</script>
<ChannelLayout {body} {channel} {user}></ChannelLayout>
<ChannelLayout {body} {channel} schemas={data.schemas} {user}></ChannelLayout>
{#snippet body()}
<h3 class="header-small mb-4 mt-5">Latest Content changes</h3>
{#if records.length > 0}
@@ -1,5 +1,5 @@
<script>
import ChannelLayout from "../../layouts/ChannelLayout.svelte";
import SchemaLayout from "../../layouts/SchemaLayout.svelte";
import Sortable from "../../common/Sortable.svelte";
import DeleteButton from "../../common/DeleteButton.svelte";
import { post } from "../../modules/remote";
@@ -42,7 +42,7 @@
}
</script>
<ChannelLayout {body} {channel} {user}></ChannelLayout>
<SchemaLayout {body} {channel} {user}></SchemaLayout>
{#snippet body()}
<h3>Edit Schema</h3>
@@ -1,5 +1,5 @@
<script>
import ChannelLayout from "../../layouts/ChannelLayout.svelte";
import SchemaLayout from "../../layouts/SchemaLayout.svelte";
import Sortable from "../../common/Sortable.svelte";
import { post } from "../../modules/remote";
import { getApp } from "../../app";
@@ -40,7 +40,7 @@
}
</script>
<ChannelLayout {body} {channel} {user}></ChannelLayout>
<SchemaLayout {body} {channel} {user}></SchemaLayout>
{#snippet body()}
<h3 class="header-small mb-4 mt-5">Schemas</h3>
+2 -2
View File
@@ -1,13 +1,13 @@
<script>
import Header from "./Header.svelte";
import Navbar from "./Navbar.svelte";
let { body, channel, user } = $props();
let { body, channel, user, schemas } = $props();
</script>
<Header {channel} {user}></Header>
<main>
<aside class="sidebar-content">
<Navbar {channel}></Navbar>
<Navbar {channel} {schemas}></Navbar>
</aside>
<div class="main-content">
{@render body()}
+1
View File
@@ -6,6 +6,7 @@
<div class="top-nav">
<a class="top-nav-item" href="{channel.lucentUrl}/members">Members</a>
<a class="top-nav-item" href="{channel.lucentUrl}/">Content</a>
<a class="top-nav-item" href="{channel.lucentUrl}/schemas">Schemas</a>
<!-- {#if channel.commands.length > 0}
+10 -1
View File
@@ -1,3 +1,12 @@
<script>
let { channel } = $props();
import { getApp } from "../app";
let { channel, schemas } = $props();
const app = getApp();
</script>
<details name="example" open>
<summary>Content</summary>
{#each schemas as schema}
<div><a href={app.url("content/" + schema.id)}>{schema.name}</a></div>
{/each}
</details>
+11
View File
@@ -0,0 +1,11 @@
<script>
import Header from "./Header.svelte";
let { body, channel, user } = $props();
</script>
<Header {channel} {user}></Header>
<main>
<div class="main-content">
{@render body()}
</div>
</main>