From 761a68070364031eeda7c45081d9c779d3e5b81d Mon Sep 17 00:00:00 2001 From: Joxit Date: Wed, 24 Mar 2021 00:02:07 +0100 Subject: [PATCH] feat(riot-v5): add notification via material-snackbar --- src/components/catalog/catalog.riot | 9 +++---- src/components/docker-registry-ui.riot | 20 +++++++++++++--- src/components/tag-history/tag-history.riot | 7 +++--- .../tag-list/copy-to-clipboard.riot | 7 ++++-- src/components/tag-list/image-date.riot | 2 +- src/components/tag-list/image-size.riot | 2 +- src/components/tag-list/image-tag.riot | 2 +- src/components/tag-list/pagination.riot | 2 +- src/components/tag-list/remove-image.riot | 24 ++++++++++--------- src/components/tag-list/tag-list.riot | 10 ++++---- src/components/tag-list/tag-table.riot | 11 +++++---- src/index.html | 2 +- src/index.js | 2 ++ src/scripts/docker-image.js | 17 ++++++------- src/scripts/utils.js | 9 +++++++ src/style.scss | 1 + 16 files changed, 80 insertions(+), 47 deletions(-) diff --git a/src/components/catalog/catalog.riot b/src/components/catalog/catalog.riot index 5257a1f..f039bf9 100644 --- a/src/components/catalog/catalog.riot +++ b/src/components/catalog/catalog.riot @@ -51,9 +51,6 @@ along with this program. If not, see . onMounted(props) { this.display(props, this.state) }, - onUpdated(props, state) { - - }, display(props, state) { this.state.repositories = []; @@ -82,13 +79,13 @@ along with this program. If not, see . return acc; }, []); } else if (this.status == 404) { - // registryUI.snackbar('Server not found', true); + self.props.onNotify('Server not found', true); } else { - // registryUI.snackbar(this.responseText); + self.props.onNotify(this.responseText); } }); oReq.addEventListener('error', function () { - // registryUI.snackbar(this.getErrorMessage(), true); + self.props.onNotify(this.getErrorMessage(), true); state.repositories = []; }); oReq.addEventListener('loadend', function () { diff --git a/src/components/docker-registry-ui.riot b/src/components/docker-registry-ui.riot index 32726c0..9110c4b 100644 --- a/src/components/docker-registry-ui.riot +++ b/src/components/docker-registry-ui.riot @@ -24,19 +24,20 @@ along with this program. If not, see . + catalog-elements-limit="{ state.catalogElementsLimit }" on-notify="{ notifySnackbar }" /> + is-image-remove-activated="{props.isImageRemoveActivated}" on-notify="{ notifySnackbar }"> + is-image-remove-activated="{props.isImageRemoveActivated}" on-notify="{ notifySnackbar }"> +