diff --git a/src/components/TopMessage.vue b/src/components/TopMessage.vue new file mode 100644 index 00000000..6c5c6921 --- /dev/null +++ b/src/components/TopMessage.vue @@ -0,0 +1,58 @@ + + + diff --git a/src/constants/app.ts b/src/constants/app.ts index f4be3647..2e2cffc7 100644 --- a/src/constants/app.ts +++ b/src/constants/app.ts @@ -6,12 +6,15 @@ export enum AppString { APP_NAME = "Time Safari", + PROD_TIME_SAFARI_SERVER = "https://timesafari.app", + PROD_ENDORSER_API_SERVER = "https://api.endorser.ch", TEST_ENDORSER_API_SERVER = "https://test-api.endorser.ch", LOCAL_ENDORSER_API_SERVER = "http://localhost:3000", DEFAULT_ENDORSER_API_SERVER = TEST_ENDORSER_API_SERVER, + // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values PROD_PUSH_SERVER = "https://timesafari.app", TEST1_PUSH_SERVER = "https://test.timesafari.app", TEST2_PUSH_SERVER = "https://timesafari-pwa.anomalistlabs.com", diff --git a/src/db/index.ts b/src/db/index.ts index 16c99d8f..37d6cf51 100644 --- a/src/db/index.ts +++ b/src/db/index.ts @@ -45,8 +45,5 @@ db.on("populate", () => { db.settings.add({ id: MASTER_SETTINGS_KEY, apiServer: AppString.DEFAULT_ENDORSER_API_SERVER, - - // remember that things you add from now on aren't automatically in the DB for old users - webPushServer: AppString.DEFAULT_PUSH_SERVER, }); }); diff --git a/src/db/tables/settings.ts b/src/db/tables/settings.ts index 135dc8d8..4b3ad1e5 100644 --- a/src/db/tables/settings.ts +++ b/src/db/tables/settings.ts @@ -12,15 +12,17 @@ export type BoundingBox = { * Settings type encompasses user-specific configuration details. */ export type Settings = { - id: number; // Only one entry using MASTER_SETTINGS_KEY + id: number; // Only one entry, keyed with MASTER_SETTINGS_KEY + activeDid?: string; // Active Decentralized ID apiServer?: string; // API server URL firstName?: string; // User's first name + isRegistered?: boolean; lastName?: string; // deprecated - put all names in firstName - lastViewedClaimId?: string; // Last viewed claim ID lastNotifiedClaimId?: string; // Last notified claim ID - isRegistered?: boolean; - webPushServer?: string; // Web Push server URL + lastViewedClaimId?: string; // Last viewed claim ID + reminderTime?: number; // Time in milliseconds since UNIX epoch for reminders + reminderOn?: boolean; // Toggle to enable or disable reminders // Array of named search boxes defined by bounding boxes searchBoxes?: Array<{ @@ -30,8 +32,9 @@ export type Settings = { showContactGivesInline?: boolean; // Display contact inline or not vapid?: string; // VAPID (Voluntary Application Server Identification) field for web push - reminderTime?: number; // Time in milliseconds since UNIX epoch for reminders - reminderOn?: boolean; // Toggle to enable or disable reminders + warnIfProdServer?: boolean; // Warn if using a production server + warnIfTestServer?: boolean; // Warn if using a testing server + webPushServer?: string; // Web Push server URL }; /** diff --git a/src/views/AccountViewView.vue b/src/views/AccountViewView.vue index 7e6ba965..1dad814b 100644 --- a/src/views/AccountViewView.vue +++ b/src/views/AccountViewView.vue @@ -1,5 +1,7 @@