Add map display

This commit is contained in:
Jack Kingsman
2026-01-13 14:38:19 -08:00
parent f2a0fb75e5
commit b705f89a09
14 changed files with 802 additions and 547 deletions
+6 -1
View File
@@ -1,7 +1,7 @@
import type { Conversation } from '../types';
export interface ParsedHashConversation {
type: 'channel' | 'contact' | 'raw';
type: 'channel' | 'contact' | 'raw' | 'map';
name: string;
}
@@ -14,6 +14,10 @@ export function parseHashConversation(): ParsedHashConversation | null {
return { type: 'raw', name: 'raw' };
}
if (hash === 'map') {
return { type: 'map', name: 'map' };
}
const slashIndex = hash.indexOf('/');
if (slashIndex === -1) return null;
@@ -30,6 +34,7 @@ export function parseHashConversation(): ParsedHashConversation | null {
export function getConversationHash(conv: Conversation | null): string {
if (!conv) return '';
if (conv.type === 'raw') return '#raw';
if (conv.type === 'map') return '#map';
// Strip leading # from channel names for cleaner URLs
const name = conv.type === 'channel' && conv.name.startsWith('#')
? conv.name.slice(1)