From 54a954f8c32258dbd702aa129b598473aa7648ea Mon Sep 17 00:00:00 2001 From: Joxit Date: Sat, 3 Dec 2022 15:07:58 +0100 Subject: [PATCH] feat(riot-mui): upgrade tag-list components (table, list, remove image and tag history button) --- .../tag-list/copy-to-clipboard.riot | 6 +++-- src/components/tag-list/remove-image.riot | 6 +++-- .../tag-list/tag-history-button.riot | 10 +++++---- src/components/tag-list/tag-list.riot | 9 +++++++- src/components/tag-list/tag-table.riot | 22 ++++++++++--------- src/scripts/router.js | 4 ++-- 6 files changed, 36 insertions(+), 21 deletions(-) diff --git a/src/components/tag-list/copy-to-clipboard.riot b/src/components/tag-list/copy-to-clipboard.riot index 75ac13a..7bc0daa 100644 --- a/src/components/tag-list/copy-to-clipboard.riot +++ b/src/components/tag-list/copy-to-clipboard.riot @@ -18,11 +18,13 @@
content_copy diff --git a/src/components/tag-list/remove-image.riot b/src/components/tag-list/remove-image.riot index f518ab5..8eefc65 100644 --- a/src/components/tag-list/remove-image.riot +++ b/src/components/tag-list/remove-image.riot @@ -16,13 +16,15 @@ along with this program. If not, see . --> delete diff --git a/src/components/tag-list/tag-history-button.riot b/src/components/tag-list/tag-history-button.riot index 8595f18..8a6692d 100644 --- a/src/components/tag-list/tag-history-button.riot +++ b/src/components/tag-list/tag-history-button.riot @@ -17,11 +17,13 @@ along with this program. If not, see . history @@ -40,7 +42,7 @@ along with this program. If not, see . }, routeToHistory() { if (!this.props.image.ociImage) { - router.history(this.props.image.name, this.props.image.tag); + return router.history(this.props.image.name, this.props.image.tag); } }, }; diff --git a/src/components/tag-list/tag-list.riot b/src/components/tag-list/tag-list.riot index 65ddf18..7c8c1c7 100644 --- a/src/components/tag-list/tag-list.riot +++ b/src/components/tag-list/tag-list.riot @@ -17,7 +17,14 @@ along with this program. If not, see .
- + arrow_back

diff --git a/src/components/tag-list/tag-table.riot b/src/components/tag-list/tag-table.riot index 795d3b9..3fa6e22 100644 --- a/src/components/tag-list/tag-table.riot +++ b/src/components/tag-list/tag-table.riot @@ -63,12 +63,14 @@ along with this program. If not, see . > delete @@ -78,31 +80,31 @@ along with this program. If not, see . - + - + - + + > - + + > - + . checked="{ state.toDelete.has(image) }" on-notify="{ props.onNotify }" on-authentication="{ props.onAuthentication }" - /> + > diff --git a/src/scripts/router.js b/src/scripts/router.js index e8fc42e..99534ee 100644 --- a/src/scripts/router.js +++ b/src/scripts/router.js @@ -59,7 +59,7 @@ function baseUrl(qs) { export default { home() { - router.push(baseUrl({ page: null })); + return baseUrl({ page: null }); }, taglist(image) { router.push(`${baseUrl({ page: null })}#!/taglist/${image}`); @@ -68,7 +68,7 @@ export default { return getCurrentRoute().replace(/^.*(#!)?\/?taglist\//, ''); }, history(image, tag) { - router.push(`${baseUrl({ page: null })}#!/taghistory/image/${image}/tag/${tag}`); + return `${baseUrl({ page: null })}#!/taghistory/image/${image}/tag/${tag}`; }, getTagHistoryImage() { return getCurrentRoute().replace(/^.*(#!)?\/?taghistory\/image\/(.*)\/tag\/(.*)\/?$/, '$2');