forked from trent_larson/crowd-funder-for-time-pwa
(chore): cleaning up formatting and relative references
This commit is contained in:
@@ -90,7 +90,11 @@
|
|||||||
import { Vue, Component, Prop } from "vue-facing-decorator";
|
import { Vue, Component, Prop } from "vue-facing-decorator";
|
||||||
|
|
||||||
import { NotificationIface } from "../constants/app";
|
import { NotificationIface } from "../constants/app";
|
||||||
import { createAndSubmitGive, didInfo, serverMessageForUser } from "../libs/endorserServer";
|
import {
|
||||||
|
createAndSubmitGive,
|
||||||
|
didInfo,
|
||||||
|
serverMessageForUser,
|
||||||
|
} from "../libs/endorserServer";
|
||||||
import * as libsUtil from "../libs/util";
|
import * as libsUtil from "../libs/util";
|
||||||
import { db, retrieveSettingsForActiveAccount } from "../db/index";
|
import { db, retrieveSettingsForActiveAccount } from "../db/index";
|
||||||
import { Contact } from "../db/tables/contacts";
|
import { Contact } from "../db/tables/contacts";
|
||||||
@@ -100,8 +104,8 @@ import { retrieveAccountDids } from "../libs/util";
|
|||||||
export default class GiftedDialog extends Vue {
|
export default class GiftedDialog extends Vue {
|
||||||
$notify!: (notification: NotificationIface, timeout?: number) => void;
|
$notify!: (notification: NotificationIface, timeout?: number) => void;
|
||||||
|
|
||||||
@Prop fromProjectId = "";
|
@Prop() fromProjectId = "";
|
||||||
@Prop toProjectId = "";
|
@Prop() toProjectId = "";
|
||||||
|
|
||||||
activeDid = "";
|
activeDid = "";
|
||||||
allContacts: Array<Contact> = [];
|
allContacts: Array<Contact> = [];
|
||||||
@@ -128,7 +132,7 @@ export default class GiftedDialog extends Vue {
|
|||||||
offerId?: string,
|
offerId?: string,
|
||||||
customTitle?: string,
|
customTitle?: string,
|
||||||
prompt?: string,
|
prompt?: string,
|
||||||
callbackOnSuccess?: (amount: number) => void,
|
callbackOnSuccess: (amount: number) => void = () => {},
|
||||||
) {
|
) {
|
||||||
this.customTitle = customTitle;
|
this.customTitle = customTitle;
|
||||||
this.giver = giver;
|
this.giver = giver;
|
||||||
|
|||||||
@@ -155,17 +155,17 @@ import {
|
|||||||
logConsoleAndDb,
|
logConsoleAndDb,
|
||||||
retrieveSettingsForActiveAccount,
|
retrieveSettingsForActiveAccount,
|
||||||
db,
|
db,
|
||||||
} from "@/db/index";
|
} from "../db/index";
|
||||||
import {
|
import {
|
||||||
errorStringForLog,
|
errorStringForLog,
|
||||||
getHeaders,
|
getHeaders,
|
||||||
register,
|
register,
|
||||||
serverMessageForUser,
|
serverMessageForUser,
|
||||||
} from "@/libs/endorserServer";
|
} from "../libs/endorserServer";
|
||||||
import { decryptMessage } from "@/libs/crypto";
|
import { decryptMessage } from "../libs/crypto";
|
||||||
import { Contact } from "@/db/tables/contacts";
|
import { Contact } from "../db/tables/contacts";
|
||||||
import * as libsUtil from "@/libs/util";
|
import * as libsUtil from "../libs/util";
|
||||||
import { NotificationIface } from "@/constants/app";
|
import { NotificationIface } from "../constants/app";
|
||||||
|
|
||||||
interface Member {
|
interface Member {
|
||||||
admitted: boolean;
|
admitted: boolean;
|
||||||
@@ -335,39 +335,41 @@ export default class MembersList extends Vue {
|
|||||||
const contact = this.getContactFor(member.did);
|
const contact = this.getContactFor(member.did);
|
||||||
if (!member.member.admitted && !contact) {
|
if (!member.member.admitted && !contact) {
|
||||||
// If not a contact, show confirmation dialog
|
// If not a contact, show confirmation dialog
|
||||||
this.$notify({
|
this.$notify(
|
||||||
group: "modal",
|
{
|
||||||
type: "confirm",
|
group: "modal",
|
||||||
title: "Add as Contact First?",
|
type: "confirm",
|
||||||
text: "This person is not in your contacts. Would you like to add them as a contact first?",
|
title: "Add as Contact First?",
|
||||||
yesText: "Add as Contact",
|
text: "This person is not in your contacts. Would you like to add them as a contact first?",
|
||||||
noText: "Skip Adding Contact",
|
yesText: "Add as Contact",
|
||||||
onYes: async () => {
|
noText: "Skip Adding Contact",
|
||||||
await this.addAsContact(member);
|
onYes: async () => {
|
||||||
// After adding as contact, proceed with admission
|
await this.addAsContact(member);
|
||||||
await this.toggleAdmission(member);
|
// After adding as contact, proceed with admission
|
||||||
},
|
await this.toggleAdmission(member);
|
||||||
onNo: async () => {
|
|
||||||
// If they choose not to add as contact, show second confirmation
|
|
||||||
this.$notify({
|
|
||||||
group: "modal",
|
|
||||||
type: "confirm",
|
|
||||||
title: "Continue Without Adding?",
|
|
||||||
text: "Are you sure you want to proceed with admission even though they are not a contact?",
|
|
||||||
yesText: "Continue",
|
|
||||||
onYes: async () => {
|
|
||||||
await this.toggleAdmission(member);
|
|
||||||
},
|
|
||||||
onCancel: async () => {
|
|
||||||
// Do nothing, effectively canceling the operation
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
-1,
|
onNo: async () => {
|
||||||
);
|
// If they choose not to add as contact, show second confirmation
|
||||||
},
|
this.$notify(
|
||||||
},
|
{
|
||||||
-1,
|
group: "modal",
|
||||||
);
|
type: "confirm",
|
||||||
|
title: "Continue Without Adding?",
|
||||||
|
text: "Are you sure you want to proceed with admission even though they are not a contact?",
|
||||||
|
yesText: "Continue",
|
||||||
|
onYes: async () => {
|
||||||
|
await this.toggleAdmission(member);
|
||||||
|
},
|
||||||
|
onCancel: async () => {
|
||||||
|
// Do nothing, effectively canceling the operation
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-1,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
-1,
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
// If already a contact, proceed directly with admission
|
// If already a contact, proceed directly with admission
|
||||||
this.toggleAdmission(member);
|
this.toggleAdmission(member);
|
||||||
@@ -391,7 +393,7 @@ export default class MembersList extends Vue {
|
|||||||
const contactOldOrNew: Contact = oldContact || {
|
const contactOldOrNew: Contact = oldContact || {
|
||||||
did: member.did,
|
did: member.did,
|
||||||
name: member.name,
|
name: member.name,
|
||||||
}
|
};
|
||||||
const result = await register(
|
const result = await register(
|
||||||
this.activeDid,
|
this.activeDid,
|
||||||
this.apiServer,
|
this.apiServer,
|
||||||
|
|||||||
@@ -83,7 +83,10 @@
|
|||||||
import { Vue, Component, Prop } from "vue-facing-decorator";
|
import { Vue, Component, Prop } from "vue-facing-decorator";
|
||||||
|
|
||||||
import { NotificationIface } from "../constants/app";
|
import { NotificationIface } from "../constants/app";
|
||||||
import { createAndSubmitOffer } from "../libs/endorserServer";
|
import {
|
||||||
|
createAndSubmitOffer,
|
||||||
|
serverMessageForUser,
|
||||||
|
} from "../libs/endorserServer";
|
||||||
import * as libsUtil from "../libs/util";
|
import * as libsUtil from "../libs/util";
|
||||||
import { retrieveSettingsForActiveAccount } from "../db/index";
|
import { retrieveSettingsForActiveAccount } from "../db/index";
|
||||||
|
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ export const shortDid = (did: string) => {
|
|||||||
} else {
|
} else {
|
||||||
return did.substring(0, did.indexOf(":", 4) + 7) + "...";
|
return did.substring(0, did.indexOf(":", 4) + 7) + "...";
|
||||||
}
|
}
|
||||||
}
|
};
|
||||||
|
|
||||||
export const nameForDid = (
|
export const nameForDid = (
|
||||||
activeDid: string,
|
activeDid: string,
|
||||||
|
|||||||
@@ -1391,14 +1391,14 @@ export default class ContactsView extends Vue {
|
|||||||
const headers = await getHeaders(this.activeDid);
|
const headers = await getHeaders(this.activeDid);
|
||||||
const memberResponse = await this.axios.get(
|
const memberResponse = await this.axios.get(
|
||||||
this.apiServer + "/api/partner/groupOnboardMember",
|
this.apiServer + "/api/partner/groupOnboardMember",
|
||||||
{ headers }
|
{ headers },
|
||||||
);
|
);
|
||||||
|
|
||||||
if (memberResponse.data.data) {
|
if (memberResponse.data.data) {
|
||||||
// They're in a meeting, check if they're the host
|
// They're in a meeting, check if they're the host
|
||||||
const hostResponse = await this.axios.get(
|
const hostResponse = await this.axios.get(
|
||||||
this.apiServer + "/api/partner/groupOnboard",
|
this.apiServer + "/api/partner/groupOnboard",
|
||||||
{ headers }
|
{ headers },
|
||||||
);
|
);
|
||||||
|
|
||||||
if (hostResponse.data.data) {
|
if (hostResponse.data.data) {
|
||||||
@@ -1423,16 +1423,18 @@ export default class ContactsView extends Vue {
|
|||||||
onNo: () => {
|
onNo: () => {
|
||||||
(this.$router as Router).push({ name: "onboard-meeting-list" });
|
(this.$router as Router).push({ name: "onboard-meeting-list" });
|
||||||
},
|
},
|
||||||
noText: "Join Existing Meeting"
|
noText: "Join Existing Meeting",
|
||||||
},
|
},
|
||||||
-1
|
-1,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
logConsoleAndDb("Error checking meeting status:" + errorStringForLog(error));
|
logConsoleAndDb(
|
||||||
|
"Error checking meeting status:" + errorStringForLog(error),
|
||||||
|
);
|
||||||
this.danger(
|
this.danger(
|
||||||
"There was an error checking your meeting status.",
|
"There was an error checking your meeting status.",
|
||||||
"Meeting Error"
|
"Meeting Error",
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -375,8 +375,7 @@ import { UAParser } from "ua-parser-js";
|
|||||||
import { Component, Vue } from "vue-facing-decorator";
|
import { Component, Vue } from "vue-facing-decorator";
|
||||||
import { Router } from "vue-router";
|
import { Router } from "vue-router";
|
||||||
|
|
||||||
import App from "../App.vue";
|
//import App from "../App.vue";
|
||||||
<<<<<<< HEAD
|
|
||||||
import EntityIcon from "../components/EntityIcon.vue";
|
import EntityIcon from "../components/EntityIcon.vue";
|
||||||
import GiftedDialog from "../components/GiftedDialog.vue";
|
import GiftedDialog from "../components/GiftedDialog.vue";
|
||||||
import GiftedPrompts from "../components/GiftedPrompts.vue";
|
import GiftedPrompts from "../components/GiftedPrompts.vue";
|
||||||
@@ -386,18 +385,7 @@ import OnboardingDialog from "../components/OnboardingDialog.vue";
|
|||||||
import QuickNav from "../components/QuickNav.vue";
|
import QuickNav from "../components/QuickNav.vue";
|
||||||
import TopMessage from "../components/TopMessage.vue";
|
import TopMessage from "../components/TopMessage.vue";
|
||||||
import UserNameDialog from "../components/UserNameDialog.vue";
|
import UserNameDialog from "../components/UserNameDialog.vue";
|
||||||
=======
|
import ChoiceButtonDialog from "../components/ChoiceButtonDialog.vue";
|
||||||
import EntityIcon from "@/components/EntityIcon.vue";
|
|
||||||
import GiftedDialog from "@/components/GiftedDialog.vue";
|
|
||||||
import GiftedPrompts from "@/components/GiftedPrompts.vue";
|
|
||||||
import FeedFilters from "@/components/FeedFilters.vue";
|
|
||||||
import InfiniteScroll from "@/components/InfiniteScroll.vue";
|
|
||||||
import OnboardingDialog from "@/components/OnboardingDialog.vue";
|
|
||||||
import QuickNav from "@/components/QuickNav.vue";
|
|
||||||
import TopMessage from "@/components/TopMessage.vue";
|
|
||||||
import UserNameDialog from "@/components/UserNameDialog.vue";
|
|
||||||
import ChoiceButtonDialog from "@/components/ChoiceButtonDialog.vue";
|
|
||||||
>>>>>>> master
|
|
||||||
import {
|
import {
|
||||||
AppString,
|
AppString,
|
||||||
NotificationIface,
|
NotificationIface,
|
||||||
@@ -451,11 +439,6 @@ interface GiveRecordWithContactInfo extends GiveSummaryRecord {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
computed: {
|
|
||||||
App() {
|
|
||||||
return App;
|
|
||||||
},
|
|
||||||
},
|
|
||||||
components: {
|
components: {
|
||||||
EntityIcon,
|
EntityIcon,
|
||||||
FeedFilters,
|
FeedFilters,
|
||||||
@@ -471,6 +454,7 @@ interface GiveRecordWithContactInfo extends GiveSummaryRecord {
|
|||||||
})
|
})
|
||||||
export default class HomeView extends Vue {
|
export default class HomeView extends Vue {
|
||||||
$notify!: (notification: NotificationIface, timeout?: number) => void;
|
$notify!: (notification: NotificationIface, timeout?: number) => void;
|
||||||
|
$router!: Router;
|
||||||
|
|
||||||
AppString = AppString;
|
AppString = AppString;
|
||||||
PASSKEYS_ENABLED = PASSKEYS_ENABLED;
|
PASSKEYS_ENABLED = PASSKEYS_ENABLED;
|
||||||
@@ -483,7 +467,7 @@ export default class HomeView extends Vue {
|
|||||||
feedPreviousOldestId?: string;
|
feedPreviousOldestId?: string;
|
||||||
feedLastViewedClaimId?: string;
|
feedLastViewedClaimId?: string;
|
||||||
givenName = "";
|
givenName = "";
|
||||||
isAnyFeedFilterOn: boolean;
|
isAnyFeedFilterOn = false;
|
||||||
isCreatingIdentifier = false;
|
isCreatingIdentifier = false;
|
||||||
isFeedFilteredByVisible = false;
|
isFeedFilteredByVisible = false;
|
||||||
isFeedFilteredByNearby = false;
|
isFeedFilteredByNearby = false;
|
||||||
@@ -555,6 +539,7 @@ export default class HomeView extends Vue {
|
|||||||
if (resp.status === 200) {
|
if (resp.status === 200) {
|
||||||
await updateAccountSettings(this.activeDid, {
|
await updateAccountSettings(this.activeDid, {
|
||||||
isRegistered: true,
|
isRegistered: true,
|
||||||
|
apiServer: "",
|
||||||
});
|
});
|
||||||
this.isRegistered = true;
|
this.isRegistered = true;
|
||||||
}
|
}
|
||||||
@@ -668,7 +653,7 @@ export default class HomeView extends Vue {
|
|||||||
if (results.data.length > 0) {
|
if (results.data.length > 0) {
|
||||||
endOfResults = false;
|
endOfResults = false;
|
||||||
// include the descriptions of the giver and receiver
|
// include the descriptions of the giver and receiver
|
||||||
for (const record: GiveSummaryRecord of results.data) {
|
for (const record of results.data as GiveSummaryRecord[]) {
|
||||||
// similar code is in endorser-mobile utility.ts
|
// similar code is in endorser-mobile utility.ts
|
||||||
// claim.claim happen for some claims wrapped in a Verifiable Credential
|
// claim.claim happen for some claims wrapped in a Verifiable Credential
|
||||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
@@ -897,14 +882,14 @@ export default class HomeView extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
goToActivityToUserPage() {
|
goToActivityToUserPage() {
|
||||||
(this.$router as Router).push({ name: "new-activity" });
|
this.$router.push({ name: "new-activity" });
|
||||||
}
|
}
|
||||||
|
|
||||||
onClickLoadClaim(jwtId: string) {
|
onClickLoadClaim(jwtId: string) {
|
||||||
const route = {
|
const route = {
|
||||||
path: "/claim/" + encodeURIComponent(jwtId),
|
path: "/claim/" + encodeURIComponent(jwtId),
|
||||||
};
|
};
|
||||||
(this.$router as Router).push(route);
|
this.$router.push(route);
|
||||||
}
|
}
|
||||||
|
|
||||||
displayAmount(code: string, amt: number) {
|
displayAmount(code: string, amt: number) {
|
||||||
@@ -972,13 +957,13 @@ export default class HomeView extends Vue {
|
|||||||
option2Text: "We are nearby with cameras",
|
option2Text: "We are nearby with cameras",
|
||||||
option3Text: "We will share some other way",
|
option3Text: "We will share some other way",
|
||||||
onOption1: () => {
|
onOption1: () => {
|
||||||
(this.$router as Router).push({ name: "onboard-meeting-list" });
|
this.$router.push({ name: "onboard-meeting-list" });
|
||||||
},
|
},
|
||||||
onOption2: () => {
|
onOption2: () => {
|
||||||
(this.$router as Router).push({ name: "contact-qr" });
|
this.$router.push({ name: "contact-qr" });
|
||||||
},
|
},
|
||||||
onOption3: () => {
|
onOption3: () => {
|
||||||
(this.$router as Router).push({ name: "share-my-contact-info" });
|
this.$router.push({ name: "share-my-contact-info" });
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,15 +87,15 @@ import { Component, Vue } from "vue-facing-decorator";
|
|||||||
import { nextTick } from "vue";
|
import { nextTick } from "vue";
|
||||||
import { Router } from "vue-router";
|
import { Router } from "vue-router";
|
||||||
|
|
||||||
import QuickNav from "@/components/QuickNav.vue";
|
import QuickNav from "../components/QuickNav.vue";
|
||||||
import TopMessage from "@/components/TopMessage.vue";
|
import TopMessage from "../components/TopMessage.vue";
|
||||||
import { logConsoleAndDb, retrieveSettingsForActiveAccount } from "@/db/index";
|
import { logConsoleAndDb, retrieveSettingsForActiveAccount } from "../db/index";
|
||||||
import {
|
import {
|
||||||
errorStringForLog,
|
errorStringForLog,
|
||||||
getHeaders,
|
getHeaders,
|
||||||
serverMessageForUser,
|
serverMessageForUser,
|
||||||
} from "@/libs/endorserServer";
|
} from "../libs/endorserServer";
|
||||||
import { encryptMessage } from "@/libs/crypto";
|
import { encryptMessage } from "../libs/crypto";
|
||||||
|
|
||||||
interface Meeting {
|
interface Meeting {
|
||||||
name: string;
|
name: string;
|
||||||
|
|||||||
@@ -32,9 +32,9 @@
|
|||||||
import { Component, Vue } from "vue-facing-decorator";
|
import { Component, Vue } from "vue-facing-decorator";
|
||||||
import { RouteLocation } from "vue-router";
|
import { RouteLocation } from "vue-router";
|
||||||
|
|
||||||
import QuickNav from "@/components/QuickNav.vue";
|
import QuickNav from "../components/QuickNav.vue";
|
||||||
import TopMessage from "@/components/TopMessage.vue";
|
import TopMessage from "../components/TopMessage.vue";
|
||||||
import MembersList from "@/components/MembersList.vue";
|
import MembersList from "../components/MembersList.vue";
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
components: {
|
components: {
|
||||||
|
|||||||
@@ -225,16 +225,16 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import { Component, Vue } from "vue-facing-decorator";
|
import { Component, Vue } from "vue-facing-decorator";
|
||||||
import QuickNav from "@/components/QuickNav.vue";
|
import QuickNav from "../components/QuickNav.vue";
|
||||||
import TopMessage from "@/components/TopMessage.vue";
|
import TopMessage from "../components/TopMessage.vue";
|
||||||
import MembersList from "@/components/MembersList.vue";
|
import MembersList from "../components/MembersList.vue";
|
||||||
import { logConsoleAndDb, retrieveSettingsForActiveAccount } from "@/db/index";
|
import { logConsoleAndDb, retrieveSettingsForActiveAccount } from "../db/index";
|
||||||
import {
|
import {
|
||||||
errorStringForLog,
|
errorStringForLog,
|
||||||
getHeaders,
|
getHeaders,
|
||||||
serverMessageForUser,
|
serverMessageForUser,
|
||||||
} from "@/libs/endorserServer";
|
} from "../libs/endorserServer";
|
||||||
import { encryptMessage } from "@/libs/crypto";
|
import { encryptMessage } from "../libs/crypto";
|
||||||
|
|
||||||
interface ServerMeeting {
|
interface ServerMeeting {
|
||||||
groupId: number; // from the server
|
groupId: number; // from the server
|
||||||
|
|||||||
@@ -30,6 +30,7 @@
|
|||||||
{
|
{
|
||||||
group: 'alert',
|
group: 'alert',
|
||||||
type: 'toast',
|
type: 'toast',
|
||||||
|
title: 'Toast',
|
||||||
text: 'I\'m a toast. Without a timeout, I\'m stuck.',
|
text: 'I\'m a toast. Without a timeout, I\'m stuck.',
|
||||||
},
|
},
|
||||||
5000,
|
5000,
|
||||||
@@ -114,6 +115,8 @@
|
|||||||
{
|
{
|
||||||
group: 'modal',
|
group: 'modal',
|
||||||
type: 'notification-permission',
|
type: 'notification-permission',
|
||||||
|
title: 'Notification Permission',
|
||||||
|
text: 'Enable notifications?',
|
||||||
},
|
},
|
||||||
-1,
|
-1,
|
||||||
)
|
)
|
||||||
@@ -129,6 +132,8 @@
|
|||||||
{
|
{
|
||||||
group: 'modal',
|
group: 'modal',
|
||||||
type: 'notification-mute',
|
type: 'notification-mute',
|
||||||
|
title: 'Notification Settings',
|
||||||
|
text: 'Notifications muted',
|
||||||
},
|
},
|
||||||
-1,
|
-1,
|
||||||
)
|
)
|
||||||
@@ -144,6 +149,8 @@
|
|||||||
{
|
{
|
||||||
group: 'modal',
|
group: 'modal',
|
||||||
type: 'notification-off',
|
type: 'notification-off',
|
||||||
|
title: 'Notifications',
|
||||||
|
text: 'Notifications turned off',
|
||||||
},
|
},
|
||||||
-1,
|
-1,
|
||||||
)
|
)
|
||||||
@@ -294,6 +301,7 @@ const TEST_PAYLOAD = {
|
|||||||
@Component({ components: { QuickNav } })
|
@Component({ components: { QuickNav } })
|
||||||
export default class Help extends Vue {
|
export default class Help extends Vue {
|
||||||
$notify!: (notification: NotificationIface, timeout?: number) => void;
|
$notify!: (notification: NotificationIface, timeout?: number) => void;
|
||||||
|
$router!: Router;
|
||||||
|
|
||||||
// for encryption/decryption
|
// for encryption/decryption
|
||||||
encryptionTestResult?: boolean;
|
encryptionTestResult?: boolean;
|
||||||
@@ -326,7 +334,8 @@ export default class Help extends Vue {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async uploadFile(event: Event) {
|
async uploadFile(event: Event) {
|
||||||
inputFileNameRef.value = event.target?.["files"][0];
|
const target = event.target as HTMLInputElement;
|
||||||
|
inputFileNameRef.value = target.files?.[0];
|
||||||
// https://developer.mozilla.org/en-US/docs/Web/API/File
|
// https://developer.mozilla.org/en-US/docs/Web/API/File
|
||||||
// ... plus it has a `type` property from my testing
|
// ... plus it has a `type` property from my testing
|
||||||
const file = inputFileNameRef.value;
|
const file = inputFileNameRef.value;
|
||||||
@@ -339,7 +348,7 @@ export default class Help extends Vue {
|
|||||||
type: file.type,
|
type: file.type,
|
||||||
});
|
});
|
||||||
const blobB64 = await blobToBase64(blob);
|
const blobB64 = await blobToBase64(blob);
|
||||||
this.fileName = file.name as string;
|
this.fileName = (file as File).name;
|
||||||
const temp = await db.temp.get(SHARED_PHOTO_BASE64_KEY);
|
const temp = await db.temp.get(SHARED_PHOTO_BASE64_KEY);
|
||||||
if (temp) {
|
if (temp) {
|
||||||
await db.temp.update(SHARED_PHOTO_BASE64_KEY, { blobB64 });
|
await db.temp.update(SHARED_PHOTO_BASE64_KEY, { blobB64 });
|
||||||
|
|||||||
Reference in New Issue
Block a user