From 70d8614267876452ee0a154d6d84f922b86962ac Mon Sep 17 00:00:00 2001 From: Martin Weise <martin.weise@tuwien.ac.at> Date: Sat, 15 Jun 2024 09:44:51 +0200 Subject: [PATCH] added more error messages --- dbrepo-ui/components/identifier/Citation.vue | 5 ++++- dbrepo-ui/locales/en-US.json | 7 +++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/dbrepo-ui/components/identifier/Citation.vue b/dbrepo-ui/components/identifier/Citation.vue index ca5d2da00f..8cd96902d4 100644 --- a/dbrepo-ui/components/identifier/Citation.vue +++ b/dbrepo-ui/components/identifier/Citation.vue @@ -63,8 +63,11 @@ export default { identifierService.findOne(this.identifier.id, accept) .then((citation) => { this.citation = citation + this.loading = false }) - .finally(() => { + .error(({code, message}) => { + const toast = useToastInstance() + toast.error(this.$t(`${code}: ${message}`)) this.loading = false }) } diff --git a/dbrepo-ui/locales/en-US.json b/dbrepo-ui/locales/en-US.json index a14d729283..a345e0bec5 100644 --- a/dbrepo-ui/locales/en-US.json +++ b/dbrepo-ui/locales/en-US.json @@ -35,6 +35,9 @@ "pages": { "identifier": { "title": "Identifier", + "export": { + "text": "Metadata Export" + }, "pid": { "title": "Persistent Identifier" }, @@ -1209,10 +1212,6 @@ "created": "Successfully created table", "semantics": "Successfully assigned semantic instance" }, - "schema": { - "tables": "Successfully refreshed database tables metadata", - "views": "Successfully refreshed database views metadata" - }, "schema": { "tables": "Successfully refreshed database tables metadata.", "views": "Successfully refreshed database views metadata." -- GitLab