Some updates and nudging toward notification ui

This commit is contained in:
Matthew Raymer
2023-10-16 07:43:10 -04:00
parent 082a6eae1f
commit 2d38183dce
3 changed files with 1021 additions and 1228 deletions

1
.gitignore vendored
View File

@@ -4,6 +4,7 @@ node_modules
signature.bin signature.bin
*.pem *.pem
verified.txt verified.txt
myenv
*~ *~
# local env files # local env files

2203
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -1,31 +1,46 @@
/**
* BoundingBox type describes the geographical bounding box coordinates.
*/
export type BoundingBox = { export type BoundingBox = {
eastLong: number; eastLong: number; // Eastern longitude
maxLat: number; maxLat: number; // Maximum (Northernmost) latitude
minLat: number; minLat: number; // Minimum (Southernmost) latitude
westLong: number; westLong: number; // Western longitude
}; };
// Updated Settings type /**
* Settings type encompasses user-specific configuration details.
*/
export type Settings = { export type Settings = {
id: number; // there's only one entry: MASTER_SETTINGS_KEY id: number; // Only one entry using MASTER_SETTINGS_KEY
activeDid?: string; activeDid?: string; // Active Decentralized ID
apiServer?: string; apiServer?: string; // API server URL
firstName?: string; firstName?: string; // User's first name
lastName?: string; lastName?: string; // User's last name
lastViewedClaimId?: string; lastViewedClaimId?: string; // Last viewed claim ID
lastNotifiedClaimId?: string; // Last notified claim ID
// Array of named search boxes defined by bounding boxes
searchBoxes?: Array<{ searchBoxes?: Array<{
name: string; name: string;
bbox: BoundingBox; bbox: BoundingBox;
}>; }>;
showContactGivesInline?: boolean;
vapid?: string; // added VAPID field showContactGivesInline?: boolean; // Display contact inline or not
reminderTime?: number; // Time in milliseconds since the UNIX epoch vapid?: string; // VAPID (Voluntary Application Server Identification) field for web push
reminderOn?: boolean; // Whether the reminder is on or off reminderTime?: number; // Time in milliseconds since UNIX epoch for reminders
reminderOn?: boolean; // Toggle to enable or disable reminders
}; };
/**
* Schema for the Settings table in the database.
*/
export const SettingsSchema = { export const SettingsSchema = {
settings: "id", settings: "id",
}; };
/**
* Constants.
*/
export const MASTER_SETTINGS_KEY = 1; export const MASTER_SETTINGS_KEY = 1;