nosignal-shell/modules/nexus/pages/AboutPage.qml
28allday 16de3f16fe feat(nosignal): NoSignal logo + V1 on About; fully square the UI
- About page: replace caelestia AnimatedLogo with the NoSignal logo
  (assets/nosignal-logo.png), title "NoSignal", version reads "V1".
- Square every remaining curved element to match the no-curves design:
  avatars, toggle/icon circles, power/media buttons, slider tracks+handles,
  NsSwitch track+knob, notification dot, calendar today, lock avatar -> radius 0.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-14 11:42:08 +01:00

163 lines
4.2 KiB
QML

import QtQuick
import QtQuick.Layouts
import Quickshell
import Quickshell.Io
import Caelestia
import Caelestia.Config
import qs.components
import qs.services
import qs.utils
import qs.modules.nexus.common
PageBase {
id: root
// Plugin support is not wired up yet; always 0 for now
readonly property int pluginCount: 0
property string quickshellVersion
property string cliVersion
title: qsTr("About")
ColumnLayout {
anchors.horizontalCenter: parent.horizontalCenter
anchors.top: parent.top
width: root.cappedWidth
spacing: Tokens.spacing.extraSmall / 2
// e.g. "Quickshell 0.3.0 (revision ...)"
Process {
running: true
command: ["quickshell", "--version"]
stdout: StdioCollector {
onStreamFinished: root.quickshellVersion = text.trim().split(" ")[1] ?? ""
}
}
// Parsed from the caelestia CLI's package listing; the sh wrapper avoids a
// warning when the (optional) CLI isn't installed
Process {
running: true
command: ["sh", "-c", "caelestia --version 2>/dev/null"]
stdout: StdioCollector {
onStreamFinished: {
const m = text.match(/caelestia-cli\S*\s+(\d+(?:\.\d+)*)/);
root.cliVersion = m ? m[1] : "";
}
}
}
// Hero
ConnectedRect {
Layout.fillWidth: true
first: true
last: true
implicitHeight: hero.implicitHeight + Tokens.padding.extraLarge * 2
ColumnLayout {
id: hero
anchors.centerIn: parent
width: parent.width - Tokens.padding.largeIncreased * 2
spacing: Tokens.spacing.small
Image {
Layout.alignment: Qt.AlignHCenter
Layout.preferredWidth: 104
Layout.preferredHeight: 104
source: Quickshell.shellDir + "/assets/nosignal-logo.png"
sourceSize.width: 208
sourceSize.height: 208
fillMode: Image.PreserveAspectFit
smooth: true
}
StyledText {
Layout.alignment: Qt.AlignHCenter
Layout.topMargin: Tokens.spacing.small
text: "NoSignal"
font: Tokens.font.headline.builders.large.width(110).build()
}
StyledText {
Layout.alignment: Qt.AlignHCenter
text: "V1"
color: Colours.palette.m3onSurfaceVariant
font: Tokens.font.body.medium
}
}
}
// System
SectionHeader {
text: qsTr("System")
}
InfoRow {
first: true
label: qsTr("Hostname")
value: SysInfo.hostname
}
InfoRow {
label: qsTr("Device")
value: SysInfo.device
}
InfoRow {
label: qsTr("Distro")
value: SysInfo.osPrettyName || SysInfo.osName
}
InfoRow {
label: qsTr("Kernel")
value: SysInfo.kernel
}
InfoRow {
last: true
label: qsTr("Firmware")
value: SysInfo.firmware
}
// Software
SectionHeader {
text: qsTr("Software")
}
InfoRow {
first: true
label: qsTr("Shell")
value: CUtils.version || "…"
}
InfoRow {
label: qsTr("CLI")
value: root.cliVersion || "…"
}
InfoRow {
label: qsTr("Quickshell")
value: root.quickshellVersion || "…"
}
InfoRow {
last: true
label: qsTr("Qt")
value: CUtils.qtVersion || "…"
}
// Plugins
SectionHeader {
text: qsTr("Plugins")
}
InfoRow {
first: true
last: true
label: qsTr("Loaded plugins")
value: root.pluginCount.toString()
}
}
}