forked from jsnbuchanan/crowd-funder-for-time-pwa
crop the image and store online and in settings
This commit is contained in:
@@ -611,7 +611,7 @@ export default class AccountViewView extends Vue {
|
||||
isRegistered = false;
|
||||
isSubscribed = false;
|
||||
notificationMaybeChanged = false;
|
||||
profileImageUrl: string | null = null;
|
||||
profileImageUrl?: string;
|
||||
publicHex = "";
|
||||
publicBase64 = "";
|
||||
webPushServer = "";
|
||||
@@ -684,6 +684,7 @@ export default class AccountViewView extends Vue {
|
||||
(settings?.firstName || "") +
|
||||
(settings?.lastName ? ` ${settings.lastName}` : ""); // pre v 0.1.3
|
||||
this.isRegistered = !!settings?.isRegistered;
|
||||
this.profileImageUrl = settings?.profileImageUrl as string;
|
||||
this.showContactGives = !!settings?.showContactGivesInline;
|
||||
this.showShortcutBvc = !!settings?.showShortcutBvc;
|
||||
this.warnIfProdServer = !!settings?.warnIfProdServer;
|
||||
@@ -1289,10 +1290,14 @@ export default class AccountViewView extends Vue {
|
||||
}
|
||||
|
||||
openPhotoDialog() {
|
||||
(this.$refs.photoDialog as GiftedPhotoDialog).open((imgUrl) => {
|
||||
(this.$refs.photoDialog as GiftedPhotoDialog).open(async (imgUrl) => {
|
||||
await db.open();
|
||||
db.settings.update(MASTER_SETTINGS_KEY, {
|
||||
profileImageUrl: imgUrl,
|
||||
});
|
||||
this.profileImageUrl = imgUrl;
|
||||
console.log("Got image URL:", imgUrl);
|
||||
});
|
||||
//console.log("Got image URL:", imgUrl);
|
||||
}, true);
|
||||
}
|
||||
|
||||
confirmDeleteImage() {
|
||||
|
||||
Reference in New Issue
Block a user