mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-12 10:10:59 +01:00
2 lines
1.2 KiB
JavaScript
Vendored
2 lines
1.2 KiB
JavaScript
Vendored
import{a as h,c as _,H as s,h as y,k as b,l as a,m as F,e as v,j as r,f as t,C as B,p as g}from"./app-D4Udf6Mm.js";import{F as C}from"./Form-BGrUTood.js";/*! 2FAuth version 5.4.1 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const E={__name:"Edit",props:{credentialId:{type:String,default:""}},setup(i){const u=g(),m=h(),e=_(new C({name:s("auth.webauthn.my_device")})),c=i;function d(){e.patch("/webauthn/credentials/"+c.credentialId+"/name").then(()=>{m.success({text:s("auth.webauthn.device_successfully_registered")}),u.push({name:"settings.webauthn.devices"})})}return(l,n)=>{const p=a("FormField"),f=a("FormButtons"),w=a("FormWrapper");return F(),y(w,{title:"auth.webauthn.rename_device"},{default:b(()=>[v("form",{onSubmit:B(d,["prevent"]),onKeydown:n[1]||(n[1]=o=>t(e).onKeydown(o))},[r(p,{modelValue:t(e).name,"onUpdate:modelValue":n[0]||(n[0]=o=>t(e).name=o),fieldName:"name",fieldError:t(e).errors.get("name"),inputType:"text",label:"commons.new_name",autofocus:""},null,8,["modelValue","fieldError"]),r(f,{submitId:"btnEditCredential",isBusy:t(e).isBusy,caption:l.$t("commons.save"),showCancelButton:!0,cancelLandingView:"settings.webauthn.devices"},null,8,["isBusy","caption"])],32)]),_:1})}}};export{E as default};
|