| 
						
						
							
								
							
						
						
					 | 
					@ -176,8 +176,8 @@ | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      <br /> | 
					 | 
					 | 
					      <br /> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      See existing passkeys in Chrome at: chrome://settings/passkeys | 
					 | 
					 | 
					      See existing passkeys in Chrome at: chrome://settings/passkeys | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      <br /> | 
					 | 
					 | 
					      <br /> | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					      Active DID: {{ activeDid }} | 
					 | 
					 | 
					      Active DID: {{ activeDid || "nothing, which" }} | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					      {{ credIdHex ? "has passkey ID" : "has no passkey ID" }} | 
					 | 
					 | 
					      {{ credIdHex ? "has a passkey ID" : "has no passkey ID" }} | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					      <div> | 
					 | 
					 | 
					      <div> | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        Register Passkey | 
					 | 
					 | 
					        Register Passkey | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -244,6 +244,7 @@ import { ref } from "vue"; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					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 { NotificationIface } from "@/constants/app"; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { accountsDB, db } from "@/db/index"; | 
					 | 
					 | 
					import { accountsDB, db } from "@/db/index"; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					import { | 
					 | 
					 | 
					import { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  createPeerDid, | 
					 | 
					 | 
					  createPeerDid, | 
				
			
			
		
	
	
		
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
					@ -269,6 +270,8 @@ 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; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  // for file import | 
					 | 
					 | 
					  // for file import | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  fileName?: string; | 
					 | 
					 | 
					  fileName?: string; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -300,7 +303,7 @@ export default class Help extends Vue { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  } | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  async uploadFile(event: Event) { | 
					 | 
					 | 
					  async uploadFile(event: Event) { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    inputFileNameRef.value = event.target.files[0]; | 
					 | 
					 | 
					    inputFileNameRef.value = event.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; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
							
								
							
						
						
					 | 
					@ -330,7 +333,27 @@ export default class Help extends Vue { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  } | 
					 | 
					 | 
					  } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					  public async register() { | 
					 | 
					 | 
					  public async register() { | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					    const cred = await registerCredential(this.userName); | 
					 | 
					 | 
					    const DEFAULT_USERNAME = "Time Safari Tester"; | 
				
			
			
				
				
			
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    if (!this.userName) { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      this.$notify( | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          group: "modal", | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          type: "confirm", | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          title: "No Name", | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          text: "You must have a name to attach to this passkey. Would you like to enter your own name first?", | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          onNo: async () => { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            this.userName = DEFAULT_USERNAME; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          }, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          onYes: async () => { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					            this.$router.push({ name: "new-edit-account" }); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          }, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					          noText: "try again and use " + DEFAULT_USERNAME, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        }, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					        -1, | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      ); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					      return; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					    const cred = await registerCredential("Time Safari - " + this.userName); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    const publicKeyBytes = cred.publicKeyBytes; | 
					 | 
					 | 
					    const publicKeyBytes = cred.publicKeyBytes; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    this.activeDid = createPeerDid(publicKeyBytes as Uint8Array); | 
					 | 
					 | 
					    this.activeDid = createPeerDid(publicKeyBytes as Uint8Array); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					    this.credIdHex = cred.credIdHex as string; | 
					 | 
					 | 
					    this.credIdHex = cred.credIdHex as string; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |