Browse Source

Some updates and nudging toward notification ui

web-push-permissions
Matthew Raymer 11 months 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
*.pem
verified.txt
myenv
*~
# 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 = {
eastLong: number;
maxLat: number;
minLat: number;
westLong: number;
eastLong: number; // Eastern longitude
maxLat: number; // Maximum (Northernmost) latitude
minLat: number; // Minimum (Southernmost) latitude
westLong: number; // Western longitude
};
// Updated Settings type
/**
* Settings type encompasses user-specific configuration details.
*/
export type Settings = {
id: number; // there's only one entry: MASTER_SETTINGS_KEY
id: number; // Only one entry using MASTER_SETTINGS_KEY
activeDid?: string;
apiServer?: string;
firstName?: string;
lastName?: string;
lastViewedClaimId?: string;
activeDid?: string; // Active Decentralized ID
apiServer?: string; // API server URL
firstName?: string; // User's first name
lastName?: string; // User's last name
lastViewedClaimId?: string; // Last viewed claim ID
lastNotifiedClaimId?: string; // Last notified claim ID
// Array of named search boxes defined by bounding boxes
searchBoxes?: Array<{
name: string;
bbox: BoundingBox;
}>;
showContactGivesInline?: boolean;
vapid?: string; // added VAPID field
reminderTime?: number; // Time in milliseconds since the UNIX epoch
reminderOn?: boolean; // Whether the reminder is on or off
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
};
/**
* Schema for the Settings table in the database.
*/
export const SettingsSchema = {
settings: "id",
};
/**
* Constants.
*/
export const MASTER_SETTINGS_KEY = 1;

Loading…
Cancel
Save