diff --git a/README.md b/README.md
index 4a8392d..0e943d1 100644
--- a/README.md
+++ b/README.md
@@ -26,13 +26,13 @@ If you are deploying in a subdirectory, add it to `publicPath` in vue.config.js,
* Tag wth the new version: `git tag 0.1.0`.
-* If production, change src/constants/app.ts DEFAULT_*_SERVER to be PROD and package.json to not be _Test.
+* If production, change src/constants/app.ts DEFAULT_*_SERVER to be "PROD" and package.json to remove "_Test".
* `npm run build`
* `npx prettier --write ./sw_scripts/`
-...to make sure the service worker scripts are in proper form
+...to make sure the service worker scripts are in proper form. It's only important if you changed something in that directory.
* `cp sw_scripts/[ns]* dist/`
diff --git a/project.task.yaml b/project.task.yaml
index df49f3e..36808bf 100644
--- a/project.task.yaml
+++ b/project.task.yaml
@@ -2,18 +2,23 @@
tasks:
- 08 notifications :
- - get the rest of our Android devices to work... and insert tooling (exportable logs?) so that we can see problems and troubleshoot as we onboard
+ - get the rest of our Android devices to work
+ - insert tooling (exportable logs?) so that we can see problems and troubleshoot as we onboard
- get an error registering notifications on Firefox and subscription info is null
- if navigator.serviceWorker is null, then tell the user to wait
- Android DuckDuckGo asked for my permissions, got error, won't download DB
- Android Chrome won't ask permission, will download log but always empty
- -
- - Chrome will get notification permissions but still complain when I reload (maybe I reload too soon?)
+ - Firefox works
+ - Local install works after cleared out cache in Chrome
+ - create troubleshooting notification:
+ - server gets signal to send a normal notification back immediately
+ - add windows & mac help at OS & browser level, in HelpNotificationsView.vue (linked from account page)
+ maybe tell them to pause, after first turn-on and after test
+ maybe Google Play permissions
- prompt user to install on their home screen https://benborgers.com/posts/pwa-detect-installed
- warn if they're using the web (android only?)
https://developer.mozilla.org/en-US/docs/Web/API/Navigator/getInstalledRelatedApps
https://web.dev/articles/get-installed-related-apps
- - add windows & mac help at OS & browser level, in HelpNotificationsView.vue (linked from account page)
- .2 fix the projects on /discover to show the issuer (currently all "Someone Anonymous")
@@ -83,6 +88,7 @@ tasks:
- 24 Move to Vite
- 32 accept images for projects
- 32 accept images for contacts
+- import project interactions from GitHub/GitLab and manage signing
- linking between projects or plans :
- show total time given to & from a project
diff --git a/src/App.vue b/src/App.vue
index 2c20d32..7b41d47 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -281,7 +281,7 @@ interface VapidResponse {
};
}
-import { AppString } from "@/constants/app";
+import { DEFAULT_PUSH_SERVER } from "@/constants/app";
import { db } from "@/db/index";
import { MASTER_SETTINGS_KEY } from "@/db/tables/settings";
@@ -302,7 +302,7 @@ export default class App extends Vue {
try {
await db.open();
const settings = await db.settings.get(MASTER_SETTINGS_KEY);
- let pushUrl: string = AppString.DEFAULT_PUSH_SERVER;
+ let pushUrl = DEFAULT_PUSH_SERVER;
if (settings?.webPushServer) {
pushUrl = settings.webPushServer;
}
@@ -446,7 +446,9 @@ export default class App extends Vue {
}
})
.then(() => {
- console.log("Subscription data sent to server.");
+ console.log(
+ "Subscription data sent to server and all finished successfully.",
+ );
})
.catch((error) => {
console.error(
@@ -510,11 +512,7 @@ export default class App extends Vue {
resolve();
})
.catch((error) => {
- console.error(
- "Subscription or server communication failed:",
- error,
- options,
- );
+ console.error("Push subscription failed:", error, options);
// Inform the user about the issue
alert(
diff --git a/src/constants/app.ts b/src/constants/app.ts
index c92709b..1675806 100644
--- a/src/constants/app.ts
+++ b/src/constants/app.ts
@@ -4,22 +4,20 @@
* See also ../libs/veramo/setup.ts
*/
export enum AppString {
- APP_NAME = "Time Safari",
-
PROD_ENDORSER_API_SERVER = "https://api.endorser.ch",
TEST_ENDORSER_API_SERVER = "https://test-api.endorser.ch",
LOCAL_ENDORSER_API_SERVER = "http://localhost:3000",
- DEFAULT_ENDORSER_API_SERVER = TEST_ENDORSER_API_SERVER,
-
- // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values
PROD_PUSH_SERVER = "https://timesafari.app",
TEST1_PUSH_SERVER = "https://test.timesafari.app",
TEST2_PUSH_SERVER = "https://timesafari-pwa.anomalistlabs.com",
-
- DEFAULT_PUSH_SERVER = TEST1_PUSH_SERVER,
}
+export const DEFAULT_ENDORSER_API_SERVER = AppString.TEST_ENDORSER_API_SERVER;
+
+export const DEFAULT_PUSH_SERVER =
+ window.location.protocol + "//" + window.location.host;
+
/**
* The possible values for "group" and "type" are in App.vue.
* From the notiwind package
diff --git a/src/db/index.ts b/src/db/index.ts
index 644f813..c15f6c9 100644
--- a/src/db/index.ts
+++ b/src/db/index.ts
@@ -8,7 +8,7 @@ import {
Settings,
SettingsSchema,
} from "./tables/settings";
-import { AppString } from "@/constants/app";
+import { DEFAULT_ENDORSER_API_SERVER } from "@/constants/app";
// Define types for tables that hold sensitive and non-sensitive data
type SensitiveTables = { accounts: Table Show results of auto-detection whether they're turned onData
@@ -306,13 +309,6 @@
Switch Identity
-
-
Claim Server
diff --git a/src/views/HelpNotificationsView.vue b/src/views/HelpNotificationsView.vue
index a7c125b..12c055f 100644
--- a/src/views/HelpNotificationsView.vue
+++ b/src/views/HelpNotificationsView.vue
@@ -69,12 +69,34 @@
Auto-detection
+