diff options
| -rw-r--r-- | raveos-calamares-theme/PKGBUILD | 2 | ||||
| -rw-r--r-- | raveos-calamares-theme/etc/calamares/branding/raveos/finishedq.qml | 225 | ||||
| -rw-r--r-- | raveos-calamares-theme/etc/calamares/branding/raveos/images/raveos-finish.png | bin | 0 -> 5386138 bytes | |||
| -rw-r--r-- | raveos-calamares-theme/etc/calamares/branding/raveos/supporters.js | 9 | ||||
| -rw-r--r-- | raveos-calamares-theme/etc/calamares/modules/finishedq.conf | 9 | ||||
| -rw-r--r-- | raveos-calamares-theme/etc/calamares/modules/shellprocess-supporters.conf | 9 | ||||
| -rwxr-xr-x | raveos-calamares-theme/etc/calamares/settings.conf | 6 | ||||
| -rw-r--r-- | raveos-calamares/0003-restart-button.patch | 58 | ||||
| -rw-r--r-- | raveos-calamares/PKGBUILD | 7 |
9 files changed, 321 insertions, 4 deletions
diff --git a/raveos-calamares-theme/PKGBUILD b/raveos-calamares-theme/PKGBUILD index b3b18f3..12b0700 100644 --- a/raveos-calamares-theme/PKGBUILD +++ b/raveos-calamares-theme/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: nippy <nippy@tuta.io> pkgname=raveos-calamares-theme pkgver=2.0.0 -pkgrel=60 +pkgrel=61 pkgdesc="RaveOS Calamares Theme" arch=('any') url="https://git.rp1.hu/RaveOS" diff --git a/raveos-calamares-theme/etc/calamares/branding/raveos/finishedq.qml b/raveos-calamares-theme/etc/calamares/branding/raveos/finishedq.qml new file mode 100644 index 0000000..7032bad --- /dev/null +++ b/raveos-calamares-theme/etc/calamares/branding/raveos/finishedq.qml @@ -0,0 +1,225 @@ +/* RaveOS - Calamares finished (Done) oldal + * + * "Restart now" gomb: config.doRestart(true) -> azonnal ujrainditja a gepet. + * A tamogatok kulon keretben, alul, soronkent 3 nev, kozepre igazitva. + * Sok nev eseten automatikusan lapoz (4s). A lista: supporters.js (import). + * Ha nincs nev, a teljes tamogatoi panel el van rejtve. + * + * Nyelvek: hu / de / en (Qt.locale() alapjan). + */ + +import io.calamares.core 1.0 +import io.calamares.ui 1.0 + +import QtQuick 2.15 +import QtQuick.Controls 2.15 +import QtQuick.Layouts 1.15 + +import "supporters.js" as Supporters + +Item { + id: finishedRoot + anchors.fill: parent + + readonly property int supportersPerPage: 30 + readonly property int supportersColumns: 3 + readonly property bool hasSupporters: Supporters.names.length > 0 + readonly property int supportersPageCount: Math.max(1, Math.ceil(Supporters.names.length / supportersPerPage)) + + // Aktualis nyelv: hu / de / en + readonly property string uiLang: { + var n = Qt.locale().name; + if (n.indexOf("hu") === 0) return "hu"; + if (n.indexOf("de") === 0) return "de"; + return "en"; + } + + // Forditas: t(hu, de, en) + function t(hu, de, en) { + return uiLang === "hu" ? hu : (uiLang === "de" ? de : en); + } + + property int supportersPage: 0 + + // Az aktualis oldal szovege: soronkent 3 nev, kozepre igazitva + property string supportersText: { + var start = supportersPage * supportersPerPage; + var slice = Supporters.names.slice(start, start + supportersPerPage); + var lines = []; + for (var j = 0; j < slice.length; j += supportersColumns) { + lines.push(slice.slice(j, j + supportersColumns).join(" ")); + } + return lines.join("\n"); + } + + // RaveOS finish hatter + Image { + anchors.fill: parent + source: "images/raveos-finish.png" + fillMode: Image.Stretch + smooth: true + mipmap: true + } + + // Fo keret: cim + leiras + Restart gomb + Rectangle { + id: panel + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: parent.top + anchors.topMargin: Math.round(parent.height * 0.06) + width: Math.min(parent.width * 0.75, 780) + height: contentColumn.implicitHeight + 56 + color: "#CC1F1F1F" + radius: 12 + + ColumnLayout { + id: contentColumn + anchors.centerIn: parent + width: parent.width - 64 + spacing: 18 + + Text { + Layout.fillWidth: true + horizontalAlignment: Text.AlignHCenter + color: "#FFFFFF" + font.family: "Ubuntu" + font.pixelSize: 26 + font.bold: true + text: finishedRoot.t("A telepítés befejeződött", "Installation abgeschlossen", "Installation complete") + } + + Text { + Layout.fillWidth: true + horizontalAlignment: Text.AlignHCenter + color: "#E8E8E8" + font.family: "Ubuntu" + font.pixelSize: 15 + wrapMode: Text.WordWrap + text: finishedRoot.t("Indítsd újra a rendszert a %1 használatához.".arg(Branding.string(Branding.ProductName)), + "Starten Sie das System neu, um %1 zu verwenden.".arg(Branding.string(Branding.ProductName)), + "Restart the system to start using %1.".arg(Branding.string(Branding.ProductName))) + } + + Button { + id: restartButton + Layout.alignment: Qt.AlignHCenter + text: finishedRoot.t("Újraindítás most", "Jetzt neu starten", "Restart now") + hoverEnabled: true + onClicked: config.doRestart(true) + + contentItem: Text { + text: restartButton.text + font.family: "Ubuntu" + font.pixelSize: 14 + font.bold: true + color: "#FFFFFF" + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } + + background: Rectangle { + implicitWidth: 180 + implicitHeight: 40 + radius: 4 + color: (restartButton.down || restartButton.hovered) ? "#285226" : "#3d7839" + } + } + } + } + + // Kulon keret: tamogatok (alul) - csak akkor latszik, ha van nev + Rectangle { + id: supportersPanel + anchors.horizontalCenter: parent.horizontalCenter + anchors.top: panel.bottom + anchors.topMargin: 16 + width: Math.min(parent.width * 0.75, 780) + height: supportersColumn.implicitHeight + 40 + color: "#CC1F1F1F" + radius: 12 + visible: finishedRoot.hasSupporters + + ColumnLayout { + id: supportersColumn + anchors.centerIn: parent + width: parent.width - 48 + spacing: 10 + + Text { + Layout.fillWidth: true + horizontalAlignment: Text.AlignHCenter + color: "#B9B9B9" + font.family: "Ubuntu" + font.pixelSize: 15 + font.bold: true + text: finishedRoot.t("RaveOS támogatók", "RaveOS-Unterstützer", "RaveOS Supporters") + } + + Text { + id: supportersNames + Layout.fillWidth: true + horizontalAlignment: Text.AlignHCenter + color: "#DADADA" + font.family: "Ubuntu" + font.pixelSize: 15 + lineHeight: 1.4 + text: finishedRoot.supportersText + Behavior on opacity { NumberAnimation { duration: 250 } } + } + + Text { + Layout.fillWidth: true + horizontalAlignment: Text.AlignHCenter + color: "#8F8F8F" + font.family: "Ubuntu" + font.pixelSize: 12 + visible: finishedRoot.supportersPageCount > 1 + text: (finishedRoot.supportersPage + 1) + " / " + finishedRoot.supportersPageCount + } + + // Koszonet a tamogatasert + Text { + Layout.fillWidth: true + Layout.topMargin: 2 + horizontalAlignment: Text.AlignHCenter + color: "#B9B9B9" + font.family: "Ubuntu" + font.pixelSize: 13 + font.italic: true + wrapMode: Text.WordWrap + text: finishedRoot.t("Köszönjük a támogatást, a csapat minden tagja nevében!", + "Vielen Dank für die Unterstützung, im Namen aller Teammitglieder!", + "Thank you for your support, from every member of the team!") + } + } + } + + // Automatikus lapozas, ha tobb oldal van + Timer { + id: pageTimer + interval: 4000 + repeat: true + running: finishedRoot.hasSupporters && finishedRoot.supportersPageCount > 1 + onTriggered: { + supportersNames.opacity = 0; + fadeTimer.start(); + } + } + + Timer { + id: fadeTimer + interval: 260 + onTriggered: { + finishedRoot.supportersPage = (finishedRoot.supportersPage + 1) % finishedRoot.supportersPageCount; + supportersNames.opacity = 1; + } + } + + function onActivate() + { + } + + function onLeave() + { + } +} diff --git a/raveos-calamares-theme/etc/calamares/branding/raveos/images/raveos-finish.png b/raveos-calamares-theme/etc/calamares/branding/raveos/images/raveos-finish.png Binary files differnew file mode 100644 index 0000000..be6d510 --- /dev/null +++ b/raveos-calamares-theme/etc/calamares/branding/raveos/images/raveos-finish.png diff --git a/raveos-calamares-theme/etc/calamares/branding/raveos/supporters.js b/raveos-calamares-theme/etc/calamares/branding/raveos/supporters.js new file mode 100644 index 0000000..81c533f --- /dev/null +++ b/raveos-calamares-theme/etc/calamares/branding/raveos/supporters.js @@ -0,0 +1,9 @@ +// RaveOS supporters list +// The Calamares finished page reads this file (finishedq.qml). +// One name per line. The list can also be refreshed during install from: +// https://page.rp1.hu/supporters.js +.pragma library + +var names = [ + "New Supporter" +] diff --git a/raveos-calamares-theme/etc/calamares/modules/finishedq.conf b/raveos-calamares-theme/etc/calamares/modules/finishedq.conf new file mode 100644 index 0000000..e8729d6 --- /dev/null +++ b/raveos-calamares-theme/etc/calamares/modules/finishedq.conf @@ -0,0 +1,9 @@ +# RaveOS - Calamares finishedq (QML Done oldal) konfiguracio +# +# A finishedq modul QML valtozata. A kulon "Restart now" gomb a QML-bol +# hivja a config.doRestart(true) fuggvenyt, ezert itt a user-unchecked +# a helyes ertek: a "Close installer" gomb NEM indit ujra. +--- +restartNowMode: user-unchecked +restartNowCommand: "systemctl -i reboot" +notifyOnFinished: false diff --git a/raveos-calamares-theme/etc/calamares/modules/shellprocess-supporters.conf b/raveos-calamares-theme/etc/calamares/modules/shellprocess-supporters.conf new file mode 100644 index 0000000..35c080f --- /dev/null +++ b/raveos-calamares-theme/etc/calamares/modules/shellprocess-supporters.conf @@ -0,0 +1,9 @@ +dontChroot: true +timeout: 20 + +script: + # RaveOS: fetch the fresh supporters list (if online). Validated steps: + # download -> check "var names" and "]" -> replace. On any error the + # packaged list stays (|| true). + - command: "curl -fsSL --max-time 10 https://page.rp1.hu/supporters.js -o /tmp/raveos_supporters.js && grep -q 'var names' /tmp/raveos_supporters.js && grep -q ']' /tmp/raveos_supporters.js && cp /tmp/raveos_supporters.js /etc/calamares/branding/raveos/supporters.js || true" + name: "Downloading supporters list..." diff --git a/raveos-calamares-theme/etc/calamares/settings.conf b/raveos-calamares-theme/etc/calamares/settings.conf index 9780d3c..2750455 100755 --- a/raveos-calamares-theme/etc/calamares/settings.conf +++ b/raveos-calamares-theme/etc/calamares/settings.conf @@ -144,6 +144,9 @@ instances: - id: copybrave module: shellprocess config: shellprocess-copybrave.conf +- id: supporters + module: shellprocess + config: shellprocess-supporters.conf sequence: @@ -186,12 +189,13 @@ sequence: - shellprocess@dkms - shellprocess@enableservices - shellprocess@final + - shellprocess@supporters - shellprocess@loader - preservefiles - umount - show: # - webview@owncloud - - finished + - finishedq # A branding component is a directory, either in SHARE/calamares/branding or # in /etc/calamares/branding (the latter takes precedence). The directory must diff --git a/raveos-calamares/0003-restart-button.patch b/raveos-calamares/0003-restart-button.patch new file mode 100644 index 0000000..a06ea52 --- /dev/null +++ b/raveos-calamares/0003-restart-button.patch @@ -0,0 +1,58 @@ +--- a/src/calamares/CalamaresWindow.cpp ++++ b/src/calamares/CalamaresWindow.cpp +@@ -35,6 +35,9 @@ + #include <QFile> + #include <QFileInfo> + #include <QLabel> ++#include <QMessageBox> ++#include <QProcess> ++#include <QPushButton> + #ifdef WITH_QML + #include <QQmlContext> + #include <QQmlEngine> +@@ -216,6 +219,36 @@ + { + QWidget* navigation = new QWidget( parent ); + QBoxLayout* bottomLayout = new QHBoxLayout; ++ ++ // RaveOS: globalis ujrainditas gomb a bal also sarokban (minden oldalon lathato) ++ { ++ auto* restart = new QPushButton( ++ getButtonIcon( QStringLiteral( "view-refresh" ) ), ++ QCoreApplication::translate( CalamaresWindow::staticMetaObject.className(), "&Restart", "@button" ), ++ navigation ); ++ restart->setObjectName( "restartButton" ); ++ restart->setToolTip( QCoreApplication::translate( CalamaresWindow::staticMetaObject.className(), ++ "Restart the computer", ++ "@tooltip" ) ); ++ QObject::connect( restart, ++ &QPushButton::clicked, ++ navigation, ++ []() ++ { ++ if ( QMessageBox::question( nullptr, ++ QStringLiteral( "RaveOS" ), ++ QCoreApplication::translate( "calamares-sidebar", ++ "Restart the computer?", ++ "@info" ) ) ++ == QMessageBox::Yes ) ++ { ++ QProcess::startDetached( QStringLiteral( "systemctl" ), ++ { QStringLiteral( "-i" ), QStringLiteral( "reboot" ) } ); ++ } ++ } ); ++ bottomLayout->addWidget( restart ); ++ } ++ + bottomLayout->addStretch(); + + // Create buttons and sets an initial icon; the icons may change +@@ -272,7 +305,7 @@ + bottomLayout->addWidget( quit ); + } + +- bottomLayout->setContentsMargins( 0, 0, 6, 6 ); ++ bottomLayout->setContentsMargins( 6, 0, 6, 6 ); + navigation->setLayout( bottomLayout ); + return navigation; + } diff --git a/raveos-calamares/PKGBUILD b/raveos-calamares/PKGBUILD index 05885d7..fc96a9b 100644 --- a/raveos-calamares/PKGBUILD +++ b/raveos-calamares/PKGBUILD @@ -4,7 +4,7 @@ _pkgname="calamares" pkgname="$_pkgname" pkgver=3.4.2 -pkgrel=9 +pkgrel=10 pkgdesc="Distribution-independent installer framework" url="https://codeberg.org/Calamares/calamares" license=("GPL-3.0-or-later") @@ -31,15 +31,18 @@ _pkgsrc="$_pkgname" _pkgext="tar.gz" source=("$_pkgname-$pkgver.$_pkgext"::"$url/releases/download/v$pkgver/$_pkgname-$pkgver.$_pkgext" "0001-support-yay.patch" - "0002-limit-translations.patch") + "0002-limit-translations.patch" + "0003-restart-button.patch") sha256sums=('733bbbb00dc9f84874bd5c22960952f317ea2537565431179fa2152b2fbfdccc' 'SKIP' + 'SKIP' 'SKIP') prepare() { cd $srcdir/$_pkgname-$pkgver patch -Np1 -i ../0001-support-yay.patch patch -Np1 -i ../0002-limit-translations.patch + patch -Np1 -i ../0003-restart-button.patch # Copy across the custom images cp -a ${startdir}/images/partition-alongside.svg $srcdir/$_pkgname-$pkgver/data/images/partition-alongside.svg |