Improve system update views
This commit is contained in:
parent
46dc3fee96
commit
a6edb7f39e
@ -46,6 +46,7 @@ Package *PackagesFilterModel::get(int index) const
|
|||||||
|
|
||||||
bool PackagesFilterModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
|
bool PackagesFilterModel::filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
|
||||||
{
|
{
|
||||||
|
Q_UNUSED(source_parent)
|
||||||
if (m_updatesOnly) {
|
if (m_updatesOnly) {
|
||||||
if (!m_packages->get(source_row)->updateAvailable()) {
|
if (!m_packages->get(source_row)->updateAvailable()) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
@ -50,11 +50,21 @@ void SystemController::shutdown()
|
|||||||
m_jsonRpcClient->sendCommand("System.Shutdown");
|
m_jsonRpcClient->sendCommand("System.Shutdown");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool SystemController::updateManagementBusy() const
|
||||||
|
{
|
||||||
|
return m_updateManagementBusy;
|
||||||
|
}
|
||||||
|
|
||||||
bool SystemController::updateRunning() const
|
bool SystemController::updateRunning() const
|
||||||
{
|
{
|
||||||
return m_updateRunning;
|
return m_updateRunning;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SystemController::checkForUpdates()
|
||||||
|
{
|
||||||
|
m_jsonRpcClient->sendCommand("System.CheckForUpdates");
|
||||||
|
}
|
||||||
|
|
||||||
Packages *SystemController::packages() const
|
Packages *SystemController::packages() const
|
||||||
{
|
{
|
||||||
return m_packages;
|
return m_packages;
|
||||||
@ -109,6 +119,7 @@ void SystemController::getCapabilitiesResponse(const QVariantMap &data)
|
|||||||
|
|
||||||
void SystemController::getUpdateStatusResponse(const QVariantMap &data)
|
void SystemController::getUpdateStatusResponse(const QVariantMap &data)
|
||||||
{
|
{
|
||||||
|
m_updateManagementBusy = data.value("params").toMap().value("busy").toBool();
|
||||||
m_updateRunning = data.value("params").toMap().value("updateRunning").toBool();
|
m_updateRunning = data.value("params").toMap().value("updateRunning").toBool();
|
||||||
emit updateRunningChanged();
|
emit updateRunningChanged();
|
||||||
}
|
}
|
||||||
@ -119,6 +130,7 @@ void SystemController::getPackagesResponse(const QVariantMap &data)
|
|||||||
QString id = packageVariant.toMap().value("id").toString();
|
QString id = packageVariant.toMap().value("id").toString();
|
||||||
QString displayName = packageVariant.toMap().value("displayName").toString();
|
QString displayName = packageVariant.toMap().value("displayName").toString();
|
||||||
Package *p = new Package(id, displayName);
|
Package *p = new Package(id, displayName);
|
||||||
|
p->setSummary(packageVariant.toMap().value("summary").toString());
|
||||||
p->setInstalledVersion(packageVariant.toMap().value("installedVersion").toString());
|
p->setInstalledVersion(packageVariant.toMap().value("installedVersion").toString());
|
||||||
p->setCandidateVersion(packageVariant.toMap().value("candidateVersion").toString());
|
p->setCandidateVersion(packageVariant.toMap().value("candidateVersion").toString());
|
||||||
p->setChangelog(packageVariant.toMap().value("changelog").toString());
|
p->setChangelog(packageVariant.toMap().value("changelog").toString());
|
||||||
@ -148,16 +160,23 @@ void SystemController::removePackageResponse(const QVariantMap ¶ms)
|
|||||||
|
|
||||||
void SystemController::notificationReceived(const QVariantMap &data)
|
void SystemController::notificationReceived(const QVariantMap &data)
|
||||||
{
|
{
|
||||||
qDebug() << "System Notification" << data.value("notification");
|
|
||||||
QString notification = data.value("notification").toString();
|
QString notification = data.value("notification").toString();
|
||||||
if (notification == "System.UpdateStatusChanged") {
|
if (notification == "System.UpdateStatusChanged") {
|
||||||
m_updateRunning = data.value("params").toMap().value("updateRunning").toBool();
|
qDebug() << "System.UpdateStatusChanged:" << data.value("params").toMap();
|
||||||
emit updateRunningChanged();
|
if (m_updateManagementBusy != data.value("params").toMap().value("busy").toBool()) {
|
||||||
|
m_updateManagementBusy = data.value("params").toMap().value("busy").toBool();
|
||||||
|
emit updateManagementBusyChanged();
|
||||||
|
}
|
||||||
|
if (m_updateRunning != data.value("params").toMap().value("updateRunning").toBool()) {
|
||||||
|
m_updateRunning = data.value("params").toMap().value("updateRunning").toBool();
|
||||||
|
emit updateRunningChanged();
|
||||||
|
}
|
||||||
} else if (notification == "System.PackageAdded") {
|
} else if (notification == "System.PackageAdded") {
|
||||||
QVariantMap packageMap = data.value("params").toMap().value("package").toMap();
|
QVariantMap packageMap = data.value("params").toMap().value("package").toMap();
|
||||||
QString id = packageMap.value("id").toString();
|
QString id = packageMap.value("id").toString();
|
||||||
QString displayName = packageMap.value("displayName").toString();
|
QString displayName = packageMap.value("displayName").toString();
|
||||||
Package *p = new Package(id, displayName);
|
Package *p = new Package(id, displayName);
|
||||||
|
p->setSummary(packageMap.value("summary").toString());
|
||||||
p->setInstalledVersion(packageMap.value("installedVersion").toString());
|
p->setInstalledVersion(packageMap.value("installedVersion").toString());
|
||||||
p->setCandidateVersion(packageMap.value("candidateVersion").toString());
|
p->setCandidateVersion(packageMap.value("candidateVersion").toString());
|
||||||
p->setChangelog(packageMap.value("changelog").toString());
|
p->setChangelog(packageMap.value("changelog").toString());
|
||||||
@ -173,6 +192,7 @@ void SystemController::notificationReceived(const QVariantMap &data)
|
|||||||
qWarning() << "Received a package update notification for a package we don't know";
|
qWarning() << "Received a package update notification for a package we don't know";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
p->setSummary(packageMap.value("summary").toString());
|
||||||
p->setInstalledVersion(packageMap.value("installedVersion").toString());
|
p->setInstalledVersion(packageMap.value("installedVersion").toString());
|
||||||
p->setCandidateVersion(packageMap.value("candidateVersion").toString());
|
p->setCandidateVersion(packageMap.value("candidateVersion").toString());
|
||||||
p->setChangelog(packageMap.value("changelog").toString());
|
p->setChangelog(packageMap.value("changelog").toString());
|
||||||
@ -201,5 +221,7 @@ void SystemController::notificationReceived(const QVariantMap &data)
|
|||||||
} else if (notification == "System.RepositoryRemoved") {
|
} else if (notification == "System.RepositoryRemoved") {
|
||||||
QString repositoryId = data.value("params").toMap().value("repositoryId").toString();
|
QString repositoryId = data.value("params").toMap().value("repositoryId").toString();
|
||||||
m_repositories->removeRepository(repositoryId);
|
m_repositories->removeRepository(repositoryId);
|
||||||
|
} else {
|
||||||
|
qWarning() << "Unhandled System Notification" << data.value("notification");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -15,6 +15,7 @@ class SystemController : public JsonHandler
|
|||||||
// Whether the update mechanism is available in the connected core
|
// Whether the update mechanism is available in the connected core
|
||||||
Q_PROPERTY(bool updateManagementAvailable READ updateManagementAvailable NOTIFY updateManagementAvailableChanged)
|
Q_PROPERTY(bool updateManagementAvailable READ updateManagementAvailable NOTIFY updateManagementAvailableChanged)
|
||||||
|
|
||||||
|
Q_PROPERTY(bool updateManagementBusy READ updateManagementBusy NOTIFY updateManagementBusyChanged)
|
||||||
Q_PROPERTY(bool updateRunning READ updateRunning NOTIFY updateRunningChanged)
|
Q_PROPERTY(bool updateRunning READ updateRunning NOTIFY updateRunningChanged)
|
||||||
Q_PROPERTY(Packages* packages READ packages CONSTANT)
|
Q_PROPERTY(Packages* packages READ packages CONSTANT)
|
||||||
Q_PROPERTY(Repositories* repositories READ repositories CONSTANT)
|
Q_PROPERTY(Repositories* repositories READ repositories CONSTANT)
|
||||||
@ -31,8 +32,10 @@ public:
|
|||||||
Q_INVOKABLE void reboot();
|
Q_INVOKABLE void reboot();
|
||||||
Q_INVOKABLE void shutdown();
|
Q_INVOKABLE void shutdown();
|
||||||
|
|
||||||
|
bool updateManagementBusy() const;
|
||||||
bool updateRunning() const;
|
bool updateRunning() const;
|
||||||
|
|
||||||
|
Q_INVOKABLE void checkForUpdates();
|
||||||
Packages* packages() const;
|
Packages* packages() const;
|
||||||
Q_INVOKABLE void updatePackages(const QString packageId = QString());
|
Q_INVOKABLE void updatePackages(const QString packageId = QString());
|
||||||
Q_INVOKABLE void removePackages(const QString packageId = QString());
|
Q_INVOKABLE void removePackages(const QString packageId = QString());
|
||||||
@ -44,6 +47,7 @@ public:
|
|||||||
signals:
|
signals:
|
||||||
void powerManagementAvailableChanged();
|
void powerManagementAvailableChanged();
|
||||||
void updateManagementAvailableChanged();
|
void updateManagementAvailableChanged();
|
||||||
|
void updateManagementBusyChanged();
|
||||||
void updateRunningChanged();
|
void updateRunningChanged();
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
@ -61,6 +65,7 @@ private:
|
|||||||
bool m_powerManagementAvailable = false;
|
bool m_powerManagementAvailable = false;
|
||||||
bool m_updateManagementAvailable = false;
|
bool m_updateManagementAvailable = false;
|
||||||
|
|
||||||
|
bool m_updateManagementBusy = false;
|
||||||
bool m_updateRunning = false;
|
bool m_updateRunning = false;
|
||||||
Packages *m_packages = nullptr;
|
Packages *m_packages = nullptr;
|
||||||
Repositories *m_repositories = nullptr;
|
Repositories *m_repositories = nullptr;
|
||||||
|
|||||||
@ -18,6 +18,19 @@ QString Package::displayName() const
|
|||||||
return m_displayName;
|
return m_displayName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString Package::summary() const
|
||||||
|
{
|
||||||
|
return m_summary;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Package::setSummary(const QString &summary)
|
||||||
|
{
|
||||||
|
if(m_summary != summary) {
|
||||||
|
m_summary = summary;
|
||||||
|
emit summaryChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
QString Package::installedVersion() const
|
QString Package::installedVersion() const
|
||||||
{
|
{
|
||||||
return m_installedVersion;
|
return m_installedVersion;
|
||||||
|
|||||||
@ -8,6 +8,7 @@ class Package : public QObject
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
Q_PROPERTY(QString id READ id CONSTANT)
|
Q_PROPERTY(QString id READ id CONSTANT)
|
||||||
Q_PROPERTY(QString displayName READ displayName CONSTANT)
|
Q_PROPERTY(QString displayName READ displayName CONSTANT)
|
||||||
|
Q_PROPERTY(QString summary READ summary NOTIFY summaryChanged)
|
||||||
Q_PROPERTY(QString installedVersion READ installedVersion NOTIFY installedVersionChanged)
|
Q_PROPERTY(QString installedVersion READ installedVersion NOTIFY installedVersionChanged)
|
||||||
Q_PROPERTY(QString candidateVersion READ candidateVersion NOTIFY candidateVersionChanged)
|
Q_PROPERTY(QString candidateVersion READ candidateVersion NOTIFY candidateVersionChanged)
|
||||||
Q_PROPERTY(QString changelog READ changelog NOTIFY changelogChanged)
|
Q_PROPERTY(QString changelog READ changelog NOTIFY changelogChanged)
|
||||||
@ -21,6 +22,9 @@ public:
|
|||||||
QString id() const;
|
QString id() const;
|
||||||
QString displayName() const;
|
QString displayName() const;
|
||||||
|
|
||||||
|
QString summary() const;
|
||||||
|
void setSummary(const QString &summary);
|
||||||
|
|
||||||
QString installedVersion() const;
|
QString installedVersion() const;
|
||||||
void setInstalledVersion(const QString &installedVersion);
|
void setInstalledVersion(const QString &installedVersion);
|
||||||
|
|
||||||
@ -40,6 +44,7 @@ public:
|
|||||||
void setCanRemove(bool canRemove);
|
void setCanRemove(bool canRemove);
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
void summaryChanged();
|
||||||
void installedVersionChanged();
|
void installedVersionChanged();
|
||||||
void candidateVersionChanged();
|
void candidateVersionChanged();
|
||||||
void changelogChanged();
|
void changelogChanged();
|
||||||
@ -50,6 +55,7 @@ signals:
|
|||||||
private:
|
private:
|
||||||
QString m_id;
|
QString m_id;
|
||||||
QString m_displayName;
|
QString m_displayName;
|
||||||
|
QString m_summary;
|
||||||
QString m_installedVersion;
|
QString m_installedVersion;
|
||||||
QString m_candidateVersion;
|
QString m_candidateVersion;
|
||||||
QString m_changelog;
|
QString m_changelog;
|
||||||
|
|||||||
@ -19,6 +19,8 @@ QVariant Packages::data(const QModelIndex &index, int role) const
|
|||||||
return m_list.at(index.row())->id();
|
return m_list.at(index.row())->id();
|
||||||
case RoleDisplayName:
|
case RoleDisplayName:
|
||||||
return m_list.at(index.row())->displayName();
|
return m_list.at(index.row())->displayName();
|
||||||
|
case RoleSummary:
|
||||||
|
return m_list.at(index.row())->summary();
|
||||||
case RoleInstalledVersion:
|
case RoleInstalledVersion:
|
||||||
return m_list.at(index.row())->installedVersion();
|
return m_list.at(index.row())->installedVersion();
|
||||||
case RoleCandidateVersion:
|
case RoleCandidateVersion:
|
||||||
@ -38,6 +40,7 @@ QHash<int, QByteArray> Packages::roleNames() const
|
|||||||
QHash<int, QByteArray> roles;
|
QHash<int, QByteArray> roles;
|
||||||
roles.insert(RoleId, "id");
|
roles.insert(RoleId, "id");
|
||||||
roles.insert(RoleDisplayName, "displayName");
|
roles.insert(RoleDisplayName, "displayName");
|
||||||
|
roles.insert(RoleSummary, "summary");
|
||||||
roles.insert(RoleInstalledVersion, "installedVersion");
|
roles.insert(RoleInstalledVersion, "installedVersion");
|
||||||
roles.insert(RoleCandidateVersion, "candidateVersion");
|
roles.insert(RoleCandidateVersion, "candidateVersion");
|
||||||
roles.insert(RoleChangelog, "changelog");
|
roles.insert(RoleChangelog, "changelog");
|
||||||
@ -51,6 +54,10 @@ void Packages::addPackage(Package *package)
|
|||||||
package->setParent(this);
|
package->setParent(this);
|
||||||
beginInsertRows(QModelIndex(), m_list.count(), m_list.count());
|
beginInsertRows(QModelIndex(), m_list.count(), m_list.count());
|
||||||
m_list.append(package);
|
m_list.append(package);
|
||||||
|
connect(package, &Package::summaryChanged, this, [this, package](){
|
||||||
|
emit dataChanged(index(m_list.indexOf(package)), index(m_list.indexOf(package)), {RoleSummary});
|
||||||
|
emit countChanged();
|
||||||
|
});
|
||||||
connect(package, &Package::installedVersionChanged, this, [this, package](){
|
connect(package, &Package::installedVersionChanged, this, [this, package](){
|
||||||
emit dataChanged(index(m_list.indexOf(package)), index(m_list.indexOf(package)), {RoleInstalledVersion});
|
emit dataChanged(index(m_list.indexOf(package)), index(m_list.indexOf(package)), {RoleInstalledVersion});
|
||||||
emit countChanged();
|
emit countChanged();
|
||||||
|
|||||||
@ -13,6 +13,7 @@ public:
|
|||||||
enum Roles {
|
enum Roles {
|
||||||
RoleId,
|
RoleId,
|
||||||
RoleDisplayName,
|
RoleDisplayName,
|
||||||
|
RoleSummary,
|
||||||
RoleInstalledVersion,
|
RoleInstalledVersion,
|
||||||
RoleCandidateVersion,
|
RoleCandidateVersion,
|
||||||
RoleChangelog,
|
RoleChangelog,
|
||||||
|
|||||||
@ -1905,6 +1905,14 @@ Bitte versuche es erneut.</translation>
|
|||||||
<source>Time zone</source>
|
<source>Time zone</source>
|
||||||
<translation>Zeitzone</translation>
|
<translation>Zeitzone</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Reboot %1:core</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Shutdown %1:core</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>GenericDeviceListPage</name>
|
<name>GenericDeviceListPage</name>
|
||||||
@ -2715,6 +2723,17 @@ Bitte versuche es erneut.</translation>
|
|||||||
<source>Disconnect</source>
|
<source>Disconnect</source>
|
||||||
<translation>Trennen</translation>
|
<translation>Trennen</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>System update in progress...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message numerus="yes">
|
||||||
|
<source>%n system update(s) available</source>
|
||||||
|
<translation type="unfinished">
|
||||||
|
<numerusform>%n System-Update verfügbar</numerusform>
|
||||||
|
<numerusform>%n System-Updates verfügbar</numerusform>
|
||||||
|
</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ManualConnectPage</name>
|
<name>ManualConnectPage</name>
|
||||||
@ -3467,6 +3486,18 @@ Bitte versuche es erneut.</translation>
|
|||||||
<source>OK</source>
|
<source>OK</source>
|
||||||
<translation>OK</translation>
|
<translation>OK</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Use a thing's state value</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Insert value here</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Select a state</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>SelectStateDescriptorParamsPage</name>
|
<name>SelectStateDescriptorParamsPage</name>
|
||||||
@ -3483,6 +3514,13 @@ Bitte versuche es erneut.</translation>
|
|||||||
<translation>Optionen</translation>
|
<translation>Optionen</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>SelectStatePage</name>
|
||||||
|
<message>
|
||||||
|
<source>Select state</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>SelectThingPage</name>
|
<name>SelectThingPage</name>
|
||||||
<message>
|
<message>
|
||||||
@ -3546,6 +3584,14 @@ Bitte versuche es erneut.</translation>
|
|||||||
<source>Sensors</source>
|
<source>Sensors</source>
|
||||||
<translation>Sensoren</translation>
|
<translation>Sensoren</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>is closed</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>is open</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ServerConfigurationDialog</name>
|
<name>ServerConfigurationDialog</name>
|
||||||
@ -3764,6 +3810,14 @@ Bitte versuche es erneut.</translation>
|
|||||||
<source>Find server UUID and versions</source>
|
<source>Find server UUID and versions</source>
|
||||||
<translation>Finde Server UUID und Versionen</translation>
|
<translation>Finde Server UUID und Versionen</translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>System update</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Update your %1:core system</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>SetupWizard</name>
|
<name>SetupWizard</name>
|
||||||
@ -3942,6 +3996,84 @@ Bitte versuche es erneut.</translation>
|
|||||||
<translation type="vanished">Logansicht</translation>
|
<translation type="vanished">Logansicht</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>SystemUpdatePage</name>
|
||||||
|
<message>
|
||||||
|
<source>System update</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Configure updates</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show all packages</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Your system is up to date.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>There are %1 updates available.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Update all</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>This will start a system update. Note that the update might take several minutes and your %1:core might not be functioning properly during this time and restart during the process.
|
||||||
|
Do you want to proceed?</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Configure update sources</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Enabling additional software sources allows to install unreleased %1:core packages.
|
||||||
|
This can potentially break your system and lead to problems.
|
||||||
|
Please only use this if you are sure you want this and consider reporting the issues you find when testing unreleased channels.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Enable package source</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>All packages</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Installed version:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Candidate version:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Update</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Install</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Start update</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Remove</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Remove package</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>TimeEventDelegate</name>
|
<name>TimeEventDelegate</name>
|
||||||
<message>
|
<message>
|
||||||
@ -4005,6 +4137,14 @@ Bitte versuche es erneut.</translation>
|
|||||||
<translation>jährlich</translation>
|
<translation>jährlich</translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>UpdateRunningOverlay</name>
|
||||||
|
<message>
|
||||||
|
<source>An update operation is currently running.
|
||||||
|
Please wait for it to complete.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>WeatherDeviceListPage</name>
|
<name>WeatherDeviceListPage</name>
|
||||||
<message>
|
<message>
|
||||||
|
|||||||
@ -1475,6 +1475,14 @@ Please try again.</source>
|
|||||||
<source>Time zone</source>
|
<source>Time zone</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Reboot %1:core</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Shutdown %1:core</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>GenericDeviceListPage</name>
|
<name>GenericDeviceListPage</name>
|
||||||
@ -2184,6 +2192,17 @@ Please try again.</source>
|
|||||||
<source>Disconnect</source>
|
<source>Disconnect</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>System update in progress...</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message numerus="yes">
|
||||||
|
<source>%n system update(s) available</source>
|
||||||
|
<translation type="unfinished">
|
||||||
|
<numerusform>%n system update available</numerusform>
|
||||||
|
<numerusform>%n system updates available</numerusform>
|
||||||
|
</translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ManualConnectPage</name>
|
<name>ManualConnectPage</name>
|
||||||
@ -2783,6 +2802,18 @@ Please try again.</source>
|
|||||||
<source>OK</source>
|
<source>OK</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Use a thing's state value</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Insert value here</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Select a state</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>SelectStateDescriptorParamsPage</name>
|
<name>SelectStateDescriptorParamsPage</name>
|
||||||
@ -2795,6 +2826,13 @@ Please try again.</source>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>SelectStatePage</name>
|
||||||
|
<message>
|
||||||
|
<source>Select state</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>SelectThingPage</name>
|
<name>SelectThingPage</name>
|
||||||
<message>
|
<message>
|
||||||
@ -2850,6 +2888,14 @@ Please try again.</source>
|
|||||||
<source>Sensors</source>
|
<source>Sensors</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>is closed</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>is open</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>ServerConfigurationDialog</name>
|
<name>ServerConfigurationDialog</name>
|
||||||
@ -2968,6 +3014,14 @@ Please try again.</source>
|
|||||||
<source>Find server UUID and versions</source>
|
<source>Find server UUID and versions</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>System update</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Update your %1:core system</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
</context>
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>SetupWizard</name>
|
<name>SetupWizard</name>
|
||||||
@ -3099,6 +3153,84 @@ Please try again.</source>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>SystemUpdatePage</name>
|
||||||
|
<message>
|
||||||
|
<source>System update</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Configure updates</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Show all packages</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Your system is up to date.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>There are %1 updates available.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Update all</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>This will start a system update. Note that the update might take several minutes and your %1:core might not be functioning properly during this time and restart during the process.
|
||||||
|
Do you want to proceed?</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Configure update sources</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Enabling additional software sources allows to install unreleased %1:core packages.
|
||||||
|
This can potentially break your system and lead to problems.
|
||||||
|
Please only use this if you are sure you want this and consider reporting the issues you find when testing unreleased channels.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Enable package source</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>All packages</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Installed version:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Candidate version:</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Update</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Install</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Start update</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Remove</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<source>Remove package</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>TimeEventDelegate</name>
|
<name>TimeEventDelegate</name>
|
||||||
<message>
|
<message>
|
||||||
@ -3162,6 +3294,14 @@ Please try again.</source>
|
|||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
</context>
|
</context>
|
||||||
|
<context>
|
||||||
|
<name>UpdateRunningOverlay</name>
|
||||||
|
<message>
|
||||||
|
<source>An update operation is currently running.
|
||||||
|
Please wait for it to complete.</source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
</context>
|
||||||
<context>
|
<context>
|
||||||
<name>WeatherDeviceListPage</name>
|
<name>WeatherDeviceListPage</name>
|
||||||
<message>
|
<message>
|
||||||
|
|||||||
@ -125,6 +125,57 @@ Page {
|
|||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
id: mainColumn
|
id: mainColumn
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
spacing: 0
|
||||||
|
|
||||||
|
Pane {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.preferredHeight: shownHeight
|
||||||
|
property int shownHeight: shown ? contentRow.implicitHeight : 0
|
||||||
|
property bool shown: updatesModel.count > 0 || engine.systemController.updateRunning
|
||||||
|
visible: shownHeight > 0
|
||||||
|
Behavior on shownHeight { NumberAnimation { easing.type: Easing.InOutQuad; duration: 150 } }
|
||||||
|
Material.elevation: 2
|
||||||
|
padding: 0
|
||||||
|
|
||||||
|
MouseArea {
|
||||||
|
anchors.fill: parent
|
||||||
|
onClicked: pageStack.push(Qt.resolvedUrl("system/SystemUpdatePage.qml"))
|
||||||
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
color: app.accentColor
|
||||||
|
anchors.fill: parent
|
||||||
|
|
||||||
|
PackagesFilterModel {
|
||||||
|
id: updatesModel
|
||||||
|
packages: engine.systemController.packages
|
||||||
|
updatesOnly: true
|
||||||
|
}
|
||||||
|
|
||||||
|
RowLayout {
|
||||||
|
id: contentRow
|
||||||
|
anchors { left: parent.left; top: parent.top; right: parent.right; leftMargin: app.margins; rightMargin: app.margins }
|
||||||
|
Item {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
height: app.iconSize
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
text: engine.systemController.updateRunning ? qsTr("System update in progress...") : qsTr("%n system update(s) available", "", updatesModel.count)
|
||||||
|
color: "white"
|
||||||
|
font.pixelSize: app.smallFont
|
||||||
|
}
|
||||||
|
ColorIcon {
|
||||||
|
height: app.iconSize / 2
|
||||||
|
width: height
|
||||||
|
visible: infoPane.connectedState !== null && infoPane.connectedState.value === false
|
||||||
|
color: "white"
|
||||||
|
name: "../images/system-update.svg"
|
||||||
|
RotationAnimation on rotation { from: 0; to: 360; duration: 2000; loops: Animation.Infinite; running: engine.systemController.updateRunning }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
Item {
|
Item {
|
||||||
|
|||||||
@ -1,13 +1,13 @@
|
|||||||
import QtQuick 2.9
|
import QtQuick 2.9
|
||||||
import QtQuick.Controls 2.2
|
import QtQuick.Controls 2.2
|
||||||
import QtQuick.Layouts 1.2
|
import QtQuick.Layouts 1.2
|
||||||
|
import Nymea 1.0
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
color: "#99000000"
|
color: "#99000000"
|
||||||
visible: shown
|
visible: engine.systemController.updateRunning
|
||||||
|
|
||||||
property bool shown: false
|
|
||||||
// Event eater
|
// Event eater
|
||||||
MouseArea {
|
MouseArea {
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
@ -26,19 +26,36 @@ Rectangle {
|
|||||||
PropertyAnimation on rotation {
|
PropertyAnimation on rotation {
|
||||||
from: 0; to: 360;
|
from: 0; to: 360;
|
||||||
duration: 2000
|
duration: 2000
|
||||||
loops: Animation.Inifinite
|
loops: Animation.Infinite
|
||||||
onStopped: start(); // No clue why loops won't work
|
// onStopped: start(); // No clue why loops won't work
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Label {
|
Label {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.margins: app.margins * 2
|
Layout.margins: app.margins * 2
|
||||||
text: qsTr("An update operation is currently running.\nPlease wait for it to complete.")
|
text: qsTr("System update in progress...")
|
||||||
horizontalAlignment: Text.AlignHCenter
|
horizontalAlignment: Text.AlignHCenter
|
||||||
wrapMode: Text.WordWrap
|
wrapMode: Text.WordWrap
|
||||||
font.pixelSize: app.largeFont
|
font.pixelSize: app.largeFont
|
||||||
color: "white"
|
color: "white"
|
||||||
}
|
}
|
||||||
|
Label {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.margins: app.margins * 2
|
||||||
|
text: qsTr("Please wait.")
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
color: "white"
|
||||||
|
}
|
||||||
|
Label {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.margins: app.margins * 2
|
||||||
|
text: qsTr("The system may restart in order to complete the updates. %1:app will reconnect automatically after the update.").arg(app.systemName)
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
font.pixelSize: app.smallFont
|
||||||
|
color: "white"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -96,18 +96,44 @@ Page {
|
|||||||
|
|
||||||
Button {
|
Button {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.margins: app.margins
|
||||||
text: qsTr("Reboot %1:core").arg(app.systemName)
|
text: qsTr("Reboot %1:core").arg(app.systemName)
|
||||||
visible: engine.systemController.powerManagementAvailable
|
visible: engine.systemController.powerManagementAvailable
|
||||||
onClicked: {
|
onClicked: {
|
||||||
engine.systemController.reboot()
|
var dialog = Qt.createComponent(Qt.resolvedUrl("../components/MeaDialog.qml"));
|
||||||
|
var text = qsTr("Are you sure you want to reboot your %1:core sytem now?").arg(app.systemName)
|
||||||
|
var popup = dialog.createObject(app,
|
||||||
|
{
|
||||||
|
headerIcon: "../images/dialog-warning-symbolic.svg",
|
||||||
|
title: qsTr("Reboot %1:core").arg(app.systemName),
|
||||||
|
text: text,
|
||||||
|
standardButtons: Dialog.Ok | Dialog.Cancel
|
||||||
|
});
|
||||||
|
popup.open();
|
||||||
|
popup.accepted.connect(function() {
|
||||||
|
engine.systemController.reboot()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Button {
|
Button {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
|
Layout.margins: app.margins
|
||||||
text: qsTr("Shutdown %1:core").arg(app.systemName)
|
text: qsTr("Shutdown %1:core").arg(app.systemName)
|
||||||
visible: engine.systemController.powerManagementAvailable
|
visible: engine.systemController.powerManagementAvailable
|
||||||
onClicked: {
|
onClicked: {
|
||||||
engine.systemController.shutdown()
|
var dialog = Qt.createComponent(Qt.resolvedUrl("../components/MeaDialog.qml"));
|
||||||
|
var text = qsTr("Are you sure you want to shut down your %1:core sytem now?").arg(app.systemName)
|
||||||
|
var popup = dialog.createObject(app,
|
||||||
|
{
|
||||||
|
headerIcon: "../images/dialog-warning-symbolic.svg",
|
||||||
|
title: qsTr("Shot down %1:core").arg(app.systemName),
|
||||||
|
text: text,
|
||||||
|
standardButtons: Dialog.Ok | Dialog.Cancel
|
||||||
|
});
|
||||||
|
popup.open();
|
||||||
|
popup.accepted.connect(function() {
|
||||||
|
engine.systemController.shutdown()
|
||||||
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -11,6 +11,14 @@ Page {
|
|||||||
text: qsTr("System update")
|
text: qsTr("System update")
|
||||||
backButtonVisible: true
|
backButtonVisible: true
|
||||||
onBackPressed: pageStack.pop()
|
onBackPressed: pageStack.pop()
|
||||||
|
|
||||||
|
HeaderButton {
|
||||||
|
text: qsTr("Settings")
|
||||||
|
imageSource: "../images/settings.svg"
|
||||||
|
onClicked: {
|
||||||
|
pageStack.push(repositoryListComponent)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
PackagesFilterModel {
|
PackagesFilterModel {
|
||||||
@ -23,73 +31,127 @@ Page {
|
|||||||
id: contentColumn
|
id: contentColumn
|
||||||
anchors.fill: parent
|
anchors.fill: parent
|
||||||
|
|
||||||
MeaListItemDelegate {
|
Item {
|
||||||
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: qsTr("Configure updates")
|
visible: updatesModel.count === 0
|
||||||
onClicked: {
|
|
||||||
pageStack.push(repositoryListComponent)
|
ColumnLayout {
|
||||||
|
width: parent.width
|
||||||
|
anchors.centerIn: parent
|
||||||
|
spacing: app.margins * 2
|
||||||
|
|
||||||
|
ColorIcon {
|
||||||
|
Layout.preferredHeight: app.iconSize * 4
|
||||||
|
Layout.preferredWidth: height
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
name: "../images/system-update.svg"
|
||||||
|
color: app.accentColor
|
||||||
|
RotationAnimation on rotation {
|
||||||
|
from: 0; to: 360
|
||||||
|
duration: 2000
|
||||||
|
running: engine.systemController.updateManagementBusy
|
||||||
|
loops: Animation.Infinite
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.margins: app.margins
|
||||||
|
horizontalAlignment: Text.AlignHCenter
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
text: engine.systemController.updateManagementBusy ? qsTr("Checking for updates...") : qsTr("Your system is up to date.")
|
||||||
|
}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
Layout.alignment: Qt.AlignHCenter
|
||||||
|
text: qsTr("Check for updates")
|
||||||
|
enabled: !engine.systemController.updateManagementBusy
|
||||||
|
onClicked: {
|
||||||
|
engine.systemController.checkForUpdates()
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
MeaListItemDelegate {
|
ColumnLayout {
|
||||||
|
Layout.fillHeight: true
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: qsTr("Show all packages")
|
visible: updatesModel.count > 0
|
||||||
onClicked: {
|
|
||||||
pageStack.push(packageListComponent, {packages: engine.systemController.packages})
|
RowLayout {
|
||||||
|
Layout.margins: app.margins
|
||||||
|
|
||||||
|
ColorIcon {
|
||||||
|
Layout.preferredHeight: app.iconSize * 2
|
||||||
|
Layout.preferredWidth: height
|
||||||
|
name: "../images/system-update.svg"
|
||||||
|
color: app.accentColor
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: qsTr("%n update(s) available", "", updatesModel.count)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ThinDivider {}
|
||||||
|
|
||||||
|
ListView {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.fillHeight: true
|
||||||
|
visible: count > 0
|
||||||
|
model: updatesModel
|
||||||
|
clip: true
|
||||||
|
delegate: MeaListItemDelegate {
|
||||||
|
width: parent.width
|
||||||
|
text: model.displayName
|
||||||
|
subText: model.candidateVersion
|
||||||
|
prominentSubText: false
|
||||||
|
iconName: model.updateAvailable
|
||||||
|
? Qt.resolvedUrl("../images/system-update.svg")
|
||||||
|
: Qt.resolvedUrl("../images/view-" + (model.installedVersion.length > 0 ? "expand" : "collapse") + ".svg")
|
||||||
|
iconColor: model.updateAvailable
|
||||||
|
? "green"
|
||||||
|
: model.installedVersion.length > 0 ? "blue" : iconKeyColor
|
||||||
|
onClicked: {
|
||||||
|
pageStack.push(packageDetailsComponent, {pkg: updatesModel.get(index)})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
ThinDivider {}
|
||||||
|
|
||||||
|
Button {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.margins: app.margins
|
||||||
|
text: qsTr("Update all")
|
||||||
|
visible: updatesModel.count > 0
|
||||||
|
onClicked: {
|
||||||
|
var dialog = Qt.createComponent(Qt.resolvedUrl("../components/MeaDialog.qml"));
|
||||||
|
var text = qsTr("This will start a system update. Note that the update might take several minutes and your %1:core might not be functioning properly during this time and restart during the process.\nDo you want to proceed?").arg(app.systemName)
|
||||||
|
var popup = dialog.createObject(app,
|
||||||
|
{
|
||||||
|
headerIcon: "../images/system-update.svg",
|
||||||
|
title: qsTr("System update"),
|
||||||
|
text: text,
|
||||||
|
standardButtons: Dialog.Ok | Dialog.Cancel
|
||||||
|
});
|
||||||
|
popup.open();
|
||||||
|
popup.accepted.connect(function() {
|
||||||
|
engine.systemController.updatePackages()
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ThinDivider {}
|
ThinDivider {}
|
||||||
|
|
||||||
Label {
|
MeaListItemDelegate {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
Layout.margins: app.margins
|
text: qsTr("Install or remove software")
|
||||||
elide: Text.ElideRight
|
|
||||||
text: updatesModel.count === 0 ? qsTr("Your system is up to date.") : qsTr("There are %1 updates available.").arg(updatesModel.count)
|
|
||||||
}
|
|
||||||
|
|
||||||
Button {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.margins: app.margins
|
|
||||||
text: qsTr("Update all")
|
|
||||||
visible: updatesModel.count > 0
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var dialog = Qt.createComponent(Qt.resolvedUrl("../components/MeaDialog.qml"));
|
pageStack.push(packageListComponent, {packages: engine.systemController.packages})
|
||||||
var text = qsTr("This will start a system update. Note that the update might take several minutes and your %1:core might not be functioning properly during this time and restart during the process.\nDo you want to proceed?").arg(app.systemName)
|
|
||||||
var popup = dialog.createObject(app,
|
|
||||||
{
|
|
||||||
headerIcon: "../images/system-update.svg",
|
|
||||||
title: qsTr("System update"),
|
|
||||||
text: text,
|
|
||||||
standardButtons: Dialog.Ok | Dialog.Cancel
|
|
||||||
});
|
|
||||||
popup.open();
|
|
||||||
popup.accepted.connect(function() {
|
|
||||||
engine.systemController.updatePackages()
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ListView {
|
|
||||||
Layout.fillWidth: true
|
|
||||||
Layout.fillHeight: true
|
|
||||||
model: updatesModel
|
|
||||||
clip: true
|
|
||||||
delegate: MeaListItemDelegate {
|
|
||||||
width: parent.width
|
|
||||||
text: model.displayName
|
|
||||||
subText: model.candidateVersion
|
|
||||||
prominentSubText: false
|
|
||||||
iconName: model.updateAvailable
|
|
||||||
? Qt.resolvedUrl("../images/system-update.svg")
|
|
||||||
: Qt.resolvedUrl("../images/view-" + (model.installedVersion.length > 0 ? "expand" : "collapse") + ".svg")
|
|
||||||
iconColor: model.updateAvailable
|
|
||||||
? "green"
|
|
||||||
: model.installedVersion.length > 0 ? "blue" : iconKeyColor
|
|
||||||
onClicked: {
|
|
||||||
pageStack.push(packageDetailsComponent, {pkg: updatesModel.get(index)})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -134,7 +196,6 @@ Page {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
UpdateRunningOverlay {
|
UpdateRunningOverlay {
|
||||||
visible: engine.systemController.updateRunning
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -174,7 +235,6 @@ Page {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
UpdateRunningOverlay {
|
UpdateRunningOverlay {
|
||||||
visible: engine.systemController.updateRunning
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -187,17 +247,42 @@ Page {
|
|||||||
property Package pkg: null
|
property Package pkg: null
|
||||||
|
|
||||||
header: GuhHeader {
|
header: GuhHeader {
|
||||||
text: pkg.displayName
|
text: qsTr("Package inforation")
|
||||||
onBackPressed: pageStack.pop()
|
onBackPressed: pageStack.pop()
|
||||||
}
|
}
|
||||||
|
|
||||||
GridLayout {
|
GridLayout {
|
||||||
anchors { left: parent.left; top: parent.top; right: parent.right }
|
anchors { left: parent.left; top: parent.top; right: parent.right }
|
||||||
columns: app.landscape ? 2 : 1
|
columns: app.landscape ? 2 : 1
|
||||||
|
RowLayout {
|
||||||
|
Layout.margins: app.margins
|
||||||
|
spacing: app.margins
|
||||||
|
ColorIcon {
|
||||||
|
Layout.preferredHeight: app.iconSize * 2
|
||||||
|
Layout.preferredWidth: app.iconSize * 2
|
||||||
|
name: "../images/plugin.svg"
|
||||||
|
color: app.accentColor
|
||||||
|
}
|
||||||
|
Label {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
text: pkg.displayName
|
||||||
|
font.pixelSize: app.largeFont
|
||||||
|
elide: Text.ElideRight
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Label {
|
||||||
|
Layout.fillWidth: true
|
||||||
|
Layout.leftMargin: app.margins
|
||||||
|
Layout.rightMargin: app.margins
|
||||||
|
text: packageDetailsPage.pkg.summary
|
||||||
|
wrapMode: Text.WordWrap
|
||||||
|
}
|
||||||
|
|
||||||
MeaListItemDelegate {
|
MeaListItemDelegate {
|
||||||
Layout.fillWidth: true
|
Layout.fillWidth: true
|
||||||
text: qsTr("Installed version:")
|
text: qsTr("Installed version:")
|
||||||
subText: packageDetailsPage.pkg.installedVersion
|
subText: packageDetailsPage.pkg.installedVersion.length > 0 ? packageDetailsPage.pkg.installedVersion : qsTr("Not installed")
|
||||||
progressive: false
|
progressive: false
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -215,7 +300,9 @@ Page {
|
|||||||
text: packageDetailsPage.pkg.updateAvailable ? qsTr("Update") : qsTr("Install")
|
text: packageDetailsPage.pkg.updateAvailable ? qsTr("Update") : qsTr("Install")
|
||||||
onClicked: {
|
onClicked: {
|
||||||
var dialog = Qt.createComponent(Qt.resolvedUrl("../components/MeaDialog.qml"));
|
var dialog = Qt.createComponent(Qt.resolvedUrl("../components/MeaDialog.qml"));
|
||||||
var text = qsTr("This will start a system update. Note that the update might take several minutes and your %1:core might not be functioning properly during this time and restart during the process.\nDo you want to proceed?").arg(app.systemName)
|
var text = qsTr("This will start a system update. Note that the update might take several minutes and your %1:core might not be functioning properly or restart during this time.").arg(app.systemName)
|
||||||
|
+ "\n\n"
|
||||||
|
+ qsTr("\nDo you want to proceed?")
|
||||||
var popup = dialog.createObject(app,
|
var popup = dialog.createObject(app,
|
||||||
{
|
{
|
||||||
headerIcon: "../images/system-update.svg",
|
headerIcon: "../images/system-update.svg",
|
||||||
@ -254,13 +341,11 @@ Page {
|
|||||||
|
|
||||||
}
|
}
|
||||||
UpdateRunningOverlay {
|
UpdateRunningOverlay {
|
||||||
visible: engine.systemController.updateRunning
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
UpdateRunningOverlay {
|
UpdateRunningOverlay {
|
||||||
visible: engine.systemController.updateRunning
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user