feat(desktop): add Photon iMessage section to sidebar

Register Photon as a messaging platform in the Desktop sidebar:
- Add Photon brand icon (three-bar mark) to PlatformAvatar catalog
- Add photon to SOURCE_LABELS, SOURCE_ALIASES, and MESSAGING_SESSION_SOURCE_IDS

Closes #46761
This commit is contained in:
Bounty13 2026-06-16 18:20:47 +00:00 committed by Teknium
parent df841d342c
commit 560be7dbf2
2 changed files with 20 additions and 0 deletions

View file

@ -18,6 +18,22 @@ import { forwardRef } from 'react'
import { Globe, Link as LinkIcon, MessageSquareText } from '@/lib/icons'
import { cn } from '@/lib/utils'
// ---------------------------------------------------------------------------
// Photon brand icon — three diagonal rounded bars (the Photon logo mark).
// Rendered at ~14 px inside the PlatformAvatar so the bars are kept thick
// enough to stay legible. At small sizes the bars blend into a distinctive
// silhouette; the wide triangular spacing preserves the logo's identity.
// ---------------------------------------------------------------------------
function PhotonIcon(props: React.SVGProps<SVGSVGElement>) {
return (
<svg fill="currentColor" viewBox="0 0 24 24" {...props}>
<rect height="10" rx="1.25" transform="rotate(15 14 7.5)" width="2.5" x="12.75" y="2.5" />
<rect height="10" rx="1.25" transform="rotate(15 8 13)" width="2.5" x="6.75" y="8" />
<rect height="10" rx="1.25" transform="rotate(15 16 18)" width="2.5" x="14.75" y="13" />
</svg>
)
}
// We render simpleicons.org brand glyphs for platforms whose owners publish a
// usable mark (telegram, discord, matrix, ...). A few brands — Slack, Dingtalk,
// Feishu, WeCom — have been removed from Simple Icons at the brand owner's
@ -45,6 +61,7 @@ const PLATFORM_ICONS: Record<string, PlatformIconSpec> = {
signal: { Icon: SiSignal, color: '#3A76F0', kind: 'brand' },
whatsapp: { Icon: SiWhatsapp, color: '#25D366', kind: 'brand' },
bluebubbles: { Icon: SiApple, color: '#0BD318', kind: 'brand' },
photon: { Icon: PhotonIcon, color: '#6366F1', kind: 'brand' },
homeassistant: { Icon: SiHomeassistant, color: '#18BCF2', kind: 'brand' },
email: { Icon: SiGmail, color: '#EA4335', kind: 'brand' },
sms: { Icon: MessageSquareText, color: '#F43F5E', kind: 'generic' },

View file

@ -12,6 +12,7 @@ const SOURCE_LABELS: Record<string, string> = {
local: 'Local',
matrix: 'Matrix',
mattermost: 'Mattermost',
photon: 'Photon',
qqbot: 'QQ',
signal: 'Signal',
slack: 'Slack',
@ -26,6 +27,7 @@ const SOURCE_LABELS: Record<string, string> = {
const SOURCE_ALIASES: Record<string, string[]> = {
bluebubbles: ['apple messages', 'imessage'],
photon: ['imessage', 'messages'],
cli: ['terminal'],
desktop: ['app', 'gui'],
local: ['machine'],
@ -55,6 +57,7 @@ export const MESSAGING_SESSION_SOURCE_IDS = [
'signal',
'whatsapp',
'bluebubbles',
'photon',
'homeassistant',
'email',
'sms',