forked from jsnbuchanan/crowd-funder-for-time-pwa
add more type casts
This commit is contained in:
@@ -55,6 +55,7 @@
|
||||
<script lang="ts">
|
||||
import axios from "axios";
|
||||
import { Component, Vue } from "vue-facing-decorator";
|
||||
import { RouteLocationRaw, Router } from "vue-router";
|
||||
|
||||
import PhotoDialog from "@/components/PhotoDialog.vue";
|
||||
import QuickNav from "@/components/QuickNav.vue";
|
||||
@@ -92,7 +93,9 @@ export default class SharedPhotoView extends Vue {
|
||||
// clear the temp image
|
||||
db.temp.delete("shared-photo");
|
||||
|
||||
this.imageFileName = this.$route.query.fileName as string;
|
||||
this.imageFileName = (this.$route as Router).query[
|
||||
"fileName"
|
||||
] as string;
|
||||
}
|
||||
} catch (err: unknown) {
|
||||
console.error("Got an error loading an identifier:", err);
|
||||
@@ -111,15 +114,17 @@ export default class SharedPhotoView extends Vue {
|
||||
async recordGift() {
|
||||
await this.sendToImageServer("GiveAction").then((url) => {
|
||||
if (url) {
|
||||
this.$router.push({
|
||||
const route = {
|
||||
name: "gifted-details",
|
||||
// this might be wrong since "name" goes with params, but it works so test well when you change it
|
||||
query: {
|
||||
destinationPathAfter: "/home",
|
||||
hideBackButton: true,
|
||||
imageUrl: url,
|
||||
recipientDid: this.activeDid,
|
||||
},
|
||||
});
|
||||
} as RouteLocationRaw;
|
||||
(this.$router as Router).push(route);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -130,7 +135,7 @@ export default class SharedPhotoView extends Vue {
|
||||
await db.settings.update(MASTER_SETTINGS_KEY, {
|
||||
profileImageUrl: imgUrl,
|
||||
});
|
||||
this.$router.push({ name: "account" });
|
||||
(this.$router as Router).push({ name: "account" });
|
||||
},
|
||||
IMAGE_TYPE_PROFILE,
|
||||
true,
|
||||
@@ -142,7 +147,7 @@ export default class SharedPhotoView extends Vue {
|
||||
async cancel() {
|
||||
this.imageBlob = undefined;
|
||||
this.imageFileName = undefined;
|
||||
this.$router.push({ name: "home" });
|
||||
(this.$router as Router).push({ name: "home" });
|
||||
}
|
||||
|
||||
async sendToImageServer(imageType: string) {
|
||||
|
||||
Reference in New Issue
Block a user