From 6aab1ff49dc2f053bb88a5d8455e50232e194567 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sat, 24 Feb 2024 10:26:12 -0700 Subject: [PATCH] consolidate interface and remove copies of code --- src/App.vue | 11 ++--------- src/components/GiftedDialog.vue | 11 +++-------- src/components/GiftedPrompts.vue | 11 ++--------- src/components/OfferDialog.vue | 11 +++-------- src/components/TopMessage.vue | 12 +++--------- src/views/AccountViewView.vue | 15 ++++++--------- src/views/ClaimView.vue | 10 ++-------- src/views/ContactAmountsView.vue | 20 +++++++------------- src/views/ContactGiftingView.vue | 19 +++++++------------ src/views/ContactQRScanShowView.vue | 10 ++-------- src/views/DiscoverView.vue | 20 +++++++------------- src/views/HelpNotificationsView.vue | 10 ++-------- src/views/HelpView.vue | 10 ++-------- src/views/HomeView.vue | 12 +++--------- src/views/IdentitySwitcherView.vue | 12 +++--------- src/views/ImportAccountView.vue | 17 ++++++----------- src/views/NewEditProjectView.vue | 10 ++-------- src/views/ProjectViewView.vue | 18 ++++++------------ src/views/ProjectsView.vue | 10 ++-------- src/views/SearchAreaView.vue | 12 +++--------- src/views/SeedBackupView.vue | 15 +++++---------- src/views/StatisticsView.vue | 11 +++-------- 22 files changed, 81 insertions(+), 206 deletions(-) diff --git a/src/App.vue b/src/App.vue index 2d8935f..0fee98a 100644 --- a/src/App.vue +++ b/src/App.vue @@ -288,21 +288,14 @@ interface VapidResponse { }; } -import { DEFAULT_PUSH_SERVER } from "@/constants/app"; +import { DEFAULT_PUSH_SERVER, NotificationIface } from "@/constants/app"; import { db } from "@/db/index"; import { MASTER_SETTINGS_KEY } from "@/db/tables/settings"; import { sendTestThroughPushServer } from "@/libs/util"; -interface Notification { - group: string; - type: string; - title: string; - text: string; -} - @Component export default class App extends Vue { - $notify!: (notification: Notification, timeout?: number) => void; + $notify!: (notification: NotificationIface, timeout?: number) => void; b64 = ""; serviceWorkerReady = false; diff --git a/src/components/GiftedDialog.vue b/src/components/GiftedDialog.vue index 3edb081..5353f9e 100644 --- a/src/components/GiftedDialog.vue +++ b/src/components/GiftedDialog.vue @@ -67,6 +67,8 @@