Files
dms-chat/views/MatrixJoinPanel.qml
SalastilandClaude Sonnet 5 20389e7396 Add Matrix verification/backup, per-protocol join pages, Discord friends, and expired-media/auth-failure recovery
- Matrix: interactive device verification (SAS emoji flow), recovery-key
  backup/restore, membership announcement moderation, member/room avatars,
  power-level-aware moderation menu, and an encryption lock indicator on
  the composer - verified live with two independent devices.
- Replace the single combined join panel with a dedicated page per
  protocol (IrcJoinPanel/MatrixJoinPanel/DiscordJoinPanel), routed by
  whichever account the "+" button was clicked for rather than listing
  every account in one expandable page.
- Discord: friends list (Online/All, click-to-DM, add-friend, matches
  READY's relationships + live PRESENCE_UPDATE), create-a-server, and
  join-by-invite alongside the existing DM-by-ID flow.
- Discord: an expired attachment-link fallback ("Open in Discord") for
  scrollback media whose signed cdn.discordapp.com URL has lapsed -
  Discord's own /attachments/refresh-urls re-sign endpoint hard-rejects
  this backend's user-token requests, confirmed live, so this opens the
  real message instead of showing a broken embed.
- Discord: detect gateway close code 4004 (revoked token) as a distinct
  ConnState::AuthFailed instead of retrying a dead credential forever;
  the Accounts pane shows a clear "needs login" state that routes
  straight to a fresh QR login, which upserts the same account id in
  place (no lost buffers/scrollback).
- Fix the unread-DM pinned-buffer flash never reliably triggering: an
  implicit property binding computed via nested closures over two
  separate properties wasn't consistently re-evaluated by QML's
  dependency tracker; replaced with an explicit recompute function called
  at every actual mutation point.
- Fix ChatBarWidget.qml's pill double-padding against BasePill's own
  padding.

Co-Authored-By: Claude Sonnet 5 <[email protected]>
2026-08-21 12:30:46 -04:00

56 lines
1.4 KiB
QML

import QtQuick
import QtQuick.Layouts
import qs.Common
import qs.Widgets
// Matrix's own join/DM page - see IrcJoinPanel.qml's doc comment for why
// this is a separate per-protocol page rather than one shared page. A
// Space is just a room with an `m.space` creation type under the hood,
// joined through this exact same endpoint, so there's no separate "join a
// space" mechanism to build here.
ColumnLayout {
id: root
property var account: null
signal joinRequested(string roomIdOrAlias)
signal dmRequested(string userId)
spacing: Theme.spacingS
StyledText {
Layout.fillWidth: true
text: "Join a room or space"
color: Theme.surfaceVariantText
font.pixelSize: Theme.fontSizeSmall
}
DankTextField {
Layout.fillWidth: true
placeholderText: "#room:server or !roomid:server"
onAccepted: {
if (text)
root.joinRequested(text);
text = "";
}
}
StyledText {
Layout.topMargin: Theme.spacingS
Layout.fillWidth: true
text: "Start a DM"
color: Theme.surfaceVariantText
font.pixelSize: Theme.fontSizeSmall
}
DankTextField {
Layout.fillWidth: true
placeholderText: "@user:server"
onAccepted: {
if (text)
root.dmRequested(text);
text = "";
}
}
}