1616 size =" sm"
1717 color =" primary"
1818 class =" q-mr-sm"
19- icon =" fas fa-barcode "
19+ icon =" fas fa-camera "
2020 @click =" openBarcodeDialog" />
21+ <q-btn
22+ round
23+ outline
24+ size =" sm"
25+ color =" primary"
26+ class =" q-mr-sm"
27+ icon =" fas fa-shopping-cart"
28+ @click =" openInteractionQrDialog" />
2129 <q-btn
2230 round
2331 outline
3947 @delete-credential =" $event.waitUntil(deleteCredential($event))" />
4048 </div >
4149 <ShowScannerModal v-model =" showBarcodeDialog" />
50+ <ShowInteractionQrModal
51+ v-if =" showInteractionQrDialog"
52+ v-model =" showInteractionQrDialog" />
4253 </q-page >
4354</template >
4455
@@ -52,13 +63,15 @@ import {config} from '@bedrock/web';
5263import {createEmitExtendable } from ' @digitalbazaar/vue-extendable-event' ;
5364import CredentialsList from ' ./CredentialsList.vue' ;
5465import SearchBox from ' ./SearchBox.vue' ;
66+ import ShowInteractionQrModal from ' ./ShowInteractionQrModal.vue' ;
5567import ShowScannerModal from ' ./ShowScannerModal.vue' ;
5668
5769export default {
5870 name: ' CredentialDashboard' ,
5971 components: {
6072 CredentialsList,
6173 SearchBox,
74+ ShowInteractionQrModal,
6275 ShowScannerModal
6376 },
6477 props: {
@@ -96,6 +109,7 @@ export default {
96109 const search = ref (' ' );
97110 const filteredProfiles = ref ([]);
98111 const showBarcodeDialog = ref (false );
112+ const showInteractionQrDialog = ref (false );
99113 const credentials = toRef (props, ' credentials' );
100114
101115 // Credentials filtered by search term match
@@ -132,14 +146,18 @@ export default {
132146 showBarcodeDialog .value = true ;
133147 };
134148
149+ const openInteractionQrDialog = () => {
150+ showInteractionQrDialog .value = true ;
151+ };
152+
135153 // Pass delete-credential event up component chain
136154 const deleteCredential = async ({profileId, credentialId}) => {
137155 return emitExtendable (' delete-credential' , {profileId, credentialId});
138156 };
139157
140158 // Watchers
141159 watch (() => filteredProfiles, () => {
142- return emit (' filtered-profiles' , filteredProfiles);
160+ return emit (' filtered-profiles' , filteredProfiles . value );
143161 }, {immediate: true });
144162
145163 // Get each credential title and subtitle overrides
@@ -181,6 +199,8 @@ export default {
181199 search,
182200 openBarcodeDialog,
183201 showBarcodeDialog,
202+ openInteractionQrDialog,
203+ showInteractionQrDialog,
184204 };
185205 }
186206};
0 commit comments