diff --git a/src/modules/welcomeq/Recommended.qml b/src/modules/welcomeq/Recommended.qml new file mode 100644 index 000000000..373509104 --- /dev/null +++ b/src/modules/welcomeq/Recommended.qml @@ -0,0 +1,67 @@ +/* === This file is part of Calamares - === + * + * Copyright 2020, Anke Boersma + * + * Calamares is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Calamares is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Calamares. If not, see . + */ + +import io.calamares.ui 1.0 + +import QtQuick 2.7 +import QtQuick.Controls 2.2 +import QtQuick.Layouts 1.3 +import org.kde.kirigami 2.7 as Kirigami + +Rectangle { + focus: true + Kirigami.Theme.backgroundColor: Kirigami.Theme.backgroundColor + anchors.fill: parent + anchors.topMargin: 70 + + TextArea { + id: recommended + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: parent.top + anchors.topMargin: 20 + width: 640 + font.pointSize: 12 + textFormat: Text.RichText + antialiasing: true + activeFocusOnPress: false + wrapMode: Text.WordWrap + + text: qsTr("

This computer does not satisfy some of the recommended requirements for setting up %1.

+

Setup can continue, but some features might be disabled.

").arg(Branding.string(Branding.VersionedName)) + } + + TextArea { + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: recommended.bottom + anchors.topMargin: 20 + width: 640 + background: Rectangle { + implicitWidth: 640 + implicitHeight: 50 + border.color: "#ff0000" + color: "#b0e0e6" + } + font.pointSize: 12 + textFormat: Text.RichText + antialiasing: true + activeFocusOnPress: false + wrapMode: Text.WordWrap + + text: qsTr("

The system is not connected to the internet.

")//.arg(requirementsModel) + } +} diff --git a/src/modules/welcomeq/Requirements.qml b/src/modules/welcomeq/Requirements.qml new file mode 100644 index 000000000..4f5520270 --- /dev/null +++ b/src/modules/welcomeq/Requirements.qml @@ -0,0 +1,67 @@ +/* === This file is part of Calamares - === + * + * Copyright 2020, Anke Boersma + * + * Calamares is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * Calamares is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Calamares. If not, see . + */ + +import io.calamares.ui 1.0 + +import QtQuick 2.7 +import QtQuick.Controls 2.2 +import QtQuick.Layouts 1.3 +import org.kde.kirigami 2.7 as Kirigami + +Rectangle { + focus: true + Kirigami.Theme.backgroundColor: Kirigami.Theme.backgroundColor + anchors.fill: parent + anchors.topMargin: 70 + + TextArea { + id: required + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: parent.top + anchors.topMargin: 20 + width: 640 + font.pointSize: 12 + textFormat: Text.RichText + antialiasing: true + activeFocusOnPress: false + wrapMode: Text.WordWrap + + text: qsTr("

This computer does not satisfy the minimum requirements for setting up %1.

+

Setup cannot continue.

").arg(Branding.string(Branding.VersionedName)) + } + + TextArea { + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: required.bottom + anchors.topMargin: 20 + width: 640 + background: Rectangle { + implicitWidth: 640 + implicitHeight: 50 + border.color: "#ff0000" + color: "#ffc0cb" + } + font.pointSize: 12 + textFormat: Text.RichText + antialiasing: true + activeFocusOnPress: false + wrapMode: Text.WordWrap + + text: qsTr("

The installer is not running with administrator rights.

")//.arg(requirementsModel) + } +} diff --git a/src/modules/welcomeq/about.qml b/src/modules/welcomeq/about.qml index f301c6659..7fa6fb462 100644 --- a/src/modules/welcomeq/about.qml +++ b/src/modules/welcomeq/about.qml @@ -28,7 +28,7 @@ Item { focus: true property var appName: "Calamares" - property var appVersion: "3.2.22" + property var appVersion: "3.2.24" Rectangle { id: textArea diff --git a/src/modules/welcomeq/welcomeq.qml b/src/modules/welcomeq/welcomeq.qml index f597f7105..910274fe2 100644 --- a/src/modules/welcomeq/welcomeq.qml +++ b/src/modules/welcomeq/welcomeq.qml @@ -56,6 +56,20 @@ Page fillMode: Image.PreserveAspectFit } + Recommended { + property var required: "yes" //requirementsModel + property var satisfied: "yes" //satisfiedRequirements + property var requiredMet: (required != satisfied) ? true : false + visible: requiredMet + } + + Requirements { + property var required: "yes" //requirementsModel + property var mandatory: "yes" //satisfiedMandatory + property var mandatoryMet: (required != mandatory) ? true : false + visible: mandatoryMet + } + RowLayout { id: buttonBar width: parent.width / 1.5 diff --git a/src/modules/welcomeq/welcomeq.qrc b/src/modules/welcomeq/welcomeq.qrc index 71431254e..ef41f816a 100644 --- a/src/modules/welcomeq/welcomeq.qrc +++ b/src/modules/welcomeq/welcomeq.qrc @@ -3,6 +3,8 @@ welcomeq.qml about.qml release_notes.qml + Recommended.qml + Requirements.qml img/squid.png img/chevron-left-solid.svg img/language-icon-48px.png