forked from jsnbuchanan/crowd-funder-for-time-pwa
disable checkboxes for nostr partner messages; adjust linting warnings
This commit is contained in:
@@ -145,7 +145,10 @@
|
||||
</l-map>
|
||||
</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">
|
||||
<input
|
||||
type="checkbox"
|
||||
@@ -206,7 +209,11 @@ import { Router } from "vue-router";
|
||||
|
||||
import ImageMethodDialog from "@/components/ImageMethodDialog.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 {
|
||||
createEndorserJwtVcFromClaim,
|
||||
@@ -451,12 +458,16 @@ export default class NewEditProjectView extends Vue {
|
||||
|
||||
if (this.sendToTrustroots) {
|
||||
this.sendToNostrPartner(
|
||||
"NOSTR-EVENT-TRUSTROOTS", "Trustroots", resp.data.success.claimId
|
||||
"NOSTR-EVENT-TRUSTROOTS",
|
||||
"Trustroots",
|
||||
resp.data.success.claimId,
|
||||
);
|
||||
}
|
||||
if (this.sendToTripHopping) {
|
||||
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
|
||||
const account = await getAccount(this.activeDid);
|
||||
// get the last number of the derivationPath
|
||||
@@ -532,7 +547,11 @@ export default class NewEditProjectView extends Vue {
|
||||
// remove any trailing '
|
||||
const finalDerNumNoApostrophe = finalDerNum?.replace(/'/g, "");
|
||||
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 trustrootsUrl = DEFAULT_PARTNER_API_SERVER + "/api/partner/link";
|
||||
@@ -547,7 +566,11 @@ export default class NewEditProjectView extends Vue {
|
||||
const fullTrustrootsUrl = trustrootsUrl;
|
||||
const headers = await getHeaders(this.activeDid);
|
||||
try {
|
||||
const linkResp = await this.axios.post(fullTrustrootsUrl, trustrootsParams, { headers });
|
||||
const linkResp = await this.axios.post(
|
||||
fullTrustrootsUrl,
|
||||
trustrootsParams,
|
||||
{ headers },
|
||||
);
|
||||
if (linkResp.status === 201) {
|
||||
this.$notify(
|
||||
{
|
||||
@@ -586,7 +609,6 @@ export default class NewEditProjectView extends Vue {
|
||||
5000,
|
||||
);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public async onSaveProjectClick() {
|
||||
|
||||
Reference in New Issue
Block a user