|
@ -145,7 +145,10 @@ |
|
|
</l-map> |
|
|
</l-map> |
|
|
</div> |
|
|
</div> |
|
|
|
|
|
|
|
|
<div v-if="showGeneralAdvanced && includeLocation" class="items-center mb-4"> |
|
|
<div |
|
|
|
|
|
v-if="showGeneralAdvanced && includeLocation && false" |
|
|
|
|
|
class="items-center mb-4" |
|
|
|
|
|
> |
|
|
<div class="flex"> |
|
|
<div class="flex"> |
|
|
<input |
|
|
<input |
|
|
type="checkbox" |
|
|
type="checkbox" |
|
@ -206,7 +209,11 @@ import { Router } from "vue-router"; |
|
|
|
|
|
|
|
|
import ImageMethodDialog from "@/components/ImageMethodDialog.vue"; |
|
|
import ImageMethodDialog from "@/components/ImageMethodDialog.vue"; |
|
|
import QuickNav from "@/components/QuickNav.vue"; |
|
|
import QuickNav from "@/components/QuickNav.vue"; |
|
|
import { DEFAULT_IMAGE_API_SERVER, DEFAULT_PARTNER_API_SERVER, NotificationIface } from "@/constants/app"; |
|
|
import { |
|
|
|
|
|
DEFAULT_IMAGE_API_SERVER, |
|
|
|
|
|
DEFAULT_PARTNER_API_SERVER, |
|
|
|
|
|
NotificationIface, |
|
|
|
|
|
} from "@/constants/app"; |
|
|
import { accountsDB, retrieveSettingsForActiveAccount } from "@/db/index"; |
|
|
import { accountsDB, retrieveSettingsForActiveAccount } from "@/db/index"; |
|
|
import { |
|
|
import { |
|
|
createEndorserJwtVcFromClaim, |
|
|
createEndorserJwtVcFromClaim, |
|
@ -451,12 +458,16 @@ export default class NewEditProjectView extends Vue { |
|
|
|
|
|
|
|
|
if (this.sendToTrustroots) { |
|
|
if (this.sendToTrustroots) { |
|
|
this.sendToNostrPartner( |
|
|
this.sendToNostrPartner( |
|
|
"NOSTR-EVENT-TRUSTROOTS", "Trustroots", resp.data.success.claimId |
|
|
"NOSTR-EVENT-TRUSTROOTS", |
|
|
|
|
|
"Trustroots", |
|
|
|
|
|
resp.data.success.claimId, |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
if (this.sendToTripHopping) { |
|
|
if (this.sendToTripHopping) { |
|
|
this.sendToNostrPartner( |
|
|
this.sendToNostrPartner( |
|
|
"NOSTR-EVENT-TRIPHOPPING", "TripHopping", resp.data.success.claimId |
|
|
"NOSTR-EVENT-TRIPHOPPING", |
|
|
|
|
|
"TripHopping", |
|
|
|
|
|
resp.data.success.claimId, |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -524,7 +535,11 @@ export default class NewEditProjectView extends Vue { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
private async sendToNostrPartner(linkCode: string, serviceName: string, jwtId: string) { |
|
|
private async sendToNostrPartner( |
|
|
|
|
|
linkCode: string, |
|
|
|
|
|
serviceName: string, |
|
|
|
|
|
jwtId: string, |
|
|
|
|
|
) { |
|
|
// first, get the public key for nostr |
|
|
// first, get the public key for nostr |
|
|
const account = await getAccount(this.activeDid); |
|
|
const account = await getAccount(this.activeDid); |
|
|
// get the last number of the derivationPath |
|
|
// get the last number of the derivationPath |
|
@ -532,7 +547,11 @@ export default class NewEditProjectView extends Vue { |
|
|
// remove any trailing ' |
|
|
// remove any trailing ' |
|
|
const finalDerNumNoApostrophe = finalDerNum?.replace(/'/g, ""); |
|
|
const finalDerNumNoApostrophe = finalDerNum?.replace(/'/g, ""); |
|
|
const accountNum = Number(finalDerNumNoApostrophe || 0); |
|
|
const accountNum = Number(finalDerNumNoApostrophe || 0); |
|
|
const pubPri = accountFromSeedWords(account?.mnemonic as string, "", accountNum); |
|
|
const pubPri = accountFromSeedWords( |
|
|
|
|
|
account?.mnemonic as string, |
|
|
|
|
|
"", |
|
|
|
|
|
accountNum, |
|
|
|
|
|
); |
|
|
const nostrPubKey = pubPri?.publicKey; |
|
|
const nostrPubKey = pubPri?.publicKey; |
|
|
|
|
|
|
|
|
const trustrootsUrl = DEFAULT_PARTNER_API_SERVER + "/api/partner/link"; |
|
|
const trustrootsUrl = DEFAULT_PARTNER_API_SERVER + "/api/partner/link"; |
|
@ -547,7 +566,11 @@ export default class NewEditProjectView extends Vue { |
|
|
const fullTrustrootsUrl = trustrootsUrl; |
|
|
const fullTrustrootsUrl = trustrootsUrl; |
|
|
const headers = await getHeaders(this.activeDid); |
|
|
const headers = await getHeaders(this.activeDid); |
|
|
try { |
|
|
try { |
|
|
const linkResp = await this.axios.post(fullTrustrootsUrl, trustrootsParams, { headers }); |
|
|
const linkResp = await this.axios.post( |
|
|
|
|
|
fullTrustrootsUrl, |
|
|
|
|
|
trustrootsParams, |
|
|
|
|
|
{ headers }, |
|
|
|
|
|
); |
|
|
if (linkResp.status === 201) { |
|
|
if (linkResp.status === 201) { |
|
|
this.$notify( |
|
|
this.$notify( |
|
|
{ |
|
|
{ |
|
@ -586,7 +609,6 @@ export default class NewEditProjectView extends Vue { |
|
|
5000, |
|
|
5000, |
|
|
); |
|
|
); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public async onSaveProjectClick() { |
|
|
public async onSaveProjectClick() { |
|
|