forked from jsnbuchanan/crowd-funder-for-time-pwa
Merge branch 'master' into profile_include_location
This commit is contained in:
11
BUILDING.md
11
BUILDING.md
@@ -344,17 +344,10 @@ current version to test DB migrations.
|
|||||||
[online](https://gitea.anomalistdesign.com/trent_larson/crowd-funder-for-time-pwa/releases) or
|
[online](https://gitea.anomalistdesign.com/trent_larson/crowd-funder-for-time-pwa/releases) or
|
||||||
`git tag 1.0.2 && git push origin 1.0.2`.
|
`git tag 1.0.2 && git push origin 1.0.2`.
|
||||||
|
|
||||||
- For test, build the app (because test server is not yet set up to build):
|
- For test, build the app:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
TIME_SAFARI_APP_TITLE="TimeSafari_Test" \
|
npm run build:web:test
|
||||||
VITE_APP_SERVER=https://test.timesafari.app \
|
|
||||||
VITE_BVC_MEETUPS_PROJECT_CLAIM_ID=https://endorser.ch/entity/01HWE8FWHQ1YGP7GFZYYPS272F \
|
|
||||||
VITE_DEFAULT_ENDORSER_API_SERVER=https://test-api.endorser.ch \
|
|
||||||
VITE_DEFAULT_IMAGE_API_SERVER=https://test-image-api.timesafari.app \
|
|
||||||
VITE_DEFAULT_PARTNER_API_SERVER=https://test-partner-api.endorser.ch \
|
|
||||||
VITE_DEFAULT_PUSH_SERVER=https://test.timesafari.app \
|
|
||||||
VITE_PASSKEYS_ENABLED=true npm run build:web
|
|
||||||
```
|
```
|
||||||
|
|
||||||
... and transfer to the test server:
|
... and transfer to the test server:
|
||||||
|
|||||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "timesafari",
|
"name": "timesafari",
|
||||||
"version": "1.0.8-beta",
|
"version": "1.1.0-beta",
|
||||||
"lockfileVersion": 3,
|
"lockfileVersion": 3,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "timesafari",
|
"name": "timesafari",
|
||||||
"version": "1.0.8-beta",
|
"version": "1.1.0-beta",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@capacitor-community/electron": "^5.0.1",
|
"@capacitor-community/electron": "^5.0.1",
|
||||||
"@capacitor-community/sqlite": "6.0.2",
|
"@capacitor-community/sqlite": "6.0.2",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "timesafari",
|
"name": "timesafari",
|
||||||
"version": "1.0.8-beta",
|
"version": "1.1.0-beta",
|
||||||
"description": "Time Safari Application",
|
"description": "Time Safari Application",
|
||||||
"author": {
|
"author": {
|
||||||
"name": "Time Safari Team"
|
"name": "Time Safari Team"
|
||||||
|
|||||||
@@ -309,7 +309,7 @@ export function didInfoForContact(
|
|||||||
showDidForVisible: boolean = false,
|
showDidForVisible: boolean = false,
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
): { known: boolean; displayName: string; profileImageUrl?: string } {
|
): { known: boolean; displayName: string; profileImageUrl?: string } {
|
||||||
if (!did) return { displayName: "Someone Unnamed/Unknown", known: false };
|
if (!did) return { displayName: "Someone Not Named", known: false };
|
||||||
if (did === activeDid) {
|
if (did === activeDid) {
|
||||||
return { displayName: "You", known: true };
|
return { displayName: "You", known: true };
|
||||||
} else if (contact) {
|
} else if (contact) {
|
||||||
|
|||||||
@@ -657,7 +657,7 @@ export async function saveNewIdentity(
|
|||||||
|
|
||||||
await platformService.updateDefaultSettings({ activeDid: identity.did });
|
await platformService.updateDefaultSettings({ activeDid: identity.did });
|
||||||
|
|
||||||
await platformService.insertDidSpecificSettings(identity.did);
|
await platformService.insertNewDidIntoSettings(identity.did);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logger.error("Failed to update default settings:", error);
|
logger.error("Failed to update default settings:", error);
|
||||||
throw new Error(
|
throw new Error(
|
||||||
@@ -954,7 +954,7 @@ export async function importFromMnemonic(
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
// First, ensure the DID-specific settings record exists
|
// First, ensure the DID-specific settings record exists
|
||||||
await platformService.insertDidSpecificSettings(newId.did);
|
await platformService.insertNewDidIntoSettings(newId.did);
|
||||||
|
|
||||||
// Then update with Test User #0 specific settings
|
// Then update with Test User #0 specific settings
|
||||||
await platformService.updateDidSpecificSettings(newId.did, {
|
await platformService.updateDidSpecificSettings(newId.did, {
|
||||||
|
|||||||
@@ -175,11 +175,11 @@ export interface PlatformService {
|
|||||||
updateDefaultSettings(settings: Record<string, unknown>): Promise<void>;
|
updateDefaultSettings(settings: Record<string, unknown>): Promise<void>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Inserts DID-specific settings into the database.
|
* Inserts a new DID into the settings table.
|
||||||
* @param did - The DID to associate with the settings
|
* @param did - The DID to associate with the settings
|
||||||
* @returns Promise that resolves when the insertion is complete
|
* @returns Promise that resolves when the insertion is complete
|
||||||
*/
|
*/
|
||||||
insertDidSpecificSettings(did: string): Promise<void>;
|
insertNewDidIntoSettings(did: string): Promise<void>;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Updates DID-specific settings in the database.
|
* Updates DID-specific settings in the database.
|
||||||
|
|||||||
@@ -1319,7 +1319,7 @@ export class CapacitorPlatformService implements PlatformService {
|
|||||||
await this.dbExec(sql, params);
|
await this.dbExec(sql, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
async insertDidSpecificSettings(did: string): Promise<void> {
|
async insertNewDidIntoSettings(did: string): Promise<void> {
|
||||||
await this.dbExec("INSERT INTO settings (accountDid) VALUES (?)", [did]);
|
await this.dbExec("INSERT INTO settings (accountDid) VALUES (?)", [did]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -681,7 +681,7 @@ export class WebPlatformService implements PlatformService {
|
|||||||
await this.dbExec(sql, params);
|
await this.dbExec(sql, params);
|
||||||
}
|
}
|
||||||
|
|
||||||
async insertDidSpecificSettings(did: string): Promise<void> {
|
async insertNewDidIntoSettings(did: string): Promise<void> {
|
||||||
await this.dbExec("INSERT INTO settings (accountDid) VALUES (?)", [did]);
|
await this.dbExec("INSERT INTO settings (accountDid) VALUES (?)", [did]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -50,6 +50,10 @@ export async function testServerRegisterUser() {
|
|||||||
"@/db/databaseUtil"
|
"@/db/databaseUtil"
|
||||||
);
|
);
|
||||||
const settings = await retrieveSettingsForActiveAccount();
|
const settings = await retrieveSettingsForActiveAccount();
|
||||||
|
const currentDid = settings?.activeDid;
|
||||||
|
if (!currentDid) {
|
||||||
|
throw new Error("No active DID found");
|
||||||
|
}
|
||||||
|
|
||||||
// Make a claim
|
// Make a claim
|
||||||
const vcClaim = {
|
const vcClaim = {
|
||||||
@@ -57,7 +61,7 @@ export async function testServerRegisterUser() {
|
|||||||
"@type": "RegisterAction",
|
"@type": "RegisterAction",
|
||||||
agent: { identifier: identity0.did },
|
agent: { identifier: identity0.did },
|
||||||
object: SERVICE_ID,
|
object: SERVICE_ID,
|
||||||
participant: { identifier: settings.activeDid },
|
participant: { identifier: currentDid },
|
||||||
};
|
};
|
||||||
|
|
||||||
// Make a payload for the claim
|
// Make a payload for the claim
|
||||||
@@ -94,5 +98,12 @@ export async function testServerRegisterUser() {
|
|||||||
|
|
||||||
const resp = await axios.post(url, payload, { headers });
|
const resp = await axios.post(url, payload, { headers });
|
||||||
logger.log("User registration result:", resp);
|
logger.log("User registration result:", resp);
|
||||||
|
|
||||||
|
const platformService = await PlatformServiceFactory.getInstance();
|
||||||
|
await platformService.updateDefaultSettings({ activeDid: currentDid });
|
||||||
|
await platformService.updateDidSpecificSettings(currentDid!, {
|
||||||
|
isRegistered: true,
|
||||||
|
});
|
||||||
|
|
||||||
return resp;
|
return resp;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
icon="circle-question"
|
icon="circle-question"
|
||||||
class="text-slate-400 text-4xl"
|
class="text-slate-400 text-4xl"
|
||||||
/>
|
/>
|
||||||
<span class="italic text-slate-400">(Unnamed/Unknown)</span>
|
<span class="italic text-slate-400">(Not Named)</span>
|
||||||
</span>
|
</span>
|
||||||
<span class="text-right">
|
<span class="text-right">
|
||||||
<button
|
<button
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
<!-- Heading -->
|
<!-- Heading -->
|
||||||
<h1 id="ViewHeading" class="text-4xl text-center font-light pt-4 mb-8">
|
<h1 id="ViewHeading" class="text-4xl text-center font-light pt-4 mb-8">
|
||||||
Help
|
Help
|
||||||
|
<span class="text-xs text-gray-500">{{ package.version }}</span>
|
||||||
</h1>
|
</h1>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user