chore(version-notification): update latest version management

This commit is contained in:
Joxit 2023-07-17 18:16:42 +02:00
parent 42bcec50df
commit c74a9aeaa3
No known key found for this signature in database
GPG Key ID: F526592B8E012263
2 changed files with 4 additions and 3 deletions

View File

@ -30,7 +30,7 @@ const getVersion = (version) => {
return version;
};
fs.writeFileSync('.version.json', JSON.stringify({ version: getVersion(version) }));
fs.writeFileSync('.version.json', JSON.stringify({ version: getVersion(version), latest: version }));
const plugins = [
riot(),

View File

@ -19,7 +19,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
<material-navbar>
<span class="logo">
<span>Docker Registry UI</span>
<version-notification version="{ version }" on-notify="{ notifySnackbar }"></version-notification>
<version-notification version="{ latest }" on-notify="{ notifySnackbar }"></version-notification>
</span>
<div class="menu">
<search-bar on-search="{ onSearch }"></search-bar>
@ -137,7 +137,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
</material-footer>
</footer>
<script>
import { version } from '../../.version.json';
import { version, latest } from '../../.version.json';
import { Router, Route } from '@riotjs/route';
import Catalog from './catalog/catalog.riot';
import TagList from './tag-list/tag-list.riot';
@ -260,6 +260,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
baseRoute: '([^#]*?)/(\\?[^#]*?)?(#!)?(/?)',
router,
version,
latest,
truthy,
stringToArray,
};