Browse Source

Some updates and nudging toward notification ui

web-push-permissions
Matthew Raymer 1 year ago
parent
commit
2d38183dce
  1. 1
      .gitignore
  2. 2191
      package-lock.json
  3. 45
      src/db/tables/settings.ts

1
.gitignore

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

2191
package-lock.json

File diff suppressed because it is too large

45
src/db/tables/settings.ts

@ -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;

Loading…
Cancel
Save