Relocate the QConnect diagnostics launcher out of the now-playing bar flyout into a new opt-in Settings > Developer section (the modal + DEV log/status code is unchanged). Also make the status block selectable (read-only TextEdit) so session_uuid etc. can be copied, and relabel the event log. cc
62 lines
1.9 KiB
Plaintext
62 lines
1.9 KiB
Plaintext
// Settings > Developer — opt-in home for developer/diagnostic tools. Same
|
|
// structure as the other settings panels (GroupHeader + SettingRow + a
|
|
// SecondaryButton). Currently launches the Qobuz Connect diagnostics modal
|
|
// (live session topology + rolling event log); more dev tools can land here.
|
|
|
|
import { Theme } from "../foundation/semantic-colors.slint";
|
|
import { Typography } from "../foundation/typography.slint";
|
|
import { Radius } from "../foundation/radius.slint";
|
|
import { QconnectDevState } from "../state.slint";
|
|
import { SettingRow } from "SettingRow.slint";
|
|
|
|
component GroupHeader inherits Text {
|
|
color: Theme.text-muted;
|
|
font-size: 11px;
|
|
letter-spacing: 1.5px;
|
|
font-weight: Typography.semibold;
|
|
}
|
|
|
|
component SecondaryButton inherits Rectangle {
|
|
in property <string> label;
|
|
callback clicked();
|
|
width: 160px;
|
|
height: 34px;
|
|
border-radius: Radius.sm;
|
|
border-width: 1px;
|
|
border-color: Theme.border-subtle;
|
|
background: ta.has-hover ? Theme.surface-hover : Theme.surface-elevated;
|
|
Text {
|
|
width: 100%;
|
|
height: 100%;
|
|
text: root.label;
|
|
color: Theme.text-secondary;
|
|
font-size: Typography.body;
|
|
font-weight: Typography.medium;
|
|
horizontal-alignment: center;
|
|
vertical-alignment: center;
|
|
}
|
|
ta := TouchArea {
|
|
mouse-cursor: pointer;
|
|
clicked => {
|
|
root.clicked();
|
|
}
|
|
}
|
|
}
|
|
|
|
export component DeveloperSettings inherits VerticalLayout {
|
|
spacing: 4px;
|
|
|
|
GroupHeader { text: @tr("QOBUZ CONNECT"); }
|
|
|
|
SettingRow {
|
|
label: @tr("Connect diagnostics");
|
|
description: @tr("Live session topology and a rolling event log for debugging Qobuz Connect at runtime.");
|
|
SecondaryButton {
|
|
label: @tr("Open diagnostics");
|
|
clicked => {
|
|
QconnectDevState.open = true;
|
|
}
|
|
}
|
|
}
|
|
}
|