mirror of
https://github.com/jkingsman/Remote-Terminal-for-MeshCore.git
synced 2026-08-08 09:43:03 +02:00
Add map display
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user