// SPDX-FileCopyrightText: 2026 Matvey Shcherbinin // SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL import QtQuick import QtQuick.Layouts import QtQuick.Effects import QtNetwork import org.kde.kirigami as Kirigami import koutnet.app // The second of four: taken from the internet step of the original tour, panel // and all. The mock desktop, the floating panel, the system tray with the // network icon highlighted, and the arrow that points down at it while there is // no connection are the original's, drawn by the mocks beside this file over // the theme's colours (KOutNet has no Plasma theme to draw the KSvg frames // from, so the panel and the highlight are plain shapes instead). // // One thing is added for KOutNet: it is KOutNet that needs the connection, and // the description says which of its conversations need it. A conversation on the // same local network or VPN needs nothing from outside; Matrix reaches people // beyond the network and does need the connection. WizardPage { id: root title: i18nc("@info:window", "Access the Internet") description: xi18nc("@info:usagetip", "KOutNet needs a connection to the internet to reach people beyond your network, through a homeserver. You can connect to the internet and manage your network connections with the Networks applet. To access it, click on the Networks icon in your System Tray, which lives in the bottom-right corner of the screen.") readonly property bool online: NetworkInformation.reachability === NetworkInformation.Reachability.Online MockCard { id: mock anchors.fill: parent backgroundAlignment: Qt.AlignRight | Qt.AlignBottom opacity: root.online ? 0.6 : 1 Behavior on opacity { NumberAnimation { duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad } } MockPanel { id: mockPanel anchors.bottom: parent.bottom anchors.right: parent.right width: Math.max(mock.desktopWidth, parent.width) MockKickoffApplet { opacity: (mockPanel.x >= 0) ? 1 : 0 visible: opacity > 0 Behavior on opacity { NumberAnimation { duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad } } } Item { Layout.fillWidth: true } MockSystemTrayApplet { id: mockSystemTray MockSystemTrayIcon { source: "audio-volume-high-symbolic" } MockSystemTrayIcon { source: "brightness-high-symbolic" } MockSystemTrayIcon { id: mockNmTrayIcon source: root.online ? "network-wireless-signal-excellent-symbolic" : "network-offline-symbolic" Item { id: indicatorArrowContainer readonly property bool animate: visible && !root.online implicitWidth: indicatorArrow.implicitWidth + glowPadding * 2 implicitHeight: indicatorArrow.implicitHeight + glowPadding * 2 property real glowPadding: 16 property real yOffset: Kirigami.Units.gridUnit anchors.horizontalCenter: parent.horizontalCenter anchors.bottom: parent.top anchors.bottomMargin: yOffset - glowPadding + ((mockSystemTray.height - mockNmTrayIcon.height) / 2) SequentialAnimation on yOffset { running: indicatorArrowContainer.animate loops: Animation.Infinite alwaysRunToEnd: true NumberAnimation { from: Kirigami.Units.gridUnit to: 0 duration: 1000 easing.type: Easing.InOutQuad } NumberAnimation { from: 0 to: Kirigami.Units.gridUnit duration: 1000 easing.type: Easing.InOutQuad } } layer.enabled: true opacity: animate ? 1 : 0 Behavior on opacity { NumberAnimation { duration: Kirigami.Units.longDuration easing.type: Easing.InOutQuad } } Kirigami.Icon { id: indicatorArrowGlow anchors.fill: indicatorArrow layer.enabled: GraphicsInfo.api !== GraphicsInfo.Software layer.effect: MultiEffect { autoPaddingEnabled: false paddingRect: Qt.rect(indicatorArrowContainer.glowPadding, indicatorArrowContainer.glowPadding, indicatorArrowContainer.glowPadding, indicatorArrowContainer.glowPadding) blurEnabled: true blur: 1 blurMax: 2 } source: "arrow-down" color: AppPalette.background } Kirigami.Icon { id: indicatorArrow anchors.centerIn: indicatorArrowContainer implicitWidth: Kirigami.Units.iconSizes.large * 1.5 implicitHeight: Kirigami.Units.iconSizes.large * 1.5 source: "arrow-down" } } } } MockDigitalClockApplet {} MockShowDesktopApplet {} } } Kirigami.PlaceholderMessage { id: connectedMessage anchors.centerIn: parent width: parent.width - Kirigami.Units.gridUnit * 2 visible: root.online type: Kirigami.PlaceholderMessage.Type.Actionable icon.name: "data-success-symbolic" text: i18nc("@info:placeholder Shown when connected to the internet", "You're connected") explanation: i18nc("@info:usagetip Shown when connected to the internet", "All good to go!") } Kirigami.PlaceholderMessage { id: offlineMessage anchors.centerIn: parent width: parent.width - Kirigami.Units.gridUnit * 2 visible: !root.online icon.name: "data-warning-symbolic" text: i18nc("@info:placeholder Shown when not connected to the internet", "No internet connection") explanation: i18nc("@info:usagetip", "Conversations on your local network or VPN work without the internet. Matrix needs it, so connect from the Networks applet in the System Tray before signing in.") } }