Commit Graph

46 Commits

Author SHA1 Message Date
Matthew Raymer
966dbc5164 Fix TypeScript any types and remove deprecated Dexie code
- Replace Record<string, any> with Record<string, string> for query params
- Fix error handling from catch(err: any) to catch(err: unknown)
- Add EntityData interface for proper entity typing
- Update EntitySelectionEvent interface with union types
- Remove USE_DEXIE_DB conditionals and unused import
- Clean up database service calls removing Dexie fallbacks

Resolves 9 TypeScript any type warnings, improves type safety across
entity selection components, and removes deprecated database migration code.
2025-07-04 08:06:08 +00:00
Matthew Raymer
ab784dca76 Fix CORS restrictions and development server configuration
Remove CORS headers to enable universal image support and fix local API server settings.

## Changes

**Remove CORS Headers**
- Remove Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy headers
- Enables images from any domain (Facebook, Medium, arbitrary websites)
- Database falls back to IndexedDB mode (minimal performance impact)

**Fix Local Development Configuration**
- Set LOCAL_ENDORSER_API_SERVER to http://127.0.0.1:3000 (was "/api")
- Create .env.development with local API server config
- Fix ensureCorrectApiServer() method in HomeView.vue
- "Use Local" button now sets proper localhost address

**Fix Settings Cache Issues**
- Add PlatformServiceMixin to AccountViewView.vue
- Disable settings caching to prevent stale data
- Settings changes now apply immediately without browser refresh

## Impact

**Tradeoffs:**
- Lost: ~2x SharedArrayBuffer database performance
- Gained: Universal image support from any domain
- Result: Better user experience, database still fast via IndexedDB

**Files Modified:**
- Configuration: vite.config.*.mts, index.html, .env.development
- Source: constants/app.ts, libs/util.ts, views/*.vue, utils/PlatformServiceMixin.ts

## Rationale

For a community platform, universal image support is more critical than marginal
database performance gains. Users share images from arbitrary websites, making
CORS restrictions incompatible with Time Safari's core mission.
2025-07-04 06:25:25 +00:00
Matthew Raymer
7d5e81263c # Commit Message for SharedArrayBuffer Platform Exclusion
fix: eliminate SharedArrayBuffer checks on non-web platforms

* Add platform guard in AbsurdSqlDatabaseService to only initialize on web
* Change singleton pattern from eager to lazy instantiation
* Update worker import to use lazy singleton pattern
* Prevents absurd-sql initialization on Electron/Capacitor platforms
* Reduces console noise and memory footprint on desktop/mobile
* Maintains full web platform functionality and performance

Resolves SharedArrayBuffer-related console output on Electron platform
while preserving all web features and maintaining clean architecture.
2025-07-03 05:15:57 +00:00
Matthew Raymer
0343b4cd0e Fix image CORS violations with comprehensive proxy and component updates
- Applied transformImageUrlForCors to all image-displaying components
- Added followRedirects: true to image proxy to serve actual content
- Proxy now returns 200 OK with image data instead of 301 redirects
- Maintains CORS headers required for SharedArrayBuffer support
- Added debug logging for proxy response monitoring

Resolves all image loading failures in development environment.
2025-07-03 04:15:26 +00:00
Matthew Raymer
daed0a97c9 WIP: restore database migration system and improve error handling
- Restore runMigrations functionality for database schema migrations
- Remove indexedDBMigrationService.ts (was for IndexedDB to SQLite migration)
- Recreate migrationService.ts and db-sql/migration.ts for schema management
- Add proper TypeScript error handling with type guards in AccountViewView
- Fix CreateAndSubmitClaimResult property access in QuickActionBvcBeginView
- Remove LeafletMouseEvent from Vue components array (it's a type, not component)
- Add null check for UserNameDialog callback to prevent undefined assignment
- Implement extractErrorMessage helper function for consistent error handling
- Update router to remove database-migration route

The migration system now properly handles database schema evolution
across app versions, while the IndexedDB to SQLite migration service
has been removed as it was specific to that one-time migration.
2025-06-23 08:25:10 +00:00
8f5c34bc5f fix linting 2025-06-09 09:09:54 -06:00
7de4125eb7 add SQL DB access to everywhere we are using the DB, up to the "C" files 2025-05-27 01:27:04 -06:00
0bfc18c385 add encryption & decryption for the sensitive identity & mnemonic in SQL DB 2025-05-26 22:42:20 -06:00
11f2527b04 start adding the SQL approach to files, also using the Dexie approach if desired 2025-05-26 20:26:28 -06:00
5d8175aeeb add encryption for the two SQL columns, replace basic DB utils, add USE_DEXIE_DB flag, and start adding SQL everywhere 2025-05-26 19:03:20 -06:00
b8fbc3f7a6 fix console error about "window" unavailable due to service worker 2025-05-26 15:49:44 -06:00
7777fa202b finish separation of daily reminder message, bump version to 0.3.34 2024-11-24 13:09:40 -07:00
8735fe44db change the notification detection to our own variables, and save the selected time 2024-11-20 19:55:51 -07:00
149481d468 finish the loading of an invite RegisterAction when clicking on a link 2024-10-06 20:01:07 -06:00
d492ea9eeb send all info needed to create a Trustroots event 2024-09-25 09:01:49 -06:00
f2cb7d3ed8 prompt for name when showing info, and provide a "copy" page when remote 2024-08-23 20:06:50 -06:00
f6338c05ee move low-level DID-related create & decode into separate folder (#120)
Co-authored-by: Trent Larson <trent@trentlarson.com>
Reviewed-on: trent_larson/crowd-funder-for-time-pwa#120
Co-authored-by: trentlarson <trent@trentlarson.com>
Co-committed-by: trentlarson <trent@trentlarson.com>
2024-07-13 13:24:54 -04:00
6b65e31649 misc tweaks and linting clean-up 2024-07-06 13:04:15 -06:00
7f02ba29a3 add a share_target for people to add a photo 2024-05-10 13:17:20 -06:00
ddd32e7f44 show something to indicate claims were sent (mostly in BVC screens) 2024-04-28 18:36:06 -06:00
c48b8246f9 add registration inside contact import, with flag to hide it 2024-04-28 16:18:30 -06:00
eeaacaf202 replace many of the javascript "confirm" calls with the nicer UX version 2024-04-24 19:52:33 -06:00
ef5f81932d Initial stab at vitejs update 2024-03-24 11:18:29 -06:00
c58f012d2c allow viewing and deletion of an image 2024-03-08 23:56:19 -07:00
f1bb1b51aa Merge branch 'master' into photo-upload 2024-03-05 20:25:41 -07:00
92b924643e fix camera resolution, parameterize image API server 2024-03-05 20:20:54 -07:00
ca90447700 fix different "environment" variables for prod & dev 2024-03-02 16:15:03 -07:00
b38ebc45e1 add a prompt for things for which to express gratitude 2024-01-31 21:15:40 -07:00
05c6ddda02 allow a test notification from the notification help screen 2023-12-24 21:24:51 -07:00
d0697c1ef4 fix top warnings when on prod or non-prod servers 2023-12-18 16:06:55 -07:00
5534f8fa50 fix logic for prod & test host detection 2023-12-17 20:17:45 -07:00
4f2cb55753 add warning if on unexpected server 2023-12-16 08:04:16 -07:00
681d949098 update web push servers to the domains we're using 2023-12-02 15:35:44 -07:00
65a5edf26b allow to customize the push-server for testing 2023-11-12 11:35:36 -07:00
Matthew Aaron Raymer
7f0f1b7fc8 Merging changes 2023-11-08 14:47:48 +08:00
Matthew Raymer
f27a18c712 Fix db path; add new pathing for web-push; load VAPID at boot 2023-09-11 07:51:59 -04:00
94d9c425ad add QR scanner for adding a contact 2023-09-07 18:59:19 -06:00
552fce3281 update the test URL (to remove the port) 2023-08-27 13:12:12 -06:00
bf6830a1a8 update URL for API server 2023-08-05 18:20:03 -06:00
fc7c1187e8 allow to switch the server 2023-05-19 13:28:52 -06:00
f281e41181 add details on contact-specific page 2023-03-25 19:03:25 -06:00
1bedbe17c0 feat: adjust to the new endpoints for editable plan records 2023-01-23 22:14:46 -07:00
Matthew Aaron Raymer
f858a4d29a Linted 2023-01-04 17:09:11 +08:00
Matthew Aaron Raymer
f021fcdb1c New Project 2023-01-04 17:05:08 +08:00
Matthew Aaron Raymer
6325bcbe35 Work in progress 2023-01-03 17:28:23 +08:00
Matthew Aaron Raymer
c239906a96 New structure 2022-12-14 17:06:16 +08:00