initial commit

This commit is contained in:
Moon.eth
2026-07-29 09:16:38 +09:00
commit 586b599d4c
67 changed files with 9906 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
<script lang="ts">
/** A full-page composer, reachable from the nav and from "Send Message". */
import { session } from '$lib/stores/session.svelte'
import { router } from '$lib/router.svelte'
import Module from '$components/common/Module.svelte'
import Composer from '$components/blog/Composer.svelte'
interface Props {
/** Handle to address the entry to, from `?to=`. */
to?: string
}
let { to }: Props = $props()
const prefill = $derived(to ? `@${to.replace(/^@/, '')} ` : '')
</script>
<div class="page compose-page">
<h1 class="page-title">{to ? 'Send a Message' : 'Post a Blog Entry'}</h1>
{#if to}
<p class="page-subtitle">
Addressed to <a href={`#/@${to.replace(/^@/, '')}`}>@{to.replace(/^@/, '')}</a>. Set the
audience to <em>Mentioned people only</em> to keep it private.
</p>
{/if}
<div class="layout--single">
<Module title={to ? 'New message' : 'New entry'}>
<Composer
initialText={prefill}
placeholder={to ? 'Say something…' : 'What are you up to?'}
submitLabel={to ? 'Send' : 'Post Entry'}
onposted={(status) => router.go(`#/blog/${status.id}`)}
/>
</Module>
{#if !session.signedIn}
<p class="notice"><a href="#/login">Sign in</a> to post.</p>
{/if}
</div>
</div>