forked from trent_larson/crowd-funder-for-time-pwa
fix: update Vue template syntax and improve Vite config
- Fix Vue template syntax in App.vue by using proper event handler format - Update Vite config to properly handle ESM imports and crypto modules - Add manual chunks for better code splitting - Improve environment variable handling in vite-env.d.ts - Fix TypeScript linting errors in App.vue
This commit is contained in:
@@ -100,33 +100,33 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import { Component, Vue } from "vue-facing-decorator";
|
||||
import * as R from "ramda";
|
||||
import { useClipboard } from "@vueuse/core";
|
||||
import { Contact } from "../db/tables/contacts";
|
||||
import * as serverUtil from "../libs/endorserServer";
|
||||
import { NotificationIface } from "../constants/app";
|
||||
import { Component, Vue } from 'vue-facing-decorator'
|
||||
import * as R from 'ramda'
|
||||
import { useClipboard } from '@vueuse/core'
|
||||
import { Contact } from '../db/tables/contacts'
|
||||
import * as serverUtil from '../libs/endorserServer'
|
||||
import { NotificationIface } from '../constants/app'
|
||||
|
||||
@Component
|
||||
export default class HiddenDidDialog extends Vue {
|
||||
$notify!: (notification: NotificationIface, timeout?: number) => void;
|
||||
$notify!: (notification: NotificationIface, timeout?: number) => void
|
||||
|
||||
isOpen = false;
|
||||
roleName = "";
|
||||
visibleToDids: string[] = [];
|
||||
allContacts: Array<Contact> = [];
|
||||
activeDid = "";
|
||||
allMyDids: Array<string> = [];
|
||||
canShare = false;
|
||||
windowLocation = window.location.href;
|
||||
isOpen = false
|
||||
roleName = ''
|
||||
visibleToDids: string[] = []
|
||||
allContacts: Array<Contact> = []
|
||||
activeDid = ''
|
||||
allMyDids: Array<string> = []
|
||||
canShare = false
|
||||
windowLocation = window.location.href
|
||||
|
||||
R = R;
|
||||
serverUtil = serverUtil;
|
||||
R = R
|
||||
serverUtil = serverUtil
|
||||
|
||||
created() {
|
||||
// When Chrome compatibility is fixed https://developer.mozilla.org/en-US/docs/Web/API/Web_Share_API#api.navigator.canshare
|
||||
// then use this truer check: navigator.canShare && navigator.canShare()
|
||||
this.canShare = !!navigator.share;
|
||||
this.canShare = !!navigator.share
|
||||
}
|
||||
|
||||
open(
|
||||
@@ -134,18 +134,18 @@ export default class HiddenDidDialog extends Vue {
|
||||
visibleToDids: string[],
|
||||
allContacts: Array<Contact>,
|
||||
activeDid: string,
|
||||
allMyDids: Array<string>,
|
||||
allMyDids: Array<string>
|
||||
) {
|
||||
this.roleName = roleName;
|
||||
this.visibleToDids = visibleToDids;
|
||||
this.allContacts = allContacts;
|
||||
this.activeDid = activeDid;
|
||||
this.allMyDids = allMyDids;
|
||||
this.isOpen = true;
|
||||
this.roleName = roleName
|
||||
this.visibleToDids = visibleToDids
|
||||
this.allContacts = allContacts
|
||||
this.activeDid = activeDid
|
||||
this.allMyDids = allMyDids
|
||||
this.isOpen = true
|
||||
}
|
||||
|
||||
close() {
|
||||
this.isOpen = false;
|
||||
this.isOpen = false
|
||||
}
|
||||
|
||||
didInfo(did: string) {
|
||||
@@ -153,8 +153,8 @@ export default class HiddenDidDialog extends Vue {
|
||||
did,
|
||||
this.activeDid,
|
||||
this.allMyDids,
|
||||
this.allContacts,
|
||||
);
|
||||
this.allContacts
|
||||
)
|
||||
}
|
||||
|
||||
copyToClipboard(name: string, text: string) {
|
||||
@@ -163,23 +163,23 @@ export default class HiddenDidDialog extends Vue {
|
||||
.then(() => {
|
||||
this.$notify(
|
||||
{
|
||||
group: "alert",
|
||||
type: "toast",
|
||||
title: "Copied",
|
||||
text: (name || "That") + " was copied to the clipboard.",
|
||||
group: 'alert',
|
||||
type: 'toast',
|
||||
title: 'Copied',
|
||||
text: (name || 'That') + ' was copied to the clipboard.'
|
||||
},
|
||||
2000,
|
||||
);
|
||||
});
|
||||
2000
|
||||
)
|
||||
})
|
||||
}
|
||||
|
||||
onClickShareClaim() {
|
||||
this.copyToClipboard("A link to this page", this.windowLocation);
|
||||
this.copyToClipboard('A link to this page', this.windowLocation)
|
||||
window.navigator.share({
|
||||
title: "Help Connect Me",
|
||||
title: 'Help Connect Me',
|
||||
text: "I'm trying to find the people who recorded this. Can you help me?",
|
||||
url: this.windowLocation,
|
||||
});
|
||||
url: this.windowLocation
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user