improve guild selection, add Wip
This commit is contained in:
parent
f0a0700aa1
commit
80ecfd6747
7 changed files with 22 additions and 12 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "@yusurko/vigil",
|
"name": "@yusurko/vigil",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.1.0-dev42",
|
"version": "0.1.0-dev43",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite dev",
|
"dev": "vite dev",
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
import { backend, type GuildEntry } from "./backend";
|
import { backend, type GuildEntry } from "./backend";
|
||||||
|
|
||||||
|
|
||||||
let value = $state("");
|
let { value = $bindable("") } = $props();
|
||||||
|
|
||||||
let suggestions: Promise<GuildEntry[]> = $derived(getSuggestions(value));
|
let suggestions: Promise<GuildEntry[]> = $derived(getSuggestions(value));
|
||||||
|
|
||||||
|
|
|
||||||
8
src/lib/Wip.svelte
Normal file
8
src/lib/Wip.svelte
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<script lang="ts">
|
||||||
|
import { RiBarricadeLine } from "svelte-remixicon";
|
||||||
|
import Centered from "./Centered.svelte";
|
||||||
|
|
||||||
|
</script>
|
||||||
|
<Centered>
|
||||||
|
<faint><RiBarricadeLine /></faint>
|
||||||
|
</Centered>
|
||||||
|
|
@ -22,8 +22,6 @@ export function setHealth ({ name, version, post_count, user_count, color_theme
|
||||||
health.color_theme = color_theme;
|
health.color_theme = color_theme;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export function setMe (me: UserEntry | null) {
|
export function setMe (me: UserEntry | null) {
|
||||||
health.me = me;
|
health.me = me;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,14 +4,16 @@
|
||||||
import { getMe } from "$lib/globals.svelte";
|
import { getMe } from "$lib/globals.svelte";
|
||||||
import GuildSelect from "$lib/GuildSelect.svelte";
|
import GuildSelect from "$lib/GuildSelect.svelte";
|
||||||
import SLayout from "$lib/SLayout.svelte";
|
import SLayout from "$lib/SLayout.svelte";
|
||||||
|
import Wip from "$lib/Wip.svelte";
|
||||||
import { RiErrorWarningLine } from "svelte-remixicon";
|
import { RiErrorWarningLine } from "svelte-remixicon";
|
||||||
|
|
||||||
let me = getMe();
|
let me = getMe();
|
||||||
|
|
||||||
let content = $state("");
|
let content = $state("");
|
||||||
let privacy = $state(0);
|
let privacy = $state(0);
|
||||||
|
let guildName = $state("");
|
||||||
|
|
||||||
|
let enablePost = $derived(!!content && !!guildName && false);
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -22,7 +24,7 @@
|
||||||
|
|
||||||
<label>
|
<label>
|
||||||
Post to:
|
Post to:
|
||||||
<GuildSelect />
|
<GuildSelect bind:value={guildName} />
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<EditPost bind:content bind:privacy />
|
<EditPost bind:content bind:privacy />
|
||||||
|
|
@ -31,16 +33,16 @@
|
||||||
<span class="warning"><RiErrorWarningLine /> Your post will be PUBLIC!</span>
|
<span class="warning"><RiErrorWarningLine /> Your post will be PUBLIC!</span>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
<button class="card primary" disabled>Create</button>
|
<button class="card primary" disabled={!enablePost}>Create</button>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{#snippet left()}
|
{#snippet left()}
|
||||||
...
|
<Wip />
|
||||||
{/snippet}
|
{/snippet}
|
||||||
|
|
||||||
{#snippet right()}
|
{#snippet right()}
|
||||||
...
|
<Wip />
|
||||||
{/snippet}
|
{/snippet}
|
||||||
</SLayout>
|
</SLayout>
|
||||||
{:else}
|
{:else}
|
||||||
|
|
|
||||||
|
|
@ -5,6 +5,7 @@
|
||||||
import { getMe } from "$lib/globals.svelte";
|
import { getMe } from "$lib/globals.svelte";
|
||||||
import GuildSelect from "$lib/GuildSelect.svelte";
|
import GuildSelect from "$lib/GuildSelect.svelte";
|
||||||
import SLayout from "$lib/SLayout.svelte";
|
import SLayout from "$lib/SLayout.svelte";
|
||||||
|
import Wip from "$lib/Wip.svelte";
|
||||||
import { RiErrorWarningLine } from "svelte-remixicon";
|
import { RiErrorWarningLine } from "svelte-remixicon";
|
||||||
|
|
||||||
let me = getMe();
|
let me = getMe();
|
||||||
|
|
@ -38,11 +39,11 @@
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{#snippet left()}
|
{#snippet left()}
|
||||||
...
|
<Wip />
|
||||||
{/snippet}
|
{/snippet}
|
||||||
|
|
||||||
{#snippet right()}
|
{#snippet right()}
|
||||||
...
|
<Wip />
|
||||||
{/snippet}
|
{/snippet}
|
||||||
</SLayout>
|
</SLayout>
|
||||||
{:else if me}
|
{:else if me}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { enhance } from "$app/forms";
|
import { enhance } from "$app/forms";
|
||||||
import Centered from "$lib/Centered.svelte";
|
import Centered from "$lib/Centered.svelte";
|
||||||
|
import Wip from "$lib/Wip.svelte";
|
||||||
import { RiInformationLine, RiUserLine } from "svelte-remixicon";
|
import { RiInformationLine, RiUserLine } from "svelte-remixicon";
|
||||||
|
|
||||||
let username = $state("");
|
let username = $state("");
|
||||||
|
|
@ -25,7 +26,7 @@ let disabled = $derived(username.length < 2 || username.length > 30 ||
|
||||||
<small class="faint">Must be a working e-mail address <abbr title="Will be used for password recovery and important communications"><RiInformationLine /></abbr></small>
|
<small class="faint">Must be a working e-mail address <abbr title="Will be used for password recovery and important communications"><RiInformationLine /></abbr></small>
|
||||||
<input type="text" name="username" bind:value={email} />
|
<input type="text" name="username" bind:value={email} />
|
||||||
</label>
|
</label>
|
||||||
...
|
<Wip />
|
||||||
|
|
||||||
<button class="primary" disabled={disabled}>Sign up</button>
|
<button class="primary" disabled={disabled}>Sign up</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue