From 14e28694e00ab3892087e10658678a388c359b80 Mon Sep 17 00:00:00 2001 From: "Phyks (Lucas Verney)" Date: Wed, 7 Nov 2018 23:18:45 +0100 Subject: [PATCH] Use dismissible alerts instead of dialogs to notify about errors --- src/App.vue | 9 ++-- src/components/Alert.vue | 78 +++++++++++++++++++++++++++ src/components/LocationError.vue | 43 --------------- src/components/ReportDialog/index.vue | 9 ++-- src/components/ReportErrorModal.vue | 42 --------------- src/views/Map.vue | 12 ++--- src/vuetify.js | 2 + 7 files changed, 98 insertions(+), 97 deletions(-) create mode 100644 src/components/Alert.vue delete mode 100644 src/components/LocationError.vue delete mode 100644 src/components/ReportErrorModal.vue diff --git a/src/App.vue b/src/App.vue index d2e8393..2002378 100644 --- a/src/App.vue +++ b/src/App.vue @@ -57,7 +57,7 @@ - + @@ -71,14 +71,14 @@ import runtime from 'serviceworker-webpack-plugin/lib/runtime'; import { DELAY_BETWEEN_API_BATCH_REQUESTS } from '@/constants'; -import ReportErrorModal from '@/components/ReportErrorModal.vue'; +import Alert from '@/components/Alert.vue'; import ReportIssueModal from '@/components/ReportIssueModal.vue'; import SearchModal from '@/components/SearchModal.vue'; import ShareMapViewModal from '@/components/ShareMapViewModal.vue'; export default { components: { - ReportErrorModal, + Alert, ReportIssueModal, SearchModal, ShareMapViewModal, @@ -111,6 +111,9 @@ export default { }; }, methods: { + dismissError() { + this.hasReportError = false; + }, exportGPX() { import('@/tools/exportGPX' /* webpackChunkName: "MapView" */).then((module) => { const activityName = this.$t('misc.activityName'); diff --git a/src/components/Alert.vue b/src/components/Alert.vue new file mode 100644 index 0000000..553501c --- /dev/null +++ b/src/components/Alert.vue @@ -0,0 +1,78 @@ + + + + + diff --git a/src/components/LocationError.vue b/src/components/LocationError.vue deleted file mode 100644 index 78c89d9..0000000 --- a/src/components/LocationError.vue +++ /dev/null @@ -1,43 +0,0 @@ - - - diff --git a/src/components/ReportDialog/index.vue b/src/components/ReportDialog/index.vue index 237f225..51f5dd7 100644 --- a/src/components/ReportDialog/index.vue +++ b/src/components/ReportDialog/index.vue @@ -1,6 +1,6 @@ @@ -47,7 +44,7 @@