Files
qbz/crates/qbz-ui/ui/shell/ReportIssueModal.slint
T
vicrodh 99da4c381b feat(slint): pre-launch dev panel, queue controls, appearance persistence, reco cache settings
Sleep timer (queue footer): tokio monotonic deadline + 1Hz countdown that
fires core().pause() at expiry; presets + custom minutes via a popover.

Stop after this song: 4 QbzCore passthroughs + playback consume-before-advance
seam and the load-bearing gapless-prefetch gate, plus the queue marker/menu so
the Queue persists when playback halts.

qbz-log crate: TeeLogger wrapping env_logger (stderr + 5000-line ring +
~/.local/share/qbz/logs/qbz.log) with write-time secret redaction (regex +
live-secret registry) and a diagnostics bundle builder.

Dev panel logs: in-app viewer that shows content the moment it opens, advanced
controls behind a discreet [+], "Copy all" as the sole footer button, a copy
button on the upload URL, and a redacted public paste upload.

Diagnostics: qbz-app::diagnostics (extracted, src-tauri untouched) feeding a
7-section panel with the live active output device + sample rate/format (pactl)
and a complete redacted report for the upload.

Report an Issue: wires the header menu item to a 1:1 Tauri modal that opens the
GitHub bug-report template.

Appearance persistence: 6 toggles that were live-only now persist via ui_prefs
+ handler arm + startup seed (window-title-show, show-volume-steppers,
sidebar-playlist-collage, local-library-track-artwork, in-app-toasts,
theme-filter).

Recommendations cache (per-tab only): TTL select 24/36/48/72h + Refresh now in
ExternalRecoView; no change to the other Discover tabs.

Bump workspace version 0.1.0 -> 1.2.15 so app_version is correct in the
diagnostics report and the QConnect About string. i18n es/de/fr/pt for all new
strings.

cc
2026-06-29 13:19:06 -06:00

142 lines
6.1 KiB
Plaintext

// Report-an-issue modal — 1:1 with the Tauri `ReportIssueModal.svelte`.
//
// Opened from the header hamburger menu ("Report an Issue"). Explains the manual,
// redacted log-sharing flow, then offers "Go to logs" (opens the in-app log
// viewer) and "Create issue report" (opens the GitHub new-issue page via Rust).
// Mounted in AppShell in declaration order (ADR-009); conditional-mount on
// `ReportIssueState.open` (ADR-010).
import { Theme } from "../foundation/semantic-colors.slint";
import { Typography } from "../foundation/typography.slint";
import { Radius } from "../foundation/radius.slint";
import { ReportIssueState, ReportIssueActions, LogViewerState } from "../state.slint";
import { QbzIcon } from "../primitives/QbzIcon.slint";
export component ReportIssueModal inherits Rectangle {
width: 100%;
height: 100%;
visible: ReportIssueState.open;
if ReportIssueState.open: Rectangle {
background: #000000bf;
TouchArea {
mouse-cursor: default;
clicked => {
ReportIssueState.open = false;
}
}
Rectangle {
width: Math.min(root.width - 80px, 520px);
height: Math.min(root.height - 80px, 300px);
x: Math.round((parent.width - self.width) / 2 / 1px) * 1px;
y: Math.round((parent.height - self.height) / 2 / 1px) * 1px;
border-radius: Radius.md;
background: Theme.surface-card;
border-width: 1px;
border-color: Theme.border-subtle;
drop-shadow-blur: 32px;
drop-shadow-color: #00000080;
// Swallow clicks so they don't reach the closing backdrop.
TouchArea { }
VerticalLayout {
padding: 24px;
spacing: 16px;
// ---- Header: title + close X.
HorizontalLayout {
spacing: 10px;
Text {
text: @tr("Report an issue");
color: Theme.text-primary;
font-size: Typography.heading;
font-weight: Typography.semibold;
vertical-alignment: center;
horizontal-stretch: 1;
}
close-x := TouchArea {
width: 28px;
height: 28px;
mouse-cursor: pointer;
clicked => {
ReportIssueState.open = false;
}
QbzIcon {
source: @image-url("../assets/icons/x.svg");
width: 17px;
height: 17px;
x: Math.round((parent.width - self.width) / 2 / 1px) * 1px;
y: Math.round((parent.height - self.height) / 2 / 1px) * 1px;
tint: close-x.has-hover ? Theme.text-primary : Theme.text-muted;
}
}
}
// ---- Intro: the manual, redacted log-sharing explanation.
Text {
text: @tr("To make bug and issue resolution easier, it's recommended to share the application logs. We have been careful to mask the logs we send so no sensitive data is included. The process is manual, never automatic, so you can verify what is being shared.");
color: Theme.text-secondary;
font-size: 14px;
wrap: word-wrap;
vertical-stretch: 1;
}
// ---- Actions: Go to logs (secondary) / Create issue (primary).
HorizontalLayout {
spacing: 10px;
Rectangle { horizontal-stretch: 1; }
Rectangle {
width: go-label.preferred-width + 28px;
height: 36px;
border-radius: Radius.sm;
border-width: 1px;
border-color: Theme.border-subtle;
background: go-ta.has-hover ? Theme.surface-hover : Theme.surface-elevated;
go-label := Text {
text: @tr("Go to logs");
color: Theme.text-secondary;
font-size: 13px;
font-weight: Typography.medium;
horizontal-alignment: center;
vertical-alignment: center;
width: 100%;
height: 100%;
}
go-ta := TouchArea {
mouse-cursor: pointer;
clicked => {
ReportIssueState.open = false;
LogViewerState.open = true;
}
}
}
Rectangle {
width: create-label.preferred-width + 28px;
height: 36px;
border-radius: Radius.sm;
background: create-ta.has-hover ? Theme.accent-hover : Theme.accent;
create-label := Text {
text: @tr("Create issue report");
color: Theme.accent-text;
font-size: 13px;
font-weight: Typography.medium;
horizontal-alignment: center;
vertical-alignment: center;
width: 100%;
height: 100%;
}
create-ta := TouchArea {
mouse-cursor: pointer;
clicked => {
ReportIssueState.open = false;
ReportIssueActions.create-issue();
}
}
}
}
}
}
}
}