Files
vue-chat-layer/app/components/Chat/Icon.vue
Jakub Zych 5d581539b3 feat: port the chat store, realtime client and components
- realtime.ts: the page's one Centrifuge client, setRealtimeAuth, onUserEvent for user:{me} events the chat does not handle
- chatEvents, chatFormat, chatText, chatUnread, format, media, tabs ported; copy passed in localized
- useChat over useState: channels with join and leave, DMs, member list, unread and mention counts, read marks, typing, presence, polling fallback
- ChatPanel, ChatHeader, ChatMessage, ChatDmList, ChatMemberPicker, ChatMentionPopup, ChatAvatar, ChatIcon, ChatNotices
- EN and PL strings
2026-10-31 13:52:56 +01:00

35 lines
1.6 KiB
Vue

<script setup lang="ts">
// 24x24 stroke icons of the chat (from a Golem15 SPA's Icon.vue, the ones
// the chat uses plus thread, pin and command).
const props = defineProps<{ name: string }>()
const paths: Record<string, string> = {
'arrow-left': 'M19 12H5M11 6l-6 6 6 6',
'arrow-right': 'M5 12h14M13 6l6 6-6 6',
'arrow-up': 'M12 19V5M5 12l7-7 7 7',
'arrow-down': 'M12 5v14M5 12l7 7 7-7',
paperclip: 'M20 11.5l-8.5 8.5a5 5 0 01-7-7L13 4.5a3.5 3.5 0 015 5L9.5 18a2 2 0 01-3-3L14 7.5',
at: 'M12 16a4 4 0 100-8 4 4 0 000 8zM16 12v1.5a2.5 2.5 0 005 0V12a9 9 0 10-3.5 7.1',
smile: 'M12 21a9 9 0 100-18 9 9 0 000 18zM8.5 14.5c1 1.2 2.2 1.8 3.5 1.8s2.5-.6 3.5-1.8M9 9.5h.01M15 9.5h.01',
pencil: 'M4 20h4L19 9l-4-4L4 16zM13.5 6.5l4 4',
trash: 'M4 7h16M10 11v6M14 11v6M6 7l1 13h10l1-13M9 7V4h6v3',
close: 'M6 6l12 12M18 6L6 18',
plus: 'M12 5v14M5 12h14',
file: 'M7 3h7l5 5v13H7zM14 3v5h5M10 13h6M10 17h6',
chat: 'M4 5h16v11H9l-5 4z',
thread: 'M4 5h12v8H8l-4 3zM20 9v9l-3-2h-6',
pin: 'M9 4h6l-1 6 4 3v1H6v-1l4-3zM12 14v6',
slash: 'M16 4L8 20',
link: 'M10 14a4 4 0 005.7 0l3-3a4 4 0 00-5.7-5.7l-1 1M14 10a4 4 0 00-5.7 0l-3 3a4 4 0 005.7 5.7l1-1',
bell: 'M6 16V11a6 6 0 0112 0v5l2 2H4zM10 20h4',
'bell-off': 'M6 16V11a6 6 0 019-5.2M18 11v5l2 2H8M10 20h4M4 4l16 16',
out: 'M10 4H5v16h5M15 8l4 4-4 4M19 12H9',
}
</script>
<template>
<svg class="chat-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="1.8" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true">
<path :d="paths[props.name] ?? ''" />
</svg>
</template>