forked from jsnbuchanan/crowd-funder-for-time-pwa
convert all remaining DB writes & reads to SQL (with successful registration & claim)
This commit is contained in:
@@ -308,13 +308,15 @@
|
||||
import { Component, Vue } from "vue-facing-decorator";
|
||||
|
||||
import QuickNav from "../components/QuickNav.vue";
|
||||
import { NotificationIface } from "../constants/app";
|
||||
import { NotificationIface, USE_DEXIE_DB } from "../constants/app";
|
||||
import { DIRECT_PUSH_TITLE, sendTestThroughPushServer } from "../libs/util";
|
||||
import PushNotificationPermission from "../components/PushNotificationPermission.vue";
|
||||
import { db } from "../db/index";
|
||||
import { MASTER_SETTINGS_KEY } from "../db/tables/settings";
|
||||
import * as databaseUtil from "../db/databaseUtil";
|
||||
import { Router } from "vue-router";
|
||||
import { logger } from "../utils/logger";
|
||||
|
||||
@Component({ components: { PushNotificationPermission, QuickNav } })
|
||||
export default class HelpNotificationsView extends Vue {
|
||||
$notify!: (notification: NotificationIface, timeout?: number) => void;
|
||||
@@ -420,10 +422,16 @@ export default class HelpNotificationsView extends Vue {
|
||||
DIRECT_PUSH_TITLE,
|
||||
async (success: boolean, timeText: string, message?: string) => {
|
||||
if (success) {
|
||||
await db.settings.update(MASTER_SETTINGS_KEY, {
|
||||
databaseUtil.updateDefaultSettings({
|
||||
notifyingReminderMessage: message,
|
||||
notifyingReminderTime: timeText,
|
||||
});
|
||||
if (USE_DEXIE_DB) {
|
||||
await db.settings.update(MASTER_SETTINGS_KEY, {
|
||||
notifyingReminderMessage: message,
|
||||
notifyingReminderTime: timeText,
|
||||
});
|
||||
}
|
||||
this.notifyingReminder = true;
|
||||
this.notifyingReminderMessage = message || "";
|
||||
this.notifyingReminderTime = timeText;
|
||||
|
||||
Reference in New Issue
Block a user