From 5633113f256b5e9d70c6b32e7e61faf245616369 Mon Sep 17 00:00:00 2001 From: advplyr Date: Sat, 23 Dec 2023 16:39:56 -0600 Subject: [PATCH] Update share buttons to not show an error on abort --- client/components/stats/YearInReview.vue | 10 +++++--- .../components/stats/YearInReviewBanner.vue | 17 +++++++++---- .../components/stats/YearInReviewServer.vue | 10 +++++--- client/components/stats/YearInReviewShort.vue | 25 +++++++++++++++++++ 4 files changed, 49 insertions(+), 13 deletions(-) diff --git a/client/components/stats/YearInReview.vue b/client/components/stats/YearInReview.vue index 3fef3a8c77..a6bed203ac 100644 --- a/client/components/stats/YearInReview.vue +++ b/client/components/stats/YearInReview.vue @@ -40,10 +40,10 @@ export default { const createRoundedRect = (x, y, w, h) => { const grd1 = ctx.createLinearGradient(x, y, x + w, y + h) - grd1.addColorStop(0, '#44444466') - grd1.addColorStop(1, '#ffffff22') + grd1.addColorStop(0, '#44444455') + grd1.addColorStop(1, '#ffffff11') ctx.fillStyle = grd1 - ctx.strokeStyle = '#C0C0C0aa' + ctx.strokeStyle = '#C0C0C088' ctx.beginPath() ctx.roundRect(x, y, w, h, [20]) ctx.fill() @@ -258,7 +258,9 @@ export default { }) .catch((error) => { console.error('Failed to share', error) - this.$toast.error('Failed to share: ' + error.message) + if (error.name !== 'AbortError') { + this.$toast.error('Failed to share: ' + error.message) + } }) } else { this.$toast.error('Cannot share natively on this device') diff --git a/client/components/stats/YearInReviewBanner.vue b/client/components/stats/YearInReviewBanner.vue index 9a0a0bbfe0..f773607879 100644 --- a/client/components/stats/YearInReviewBanner.vue +++ b/client/components/stats/YearInReviewBanner.vue @@ -1,5 +1,5 @@