import QtQuick 2.15 import QtQuick.Controls 2.15 import QtQuick.Layouts 1.15 import QtQuick.Window 2.15 import RaveOS 1.0 Window { id: ablak visible: true x: 0 y: 0 width: Screen.width height: Screen.height visibility: Window.FullScreen color: Stilus.hatter title: "RaveOS Wi-Fi" readonly property bool magyar: systemLocale.startsWith("hu") function kilep(kod) { Qt.exit(kod) } Timer { id: tovabbIdozito interval: 1500 onTriggered: ablak.kilep(0) } Component.onCompleted: { if (nm.connected) tovabbIdozito.restart() } Connections { target: nm function onConnectionChanged() { if (nm.connected) tovabbIdozito.restart() else tovabbIdozito.stop() } } Shortcut { sequence: "Esc" onActivated: ablak.kilep(1) } component KeretesGomb: Button { id: gomb Layout.preferredHeight: 44 leftPadding: 20 rightPadding: 20 background: Rectangle { color: gomb.hovered ? Stilus.aktiv : "transparent" border.width: 1 border.color: Stilus.keretErosebb } contentItem: Text { text: gomb.text color: Stilus.szoveg font.family: Stilus.font font.pixelSize: 14 font.weight: Font.Medium verticalAlignment: Text.AlignVCenter } } component ZoldGomb: Button { id: gomb Layout.preferredHeight: 44 leftPadding: 24 rightPadding: 24 background: Rectangle { color: !gomb.enabled ? "transparent" : (gomb.hovered ? Stilus.zoldHover : Stilus.zold) border.width: gomb.enabled ? 0 : 1 border.color: Stilus.keret } contentItem: Text { text: gomb.text color: gomb.enabled ? Stilus.zoldonSzoveg : Stilus.szovegHalvany font.family: Stilus.font font.pixelSize: 14 font.weight: Font.DemiBold verticalAlignment: Text.AlignVCenter } } ColumnLayout { anchors.fill: parent spacing: 0 Loader { Layout.fillWidth: true Layout.fillHeight: true source: wifiOldal onStatusChanged: { if (status === Loader.Error) ablak.kilep(2) } } Rectangle { Layout.fillWidth: true Layout.preferredHeight: 73 color: Stilus.hatter Rectangle { anchors.top: parent.top anchors.left: parent.left anchors.right: parent.right height: 1 color: Stilus.keret } RowLayout { anchors.fill: parent anchors.topMargin: 15 anchors.bottomMargin: 14 anchors.leftMargin: 56 anchors.rightMargin: 56 spacing: 12 Text { Layout.fillWidth: true text: ablak.magyar ? "A KAPCSOLAT UTÁN A TELEPÍTŐ FRISSÍTI MAGÁT" : "THE INSTALLER UPDATES ITSELF ONCE CONNECTED" elide: Text.ElideRight color: Stilus.szovegHalvany font.family: Stilus.mono font.pixelSize: 12 font.letterSpacing: 1 } KeretesGomb { text: ablak.magyar ? "Kihagyás" : "Skip" onClicked: ablak.kilep(1) } ZoldGomb { text: ablak.magyar ? "Tovább" : "Continue" enabled: nm.connected onClicked: ablak.kilep(0) } } } } }