summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen Jacobson <owen@grimoire.ca>2025-07-01 15:30:44 -0400
committerOwen Jacobson <owen@grimoire.ca>2025-07-03 22:43:44 -0400
commit1cafeb5ec92c1dc4ad74fbed58b15a8ab2f3c0cf (patch)
tree0ecca3ed4133210286e9d11b2d2027136f09113a
parent8d412732dc094ead3c5cf86c005d187f9624fc65 (diff)
Move the `/ch` channel view to `/c` (for conversation).
-rw-r--r--src/routes.rs2
-rw-r--r--ui/lib/components/Channel.svelte2
-rw-r--r--ui/routes/(app)/+layout.svelte4
-rw-r--r--ui/routes/(app)/c/[conversation]/+page.svelte (renamed from ui/routes/(app)/ch/[channel]/+page.svelte)2
4 files changed, 5 insertions, 5 deletions
diff --git a/src/routes.rs b/src/routes.rs
index e38f744..49d9fb6 100644
--- a/src/routes.rs
+++ b/src/routes.rs
@@ -15,7 +15,7 @@ pub fn routes(app: &App) -> Router<App> {
// UI routes that require the administrator to complete setup first.
let ui_setup_required = Router::new()
.route("/", get(ui::handlers::index))
- .route("/ch/{channel}", get(ui::handlers::conversation))
+ .route("/c/{conversation}", get(ui::handlers::conversation))
.route("/invite/{invite}", get(ui::handlers::invite))
.route("/login", get(ui::handlers::login))
.route("/me", get(ui::handlers::me))
diff --git a/ui/lib/components/Channel.svelte b/ui/lib/components/Channel.svelte
index 4f908d2..9004e50 100644
--- a/ui/lib/components/Channel.svelte
+++ b/ui/lib/components/Channel.svelte
@@ -3,7 +3,7 @@
</script>
<li class:active>
- <a href="/ch/{id}">
+ <a href="/c/{id}">
{#if hasUnreads}
<span class="badge has-unreads">❦</span>
{:else}
diff --git a/ui/routes/(app)/+layout.svelte b/ui/routes/(app)/+layout.svelte
index c7e1f22..e3272bc 100644
--- a/ui/routes/(app)/+layout.svelte
+++ b/ui/routes/(app)/+layout.svelte
@@ -20,7 +20,7 @@
onDestroy(session.end.bind(session));
let pageContext = getContext('page');
- let channel = $derived(page.params.channel);
+ let channel = $derived(page.params.conversation);
let channels = $derived(session.channels);
@@ -60,7 +60,7 @@
const lastActiveChannel = getLastActiveChannel();
const inRoot = page.url.pathname === '/';
if (inRoot && lastActiveChannel) {
- goto(`/ch/${lastActiveChannel}`);
+ goto(`/c/${lastActiveChannel}`);
} else if (channel) {
setLastActiveChannel(channel || null);
}
diff --git a/ui/routes/(app)/ch/[channel]/+page.svelte b/ui/routes/(app)/c/[conversation]/+page.svelte
index ef000fc..4d2cc86 100644
--- a/ui/routes/(app)/ch/[channel]/+page.svelte
+++ b/ui/routes/(app)/c/[conversation]/+page.svelte
@@ -10,7 +10,7 @@
const { session, outbox } = data;
let activeChannel;
- const channelId = $derived(page.params.channel);
+ const channelId = $derived(page.params.conversation);
const channel = $derived(session.channels.find((channel) => channel.id === channelId));
const messages = $derived(
session.messages.filter((message) => message.conversation === channelId),