Skip to content

Commit

Permalink
Show EOL warning in the update section
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <coding@schilljs.com>
  • Loading branch information
nickvergessen committed Mar 14, 2018
1 parent af89db3 commit 37573c0
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 0 deletions.
4 changes: 4 additions & 0 deletions apps/updatenotification/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,7 @@
#updatenotification .icon-triangle-n {
opacity: 0.5;
}

#updatenotification .warning {
color: #ce3702;
}
1 change: 1 addition & 0 deletions apps/updatenotification/js-src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ define(function (require) {
this.vm.channels = data.channels;
this.vm.notifyGroups = data.notifyGroups;
this.vm.isDefaultUpdateServerURL = data.isDefaultUpdateServerURL;
this.vm.versionIsEol = data.versionIsEol;
}
};
});
9 changes: 9 additions & 0 deletions apps/updatenotification/js-src/components/root.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,20 @@
<div id="updatenotification" class="followupsection">
<div class="update">
<template v-if="isNewVersionAvailable">
<p v-if="versionIsEol">
<span class="warning">
<span class="icon icon-error"></span>
{{ t('updatenotification', 'The version you are running is not maintained anymore. Please make sure to update to a supported version as soon as possible.') }}
</span>
</p>

<p>
<span v-html="newVersionAvailableString"></span><br>
<span v-if="!isListFetched" class="icon icon-loading-small"></span>
<span v-html="statusText"></span>
</p>


<template v-if="missingAppUpdates.length">
<h3 @click="toggleHideMissingUpdates">
{{ t('updatenotification', 'Apps missing updates') }}
Expand Down Expand Up @@ -77,6 +85,7 @@
lastCheckedDate: '',
isUpdateChecked: false,
updaterEnabled: true,
versionIsEol: false,
downloadLink: '',
isNewVersionAvailable: false,
updateServerURL: '',
Expand Down
1 change: 1 addition & 0 deletions apps/updatenotification/lib/Settings/Admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ public function getForm(): TemplateResponse {
'newVersionString' => empty($updateState['updateVersion']) ? '' : $updateState['updateVersion'],
'downloadLink' => empty($updateState['downloadLink']) ? '' : $updateState['downloadLink'],
'updaterEnabled' => empty($updateState['updaterEnabled']) ? false : $updateState['updaterEnabled'],
'versionIsEol' => empty($updateState['versionIsEol']) ? false : $updateState['versionIsEol'],
'isDefaultUpdateServerURL' => $updateServerURL === $defaultUpdateServerURL,
'updateServerURL' => $updateServerURL,
'notifyGroups' => $this->getSelectedGroups($notifyGroups),
Expand Down
1 change: 1 addition & 0 deletions apps/updatenotification/lib/UpdateChecker.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ public function getUpdateState(): array {
$result['updateAvailable'] = true;
$result['updateVersion'] = $data['versionstring'];
$result['updaterEnabled'] = $data['autoupdater'] === '1';
$result['versionIsEol'] = $data['eol'] === '1';
if (strpos($data['web'], 'https://') === 0) {
$result['updateLink'] = $data['web'];
}
Expand Down

0 comments on commit 37573c0

Please sign in to comment.