diff --git a/package-lock.json b/package-lock.json index 37d98b6c8..3dc2d1c32 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8705,6 +8705,11 @@ "resolved": "https://registry.npmjs.org/dns-equal/-/dns-equal-1.0.0.tgz", "integrity": "sha1-s55/HabrCnW6nBcySzR1PEfgZU0=" }, + "detect-browser": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/detect-browser/-/detect-browser-5.2.0.tgz", + "integrity": "sha512-tr7XntDAu50BVENgQfajMLzacmSe34D+qZc4zjnniz0ZVuw/TZcLcyxHQjYpJTM36sGEkZZlYLnIM1hH7alTMA==" + }, "dns-packet": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/dns-packet/-/dns-packet-1.3.4.tgz", @@ -19359,6 +19364,21 @@ } } }, + "serialize-error": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/serialize-error/-/serialize-error-8.1.0.tgz", + "integrity": "sha512-3NnuWfM6vBYoy5gZFvHiYsVbafvI9vZv/+jlIigFn4oP4zjNPK3LhcY0xSCgeb1a5L8jO71Mit9LlNoi2UfDDQ==", + "requires": { + "type-fest": "^0.20.2" + }, + "dependencies": { + "type-fest": { + "version": "0.20.2", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz", + "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==" + } + } + }, "serialize-javascript": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", diff --git a/package.json b/package.json index fcd92f8b5..c21f26839 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "connect": "^3.7.0", "core-js": "^3.15.1", "date-fns": "^2.22.1", + "detect-browser": "^5.2.0", "fontsource-ibm-plex-sans": "^3.1.5", "i18n": "^0.13.3", "is-fqdn": "^2.0.1", @@ -48,6 +49,7 @@ "lru-cache": "^6.0.0", "node-fetch": "^2.6.1", "normalize.css": "^8.0.1", + "serialize-error": "^8.1.0", "serve-static": "^1.14.1", "sophia-bonding-curve": "github:aeternity/BondingCurve#1.0.0-alpha.2", "soundcloud-widget": "^0.2.1", diff --git a/src/App.vue b/src/App.vue index 52606a6a2..0790936a3 100644 --- a/src/App.vue +++ b/src/App.vue @@ -101,7 +101,11 @@ export default { console.log('found wallet'); this.useSdkWallet(); this.setAddress(address); - this.$store.dispatch('updateCookiesConsent'); + try { + await this.$store.dispatch('updateCookiesConsent'); + } catch (error) { + if (error.message !== 'Operation rejected by user') throw error; + } } else { this.setAddress(address); } diff --git a/src/assets/iconCodeError.svg b/src/assets/iconCodeError.svg new file mode 100644 index 000000000..45dc8f973 --- /dev/null +++ b/src/assets/iconCodeError.svg @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + diff --git a/src/assets/iconThumbUp.svg b/src/assets/iconThumbUp.svg new file mode 100644 index 000000000..d636e2a6f --- /dev/null +++ b/src/assets/iconThumbUp.svg @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + diff --git a/src/components/AeButton.vue b/src/components/AeButton.vue index c77b21665..fdde5dd14 100644 --- a/src/components/AeButton.vue +++ b/src/components/AeButton.vue @@ -49,6 +49,7 @@ export default { transition: background-color 0.3s; text-align: center; font-size: 16px; + cursor: pointer; &[disabled] { opacity: 0.4; diff --git a/src/components/AlertModal.vue b/src/components/AlertModal.vue index 8dc284422..7538ee7f4 100644 --- a/src/components/AlertModal.vue +++ b/src/components/AlertModal.vue @@ -1,108 +1,54 @@ diff --git a/src/components/CookiesDialog.vue b/src/components/CookiesDialog.vue index 46816fd4b..7fef77ae6 100644 --- a/src/components/CookiesDialog.vue +++ b/src/components/CookiesDialog.vue @@ -71,8 +71,12 @@ export default { }, methods: { async allowHandler() { - await this.$store.dispatch('backend/setCookies', { scope: this.scope, status: true }); - this.resolve(); + try { + await this.$store.dispatch('backend/setCookies', { scope: this.scope, status: true }); + this.resolve(); + } catch (error) { + if (error.message !== 'Operation rejected by user') throw error; + } }, }, }; diff --git a/src/components/Dialog.vue b/src/components/Dialog.vue new file mode 100644 index 000000000..266262b0b --- /dev/null +++ b/src/components/Dialog.vue @@ -0,0 +1,117 @@ + + + + + diff --git a/src/components/ErrorReportModal.vue b/src/components/ErrorReportModal.vue new file mode 100644 index 000000000..08248b4b4 --- /dev/null +++ b/src/components/ErrorReportModal.vue @@ -0,0 +1,139 @@ +