From 2171846f50fa44eb395c4dd25419adbcd229ace3 Mon Sep 17 00:00:00 2001 From: Trent Larson Date: Sun, 24 Nov 2024 13:09:40 -0700 Subject: [PATCH] finish separation of daily reminder message, bump version to 0.3.34 --- CHANGELOG.md | 6 + package-lock.json | 4 +- package.json | 2 +- .../img/icons/safari-pinned-tab-512x512.svg | 86 ++++++++ src/App.vue | 83 ++++---- src/components/PushNotificationPermission.vue | 148 +++++++++----- src/constants/app.ts | 4 +- src/db/tables/settings.ts | 5 +- src/libs/util.ts | 13 +- src/views/AccountViewView.vue | 193 ++++++++++++++++-- src/views/ConfirmGiftView.vue | 4 +- src/views/HelpNotificationsView.vue | 9 + src/views/NewEditProjectView.vue | 9 +- sw_scripts/additional-scripts.js | 2 +- test-playwright/LICENSE | 8 + 15 files changed, 448 insertions(+), 128 deletions(-) create mode 100644 public/img/icons/safari-pinned-tab-512x512.svg create mode 100644 test-playwright/LICENSE diff --git a/CHANGELOG.md b/CHANGELOG.md index 98ed8028..7647926a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [0.3.34] - 2024.11 +### Added +- Daily reliable, hard-coded notification message +- Setting to change the partner API server + + ## [0.3.33] - 2024.11.07 - adb7b16ecf1343c39cba71a7d6bb0e7a973e1102 ### Fixed - Affirm Delivery button on offer claim page didn't work. diff --git a/package-lock.json b/package-lock.json index 45feedb0..f58eb5c1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "TimeSafari", - "version": "0.3.34-beta", + "version": "0.3.34", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "TimeSafari", - "version": "0.3.34-beta", + "version": "0.3.34", "dependencies": { "@capacitor/android": "^6.1.2", "@capacitor/cli": "^6.1.2", diff --git a/package.json b/package.json index 37ef5a9e..3188e940 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "TimeSafari", - "version": "0.3.34-beta", + "version": "0.3.34", "scripts": { "dev": "vite", "serve": "vite preview", diff --git a/public/img/icons/safari-pinned-tab-512x512.svg b/public/img/icons/safari-pinned-tab-512x512.svg new file mode 100644 index 00000000..90688cfb --- /dev/null +++ b/public/img/icons/safari-pinned-tab-512x512.svg @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/App.vue b/src/App.vue index 3170d8eb..7b0c4510 100644 --- a/src/App.vue +++ b/src/App.vue @@ -238,6 +238,7 @@ +
+

- Would you like to turn off notifications for this app? + Would you like to turn off this notification?

+ + + +
+ + When that setting is blank, this app will use the default partner server + URL: + {{ DEFAULT_PARTNER_API_SERVER }} + +
Image Server URL   {{ DEFAULT_IMAGE_API_SERVER }}
-
- Partner Server URL -   - {{ DEFAULT_PARTNER_API_SERVER }} -
-
@@ -581,7 +583,12 @@ export default class NewEditProjectView extends Vue { ); const nostrPubKey = pubPri?.publicKey; - const trustrootsUrl = DEFAULT_PARTNER_API_SERVER + "/api/partner/link"; + let partnerServer = DEFAULT_PARTNER_API_SERVER; + const settings = await retrieveSettingsForActiveAccount(); + if (settings.partnerApiServer) { + partnerServer = settings.partnerApiServer; + } + const trustrootsUrl = partnerServer + "/api/partner/link"; const timeSafariUrl = window.location.origin + "/claim/" + jwtId; const content = this.fullClaim.name + " - see " + timeSafariUrl; // Why does IntelliJ not see matching types? diff --git a/sw_scripts/additional-scripts.js b/sw_scripts/additional-scripts.js index 2312163c..7897f9d0 100644 --- a/sw_scripts/additional-scripts.js +++ b/sw_scripts/additional-scripts.js @@ -81,7 +81,7 @@ self.addEventListener("push", function (event) { let message = "Got some empty message."; if (payload && payload.title == DIRECT_PUSH_TITLE) { // skip any search logic and show the message directly - title = "Direct Notification"; + title = "Direct Message"; message = payload.message || "No details were provided."; } else { // any other title will run through regular filtering logic diff --git a/test-playwright/LICENSE b/test-playwright/LICENSE new file mode 100644 index 00000000..19a5a785 --- /dev/null +++ b/test-playwright/LICENSE @@ -0,0 +1,8 @@ +The author disclaims copyright to this source code. In place of a legal notice, here is a blessing: + +May you do good and not evil. +May you find forgiveness for yourself and forgive others. +May you share freely, never taking more than you give. + +________________________________________________________________ +from https://www.sqlite.org/src/info/689401a6cfb4c234 and memorialized here https://spdx.org/licenses/blessing.html