Rebuild assets

This commit is contained in:
Bubka 2024-03-21 18:41:26 +01:00
parent 4516e8d33a
commit 2bfd4850ff
55 changed files with 181 additions and 171 deletions

View File

@ -1 +1 @@
import{Q as b,u as k,e as i,f as g,k as C,p as r,h as s,t,m as o,n as c,j as e,i as h,U as u}from"./app-60af1d1a.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const B={class:"title has-text-grey-dark"},F={class:"block"},A=s("span",{class:"is-size-5"},"2FAuth",-1),w=s("br",null,null,-1),y=s("img",{class:"about-logo",src:"logo.svg",alt:"2FAuth logo"},null,-1),v=s("p",{class:"block"},[e(" ©Bubka "),s("a",{class:"is-size-7",href:"https://github.com/Bubka/2FAuth/blob/master/LICENSE"},"AGPL-3.0 license")],-1),I={class:"title is-5 has-text-grey-light"},L={class:"buttons"},$={class:"icon is-small"},S=s("span",null,"Github",-1),T={class:"icon is-small"},V=s("span",null,"Docs",-1),z={class:"icon is-small"},N=s("span",null,"Demo",-1),D={class:"icon is-small"},E=s("span",null,"API",-1),W={class:"title is-5 has-text-grey-light"},j={class:"block"},M=s("a",{href:"https://docs.2fauth.app/credits/"},"Laravel, Bulma CSS, Vue.js and more",-1),R=s("a",{href:"https://fontawesome.com/"},"Font Awesome",-1),x=s("a",{class:"is-size-7",href:"https://fontawesome.com/license/free"},"(CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)",-1),G=s("a",{href:"https://2fa.directory/"},"2FA Directory",-1),P=s("a",{class:"is-size-7",href:"https://github.com/2factorauth/twofactorauth/blob/master/LICENSE.md"},"(MIT License)",-1),q={__name:"About",setup(U){const _=b("2fauth"),d=k().options.history.state.back;return(a,Q)=>{const l=i("FontAwesomeIcon"),p=i("ButtonBackCloseCancel"),m=i("VueFooter"),f=i("ResponsiveWidthWrapper");return g(),C(f,null,{default:r(()=>[s("h1",B,t(a.$t("commons.about")),1),s("p",F,[o(h(u),null,{default:r(({mode:n})=>[s("span",{class:c(n=="dark"?"has-text-white":"has-text-black")},[A,e(" v"+t(h(_).version),1)],2)]),_:1}),w,e(" "+t(a.$t("commons.2fauth_teaser")),1)]),y,v,s("h2",I,t(a.$t("commons.resources")),1),s("div",L,[o(h(u),null,{default:r(({mode:n})=>[s("a",{class:c(["button",{"is-dark":n=="dark"}]),href:"https://github.com/Bubka/2FAuth",target:"_blank"},[s("span",$,[o(l,{icon:["fab","github-alt"]})]),S],2),s("a",{class:c(["button",{"is-dark":n=="dark"}]),href:"https://docs.2fauth.app/",target:"_blank"},[s("span",T,[o(l,{icon:["fas","book"]})]),V],2),s("a",{class:c(["button",{"is-dark":n=="dark"}]),href:"https://demo.2fauth.app/",target:"_blank"},[s("span",z,[o(l,{icon:["fas","flask"]})]),N],2),s("a",{class:c(["button",{"is-dark":n=="dark"}]),href:"https://docs.2fauth.app/resources/rapidoc.html",target:"_blank"},[s("span",D,[o(l,{icon:["fas","code"]})]),E],2)]),_:1})]),s("h2",W,t(a.$t("commons.credits")),1),s("p",j,[s("ul",null,[s("li",null,[e(t(a.$t("commons.made_with"))+" ",1),M]),s("li",null,[e(t(a.$t("commons.ui_icons_by"))+" ",1),R,e(" "),x]),s("li",null,[e(t(a.$t("commons.logos_by"))+" ",1),G,e(" "),P])])]),o(m,{showButtons:!0},{default:r(()=>[o(p,{returnTo:{path:h(d)},action:"back"},null,8,["returnTo"])]),_:1})]),_:1})}}};export{q as default};
import{Q as b,u as k,e as i,f as g,k as C,p as r,h as s,t,m as o,n as c,j as e,i as h,U as u}from"./app-2d89b28f.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const B={class:"title has-text-grey-dark"},F={class:"block"},A=s("span",{class:"is-size-5"},"2FAuth",-1),w=s("br",null,null,-1),y=s("img",{class:"about-logo",src:"logo.svg",alt:"2FAuth logo"},null,-1),v=s("p",{class:"block"},[e(" ©Bubka "),s("a",{class:"is-size-7",href:"https://github.com/Bubka/2FAuth/blob/master/LICENSE"},"AGPL-3.0 license")],-1),I={class:"title is-5 has-text-grey-light"},L={class:"buttons"},$={class:"icon is-small"},S=s("span",null,"Github",-1),T={class:"icon is-small"},V=s("span",null,"Docs",-1),z={class:"icon is-small"},N=s("span",null,"Demo",-1),D={class:"icon is-small"},E=s("span",null,"API",-1),W={class:"title is-5 has-text-grey-light"},j={class:"block"},M=s("a",{href:"https://docs.2fauth.app/credits/"},"Laravel, Bulma CSS, Vue.js and more",-1),R=s("a",{href:"https://fontawesome.com/"},"Font Awesome",-1),x=s("a",{class:"is-size-7",href:"https://fontawesome.com/license/free"},"(CC BY 4.0, Fonts: SIL OFL 1.1, Code: MIT License)",-1),G=s("a",{href:"https://2fa.directory/"},"2FA Directory",-1),P=s("a",{class:"is-size-7",href:"https://github.com/2factorauth/twofactorauth/blob/master/LICENSE.md"},"(MIT License)",-1),q={__name:"About",setup(U){const _=b("2fauth"),d=k().options.history.state.back;return(a,Q)=>{const l=i("FontAwesomeIcon"),p=i("ButtonBackCloseCancel"),m=i("VueFooter"),f=i("ResponsiveWidthWrapper");return g(),C(f,null,{default:r(()=>[s("h1",B,t(a.$t("commons.about")),1),s("p",F,[o(h(u),null,{default:r(({mode:n})=>[s("span",{class:c(n=="dark"?"has-text-white":"has-text-black")},[A,e(" v"+t(h(_).version),1)],2)]),_:1}),w,e(" "+t(a.$t("commons.2fauth_teaser")),1)]),y,v,s("h2",I,t(a.$t("commons.resources")),1),s("div",L,[o(h(u),null,{default:r(({mode:n})=>[s("a",{class:c(["button",{"is-dark":n=="dark"}]),href:"https://github.com/Bubka/2FAuth",target:"_blank"},[s("span",$,[o(l,{icon:["fab","github-alt"]})]),S],2),s("a",{class:c(["button",{"is-dark":n=="dark"}]),href:"https://docs.2fauth.app/",target:"_blank"},[s("span",T,[o(l,{icon:["fas","book"]})]),V],2),s("a",{class:c(["button",{"is-dark":n=="dark"}]),href:"https://demo.2fauth.app/",target:"_blank"},[s("span",z,[o(l,{icon:["fas","flask"]})]),N],2),s("a",{class:c(["button",{"is-dark":n=="dark"}]),href:"https://docs.2fauth.app/resources/rapidoc.html",target:"_blank"},[s("span",D,[o(l,{icon:["fas","code"]})]),E],2)]),_:1})]),s("h2",W,t(a.$t("commons.credits")),1),s("p",j,[s("ul",null,[s("li",null,[e(t(a.$t("commons.made_with"))+" ",1),M]),s("li",null,[e(t(a.$t("commons.ui_icons_by"))+" ",1),R,e(" "),x]),s("li",null,[e(t(a.$t("commons.logos_by"))+" ",1),G,e(" "),P])])]),o(m,{showButtons:!0},{default:r(()=>[o(p,{returnTo:{path:h(d)},action:"back"},null,8,["returnTo"])]),_:1})]),_:1})}}};export{q as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{r as u,e as t,f as s,g as a,m as n,p as i,h as o,F as _,G as v,i as f,n as h,j as k,t as w}from"./app-60af1d1a.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const T={class:"options-header"},g={class:"tabs is-centered is-fullwidth"},b={__name:"AdminTabs",props:{activeTab:{type:String,default:""}},setup(r){const p=r,d=u([{name:"admin.app_setup",view:"admin.appSetup",id:"lnkTabApp"},{name:"admin.users",view:"admin.users",id:"lnkTabUsers"}]);return(c,R)=>{const l=t("RouterLink"),m=t("ResponsiveWidthWrapper");return s(),a("div",T,[n(m,null,{default:i(()=>[o("div",g,[o("ul",null,[(s(!0),a(_,null,v(f(d),e=>(s(),a("li",{key:e.view,class:h({"is-active":e.view===p.activeTab})},[n(l,{id:e.id,to:{name:e.view}},{default:i(()=>[k(w(c.$t(e.name)),1)]),_:2},1032,["id","to"])],2))),128))])])]),_:1})])}}};export{b as _};
import{r as u,e as t,f as s,g as a,m as n,p as i,h as o,F as _,G as v,i as f,n as h,j as k,t as w}from"./app-2d89b28f.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const T={class:"options-header"},g={class:"tabs is-centered is-fullwidth"},b={__name:"AdminTabs",props:{activeTab:{type:String,default:""}},setup(r){const p=r,d=u([{name:"admin.app_setup",view:"admin.appSetup",id:"lnkTabApp"},{name:"admin.users",view:"admin.users",id:"lnkTabUsers"}]);return(c,R)=>{const l=t("RouterLink"),m=t("ResponsiveWidthWrapper");return s(),a("div",T,[n(m,null,{default:i(()=>[o("div",g,[o("ul",null,[(s(!0),a(_,null,v(f(d),e=>(s(),a("li",{key:e.view,class:h({"is-active":e.view===p.activeTab})},[n(l,{id:e.id,to:{name:e.view}},{default:i(()=>[k(w(c.$t(e.name)),1)]),_:2},1032,["id","to"])],2))),128))])])]),_:1})])}}};export{b as _};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{b as r,S as p,e as l,f as m,g as _,m as u,D as b,I as d}from"./app-60af1d1a.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const y=["aria-label","title"],C={__name:"CopyButton",props:{token:String},setup(e){const s=e,n=r(),{copy:c}=p({legacy:!0});function a(){c(s.token),n.success({text:d("commons.copied_to_clipboard")})}return(o,t)=>{const i=l("FontAwesomeIcon");return m(),_("button",{"aria-label":o.$t("commons.copy_to_clipboard"),title:o.$t("commons.copy_to_clipboard"),class:"button is-like-text is-pulled-right is-small is-text",onClick:t[0]||(t[0]=b(f=>a(),["stop"]))},[u(i,{icon:["fas","copy"]})],8,y)}}};export{C as _};
import{b as r,S as p,e as l,f as m,g as _,m as u,D as b,I as d}from"./app-2d89b28f.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const y=["aria-label","title"],C={__name:"CopyButton",props:{token:String},setup(e){const s=e,n=r(),{copy:c}=p({legacy:!0});function a(){c(s.token),n.success({text:d("commons.copied_to_clipboard")})}return(o,t)=>{const i=l("FontAwesomeIcon");return m(),_("button",{"aria-label":o.$t("commons.copy_to_clipboard"),title:o.$t("commons.copy_to_clipboard"),class:"button is-like-text is-pulled-right is-small is-text",onClick:t[0]||(t[0]=b(f=>a(),["stop"]))},[u(i,{icon:["fas","copy"]})],8,y)}}};export{C as _};

View File

@ -1 +1 @@
import{b as _,u as F,d as V,e as n,f as b,g,m as r,p as y,h as x,i as o,D as B,I as h}from"./app-60af1d1a.js";import{F as C}from"./Form-0a788c90.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const E=["onSubmit"],k={__name:"Create",setup(N){const m=_(),l=F(),e=V(new C({name:"",email:"",password:"",password_confirmation:"",is_admin:!1}));async function i(d){e.password_confirmation=e.password,e.post("/api/v1/users").then(s=>{const t=s.data;m.success({text:h("admin.user_created")}),l.push({name:"admin.manageUser",params:{userId:t.info.id}})})}return(d,s)=>{const t=n("FormField"),u=n("FormPasswordField"),p=n("FormCheckbox"),f=n("FormButtons"),c=n("FormWrapper"),w=n("VueFooter");return b(),g("div",null,[r(c,{title:"admin.new_user"},{default:y(()=>[x("form",{onSubmit:B(i,["prevent"]),onKeydown:s[4]||(s[4]=a=>o(e).onKeydown(a))},[r(t,{modelValue:o(e).name,"onUpdate:modelValue":s[0]||(s[0]=a=>o(e).name=a),fieldName:"name",fieldError:o(e).errors.get("name"),inputType:"text",label:"auth.forms.name",maxLength:255,autofocus:""},null,8,["modelValue","fieldError"]),r(t,{modelValue:o(e).email,"onUpdate:modelValue":s[1]||(s[1]=a=>o(e).email=a),fieldName:"email",fieldError:o(e).errors.get("email"),inputType:"email",label:"auth.forms.email",maxLength:255},null,8,["modelValue","fieldError"]),r(u,{modelValue:o(e).password,"onUpdate:modelValue":s[2]||(s[2]=a=>o(e).password=a),fieldName:"password",fieldError:o(e).errors.get("password"),showRules:!0,label:"auth.forms.password",autocomplete:"new-password"},null,8,["modelValue","fieldError"]),r(p,{modelValue:o(e).is_admin,"onUpdate:modelValue":s[3]||(s[3]=a=>o(e).is_admin=a),fieldName:"is_admin",label:"admin.forms.is_admin.label",help:"admin.forms.is_admin.help"},null,8,["modelValue"]),r(f,{isBusy:o(e).isBusy,isDisabled:o(e).isDisabled,showCancelButton:!0,cancelLandingView:"admin.users",caption:"commons.create",submitId:"btnCreateUser"},null,8,["isBusy","isDisabled","cancelLandingView"])],40,E)]),_:1}),r(w)])}}};export{k as default};
import{b as _,u as F,d as V,e as n,f as b,g,m as r,p as y,h as x,i as o,D as B,I as h}from"./app-2d89b28f.js";import{F as C}from"./Form-5283f7b6.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const E=["onSubmit"],k={__name:"Create",setup(N){const m=_(),l=F(),e=V(new C({name:"",email:"",password:"",password_confirmation:"",is_admin:!1}));async function i(d){e.password_confirmation=e.password,e.post("/api/v1/users").then(s=>{const t=s.data;m.success({text:h("admin.user_created")}),l.push({name:"admin.manageUser",params:{userId:t.info.id}})})}return(d,s)=>{const t=n("FormField"),u=n("FormPasswordField"),p=n("FormCheckbox"),f=n("FormButtons"),c=n("FormWrapper"),w=n("VueFooter");return b(),g("div",null,[r(c,{title:"admin.new_user"},{default:y(()=>[x("form",{onSubmit:B(i,["prevent"]),onKeydown:s[4]||(s[4]=a=>o(e).onKeydown(a))},[r(t,{modelValue:o(e).name,"onUpdate:modelValue":s[0]||(s[0]=a=>o(e).name=a),fieldName:"name",fieldError:o(e).errors.get("name"),inputType:"text",label:"auth.forms.name",maxLength:255,autofocus:""},null,8,["modelValue","fieldError"]),r(t,{modelValue:o(e).email,"onUpdate:modelValue":s[1]||(s[1]=a=>o(e).email=a),fieldName:"email",fieldError:o(e).errors.get("email"),inputType:"email",label:"auth.forms.email",maxLength:255},null,8,["modelValue","fieldError"]),r(u,{modelValue:o(e).password,"onUpdate:modelValue":s[2]||(s[2]=a=>o(e).password=a),fieldName:"password",fieldError:o(e).errors.get("password"),showRules:!0,label:"auth.forms.password",autocomplete:"new-password"},null,8,["modelValue","fieldError"]),r(p,{modelValue:o(e).is_admin,"onUpdate:modelValue":s[3]||(s[3]=a=>o(e).is_admin=a),fieldName:"is_admin",label:"admin.forms.is_admin.label",help:"admin.forms.is_admin.help"},null,8,["modelValue"]),r(f,{isBusy:o(e).isBusy,isDisabled:o(e).isDisabled,showCancelButton:!0,cancelLandingView:"admin.users",caption:"commons.create",submitId:"btnCreateUser"},null,8,["isBusy","isDisabled","cancelLandingView"])],40,E)]),_:1}),r(w)])}}};export{k as default};

View File

@ -1 +1 @@
import{T as v,u as G,_ as h,v as w,d as y,$ as N,L as E,e as m,f as I,k as S,p as V,i as t,h as C,m as i,D as $}from"./app-60af1d1a.js";import{F as k}from"./Form-0a788c90.js";import{u as M}from"./bus-ab2b6d74.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const K=["onSubmit"],U={__name:"CreateUpdate",props:{groupId:[Number,String]},setup(c){const s=c,p=v(),d=G(),l=h(),a=M(),r=w(()=>s.groupId!=null),o=y(new k({name:""}));N(()=>{l.name=="editGroup"&&(a.editedGroupName?(o.name=a.editedGroupName,a.editedGroupName=void 0):E.get(s.groupId).then(e=>{o.name=e.data.name}))});function f(){r.value?B():g()}async function g(){o.post("/api/v1/groups").then(e=>{p.addOrEdit(e.data),d.push({name:"groups"})})}async function B(){o.put("/api/v1/groups/"+s.groupId).then(e=>{p.addOrEdit(e.data),d.push({name:"groups"})})}return(e,n)=>{const b=m("FormField"),F=m("FormButtons"),_=m("FormWrapper");return I(),S(_,{title:t(r)?e.$t("groups.forms.rename_group"):e.$t("groups.forms.new_group")},{default:V(()=>[C("form",{onSubmit:$(f,["prevent"]),onKeydown:n[1]||(n[1]=u=>t(o).onKeydown(u))},[i(b,{modelValue:t(o).name,"onUpdate:modelValue":n[0]||(n[0]=u=>t(o).name=u),fieldName:"name",fieldError:t(o).errors.get("name"),label:"commons.name",autofocus:""},null,8,["modelValue","fieldError"]),i(F,{submitId:t(r)?"btnEditGroup":"btnCreateGroup",isBusy:t(o).isBusy,caption:t(r)?e.$t("commons.save"):e.$t("commons.create"),showCancelButton:!0,cancelLandingView:"groups"},null,8,["submitId","isBusy","caption"])],40,K)]),_:1},8,["title"])}}};export{U as default};
import{T as v,u as G,_ as h,v as w,d as y,$ as N,L as E,e as m,f as I,k as S,p as V,i as t,h as C,m as i,D as $}from"./app-2d89b28f.js";import{F as k}from"./Form-5283f7b6.js";import{u as M}from"./bus-7802a020.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const K=["onSubmit"],U={__name:"CreateUpdate",props:{groupId:[Number,String]},setup(c){const s=c,p=v(),d=G(),l=h(),a=M(),r=w(()=>s.groupId!=null),o=y(new k({name:""}));N(()=>{l.name=="editGroup"&&(a.editedGroupName?(o.name=a.editedGroupName,a.editedGroupName=void 0):E.get(s.groupId).then(e=>{o.name=e.data.name}))});function f(){r.value?B():g()}async function g(){o.post("/api/v1/groups").then(e=>{p.addOrEdit(e.data),d.push({name:"groups"})})}async function B(){o.put("/api/v1/groups/"+s.groupId).then(e=>{p.addOrEdit(e.data),d.push({name:"groups"})})}return(e,n)=>{const b=m("FormField"),F=m("FormButtons"),_=m("FormWrapper");return I(),S(_,{title:t(r)?e.$t("groups.forms.rename_group"):e.$t("groups.forms.new_group")},{default:V(()=>[C("form",{onSubmit:$(f,["prevent"]),onKeydown:n[1]||(n[1]=u=>t(o).onKeydown(u))},[i(b,{modelValue:t(o).name,"onUpdate:modelValue":n[0]||(n[0]=u=>t(o).name=u),fieldName:"name",fieldError:t(o).errors.get("name"),label:"commons.name",autofocus:""},null,8,["modelValue","fieldError"]),i(F,{submitId:t(r)?"btnEditGroup":"btnCreateGroup",isBusy:t(o).isBusy,caption:t(r)?e.$t("commons.save"):e.$t("commons.create"),showCancelButton:!0,cancelLandingView:"groups"},null,8,["submitId","isBusy","caption"])],40,K)]),_:1},8,["title"])}}};export{U as default};

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{u as h,b as w,d as b,I as a,e as s,f as y,k as F,p as v,h as B,m as r,i as t,D as g}from"./app-60af1d1a.js";import{F as V}from"./Form-0a788c90.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const C=["onSubmit"],I={__name:"Edit",props:{credentialId:{type:String,default:""}},setup(i){const u=i,m=h(),d=w(),e=b(new V({name:a("auth.webauthn.my_device")}));function c(){e.patch("/webauthn/credentials/"+u.credentialId+"/name").then(()=>{d.success({text:a("auth.webauthn.device_successfully_registered")}),m.push({name:"settings.webauthn.devices"})})}return(l,n)=>{const p=s("FormField"),f=s("FormButtons"),_=s("FormWrapper");return y(),F(_,{title:"auth.webauthn.rename_device"},{default:v(()=>[B("form",{onSubmit:g(c,["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"])],40,C)]),_:1})}}};export{I as default};
import{u as h,b as w,d as b,I as a,e as s,f as y,k as F,p as v,h as B,m as r,i as t,D as g}from"./app-2d89b28f.js";import{F as V}from"./Form-5283f7b6.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const C=["onSubmit"],I={__name:"Edit",props:{credentialId:{type:String,default:""}},setup(i){const u=i,m=h(),d=w(),e=b(new V({name:a("auth.webauthn.my_device")}));function c(){e.patch("/webauthn/credentials/"+u.credentialId+"/name").then(()=>{d.success({text:a("auth.webauthn.device_successfully_registered")}),m.push({name:"settings.webauthn.devices"})})}return(l,n)=>{const p=s("FormField"),f=s("FormButtons"),_=s("FormWrapper");return y(),F(_,{title:"auth.webauthn.rename_device"},{default:v(()=>[B("form",{onSubmit:g(c,["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"])],40,C)]),_:1})}}};export{I as default};

View File

@ -1 +1 @@
import{b as y,u as b,_ as k,r as v,v as V,x as w,o as N,I as x,e as B,f as r,g as t,m as M,p as $,i as e,E as q,h as l,t as n,l as c,j as C}from"./app-60af1d1a.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const E={key:0,class:"error-message"},R=l("p",{class:"error-404"},null,-1),D={key:1,class:"error-message"},F=l("p",{class:"error-generic"},null,-1),S={key:0,class:"has-text-grey-lighter"},j={key:1,class:"has-text-grey-lighter"},z={key:2,class:"is-size-7 is-family-code"},H=l("br",null,null,-1),T={__name:"Error",props:{closable:{type:Boolean,default:!0}},setup(m){const p=m,s=y(),d=b(),a=k(),u=v(!0),_=V(()=>!1);w(u,o=>{o==!1&&g()}),N(()=>{a.query.err&&(s.message=x("errors."+a.query.err))});function g(){window.history.length>1&&a.name!=="404"&&a.name!=="notFound"&&!a.query.err?d.go(-1):d.push({name:"accounts"})}return(o,i)=>{const h=B("modal");return r(),t("div",null,[M(h,{modelValue:e(u),"onUpdate:modelValue":i[0]||(i[0]=f=>q(u)?u.value=f:null),closable:p.closable},{default:$(()=>[o.$route.name=="404"||o.$route.name=="notFound"?(r(),t("div",E,[R,l("p",null,n(o.$t("errors.resource_not_found")),1)])):(r(),t("div",D,[F,l("p",null,n(o.$t("errors.error_occured")),1),e(s).message?(r(),t("p",S,n(e(s).message),1)):c("",!0),e(s).originalMessage?(r(),t("p",j,n(e(s).originalMessage),1)):c("",!0),e(_)&&e(s).debug?(r(),t("p",z,[H,C(n(e(s).debug),1)])):c("",!0)]))]),_:1},8,["modelValue","closable"])])}}};export{T as default};
import{b as y,u as b,_ as k,r as v,v as V,x as w,o as N,I as x,e as B,f as r,g as t,m as M,p as $,i as e,E as q,h as l,t as n,l as c,j as C}from"./app-2d89b28f.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const E={key:0,class:"error-message"},R=l("p",{class:"error-404"},null,-1),D={key:1,class:"error-message"},F=l("p",{class:"error-generic"},null,-1),S={key:0,class:"has-text-grey-lighter"},j={key:1,class:"has-text-grey-lighter"},z={key:2,class:"is-size-7 is-family-code"},H=l("br",null,null,-1),T={__name:"Error",props:{closable:{type:Boolean,default:!0}},setup(m){const p=m,s=y(),d=b(),a=k(),u=v(!0),_=V(()=>!1);w(u,o=>{o==!1&&g()}),N(()=>{a.query.err&&(s.message=x("errors."+a.query.err))});function g(){window.history.length>1&&a.name!=="404"&&a.name!=="notFound"&&!a.query.err?d.go(-1):d.push({name:"accounts"})}return(o,i)=>{const h=B("modal");return r(),t("div",null,[M(h,{modelValue:e(u),"onUpdate:modelValue":i[0]||(i[0]=f=>q(u)?u.value=f:null),closable:p.closable},{default:$(()=>[o.$route.name=="404"||o.$route.name=="notFound"?(r(),t("div",E,[R,l("p",null,n(o.$t("errors.resource_not_found")),1)])):(r(),t("div",D,[F,l("p",null,n(o.$t("errors.error_occured")),1),e(s).message?(r(),t("p",S,n(e(s).message),1)):c("",!0),e(s).originalMessage?(r(),t("p",j,n(e(s).originalMessage),1)):c("",!0),e(_)&&e(s).debug?(r(),t("p",z,[H,C(n(e(s).debug),1)])):c("",!0)]))]),_:1},8,["modelValue","closable"])])}}};export{T as default};

View File

@ -1 +1 @@
import{a4 as l}from"./app-60af1d1a.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */class f{constructor(){this.errors={}}set(t,s){typeof t=="object"?this.errors=t:this.set({...this.errors,[t]:c(s)})}all(){return this.errors}has(t){return this.errors.hasOwnProperty(t)}hasAny(...t){return t.some(s=>this.has(s))}any(){return Object.keys(this.errors).length>0}get(t){if(this.has(t))return this.getAll(t)[0]}getAll(t){return c(this.errors[t]||[])}only(...t){const s=[];return t.forEach(r=>{const e=this.get(r);e&&s.push(e)}),s}flatten(){return Object.values(this.errors).reduce((t,s)=>t.concat(s),[])}clear(t){const s={};t&&Object.keys(this.errors).forEach(r=>{r!==t&&(s[r]=this.errors[r])}),this.set(s)}}function c(o){return Array.isArray(o)?o:[o]}class i{constructor(t={}){this.axios=l("web"),this.isBusy=!1,this.isDisabled=!1,this.errors=new f,this.originalData=this.deepCopy(t),Object.assign(this,t)}fill(t){this.keys().forEach(s=>{this[s]=t[s]})}setOriginal(){Object.keys(this).filter(t=>!i.ignore.includes(t)).forEach(t=>{this.originalData[t]=this.deepCopy(this[t])})}hasChanged(){return this.keys().some(t=>this[t]!==this.originalData[t])}fillWithKeyValueObject(t){this.keys().forEach(s=>{const r=t.find(e=>e.key===s.toString());r!=null&&(this[s]=r.value)})}data(){return this.keys().reduce((t,s)=>({...t,[s]:this[s]}),{})}keys(){return Object.keys(this).filter(t=>!i.ignore.includes(t))}startProcessing(){this.errors.clear(),this.isBusy=!0}finishProcessing(){this.isBusy=!1}clear(){this.errors.clear()}reset(){Object.keys(this).filter(t=>!i.ignore.includes(t)).forEach(t=>{this[t]=this.deepCopy(this.originalData[t])})}get(t,s={}){return this.submit("get",t,s)}post(t,s={}){return this.submit("post",t,s)}patch(t,s={}){return this.submit("patch",t,s)}put(t,s={}){return this.submit("put",t,s)}delete(t,s={}){return this.submit("delete",t,s)}submit(t,s,r={}){this.startProcessing();const e=t==="get"?{params:this.data()}:this.data();return new Promise((a,u)=>{this.axios.request({url:this.route(s),method:t,data:e,...r}).then(h=>{this.finishProcessing(),a(h)}).catch(h=>{var n;this.isBusy=!1,h.response&&this.errors.set(this.extractErrors(h.response)),((n=h.response)==null?void 0:n.status)!=422&&u(h)})})}upload(t,s={}){return this.startProcessing(),new Promise((r,e)=>{this.axios.post(this.route(t),this.data(),{headers:{"Content-Type":"multipart/form-data"},...s}).then(a=>{this.finishProcessing(),r(a)}).catch(a=>{this.isBusy=!1,a.response&&this.errors.set(this.extractErrors(a.response)),e(a)})})}extractErrors(t){return!t.data||typeof t.data!="object"?{error:i.errorMessage}:t.data.errors?{...t.data.errors}:t.data.message?{error:t.data.message}:{...t.data}}route(t,s={}){let r=t;return i.routes.hasOwnProperty(t)&&(r=decodeURI(i.routes[t])),typeof s!="object"&&(s={id:s}),Object.keys(s).forEach(e=>{r=r.replace(`{${e}}`,s[e])}),r}onKeydown(t){t.target.name&&this.errors.clear(t.target.name)}deepCopy(t){if(t===null||typeof t!="object")return t;const s=Array.isArray(t)?[]:{};return Object.keys(t).forEach(r=>{s[r]=this.deepCopy(t[r])}),s}}i.routes={};i.errorMessage="Something went wrong. Please try again.";i.ignore=["isBusy","isDisabled","errors","originalData","axios"];export{i as F};
import{a4 as l}from"./app-2d89b28f.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */class f{constructor(){this.errors={}}set(t,s){typeof t=="object"?this.errors=t:this.set({...this.errors,[t]:c(s)})}all(){return this.errors}has(t){return this.errors.hasOwnProperty(t)}hasAny(...t){return t.some(s=>this.has(s))}any(){return Object.keys(this.errors).length>0}get(t){if(this.has(t))return this.getAll(t)[0]}getAll(t){return c(this.errors[t]||[])}only(...t){const s=[];return t.forEach(r=>{const e=this.get(r);e&&s.push(e)}),s}flatten(){return Object.values(this.errors).reduce((t,s)=>t.concat(s),[])}clear(t){const s={};t&&Object.keys(this.errors).forEach(r=>{r!==t&&(s[r]=this.errors[r])}),this.set(s)}}function c(o){return Array.isArray(o)?o:[o]}class i{constructor(t={}){this.axios=l("web"),this.isBusy=!1,this.isDisabled=!1,this.errors=new f,this.originalData=this.deepCopy(t),Object.assign(this,t)}fill(t){this.keys().forEach(s=>{this[s]=t[s]})}setOriginal(){Object.keys(this).filter(t=>!i.ignore.includes(t)).forEach(t=>{this.originalData[t]=this.deepCopy(this[t])})}hasChanged(){return this.keys().some(t=>this[t]!==this.originalData[t])}fillWithKeyValueObject(t){this.keys().forEach(s=>{const r=t.find(e=>e.key===s.toString());r!=null&&(this[s]=r.value)})}data(){return this.keys().reduce((t,s)=>({...t,[s]:this[s]}),{})}keys(){return Object.keys(this).filter(t=>!i.ignore.includes(t))}startProcessing(){this.errors.clear(),this.isBusy=!0}finishProcessing(){this.isBusy=!1}clear(){this.errors.clear()}reset(){Object.keys(this).filter(t=>!i.ignore.includes(t)).forEach(t=>{this[t]=this.deepCopy(this.originalData[t])})}get(t,s={}){return this.submit("get",t,s)}post(t,s={}){return this.submit("post",t,s)}patch(t,s={}){return this.submit("patch",t,s)}put(t,s={}){return this.submit("put",t,s)}delete(t,s={}){return this.submit("delete",t,s)}submit(t,s,r={}){this.startProcessing();const e=t==="get"?{params:this.data()}:this.data();return new Promise((a,u)=>{this.axios.request({url:this.route(s),method:t,data:e,...r}).then(h=>{this.finishProcessing(),a(h)}).catch(h=>{var n;this.isBusy=!1,h.response&&this.errors.set(this.extractErrors(h.response)),((n=h.response)==null?void 0:n.status)!=422&&u(h)})})}upload(t,s={}){return this.startProcessing(),new Promise((r,e)=>{this.axios.post(this.route(t),this.data(),{headers:{"Content-Type":"multipart/form-data"},...s}).then(a=>{this.finishProcessing(),r(a)}).catch(a=>{this.isBusy=!1,a.response&&this.errors.set(this.extractErrors(a.response)),e(a)})})}extractErrors(t){return!t.data||typeof t.data!="object"?{error:i.errorMessage}:t.data.errors?{...t.data.errors}:t.data.message?{error:t.data.message}:{...t.data}}route(t,s={}){let r=t;return i.routes.hasOwnProperty(t)&&(r=decodeURI(i.routes[t])),typeof s!="object"&&(s={id:s}),Object.keys(s).forEach(e=>{r=r.replace(`{${e}}`,s[e])}),r}onKeydown(t){t.target.name&&this.errors.clear(t.target.name)}deepCopy(t){if(t===null||typeof t!="object")return t;const s=Array.isArray(t)?[]:{};return Object.keys(t).forEach(r=>{s[r]=this.deepCopy(t[r])}),s}}i.routes={};i.errorMessage="Something went wrong. Please try again.";i.ignore=["isBusy","isDisabled","errors","originalData","axios"];export{i as F};

View File

@ -1 +1 @@
import{u as C,T as $,r as w,o as z,a0 as G,e as c,f as l,k as b,p as u,h as o,t as a,m as s,j as _,i,g as m,F,G as R,n as V,U as N,l as h}from"./app-60af1d1a.js";import{u as E}from"./bus-ab2b6d74.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const I={class:"title has-text-grey-dark"},L={class:"is-size-7-mobile"},T={class:"mt-3 mb-6"},W={key:0},A=["onClick","title"],x={class:"is-family-primary is-size-6 is-size-7-mobile has-text-grey"},M={class:"mt-2 is-size-7 is-pulled-right"},S={key:1,class:"has-text-centered"},U={class:"is-size-4"},J={__name:"Groups",setup(j){C();const t=$(),f=E(),p=w(!1);return z(async()=>{p.value=t.isEmpty,await t.fetch().finally(()=>{p.value=!1})}),G((e,g)=>{var n;e.name=="editGroup"&&(f.editedGroupName=(n=t.items.find(d=>d.id==e.params.groupId))==null?void 0:n.name)}),(e,g)=>{const n=c("FontAwesomeIcon"),d=c("RouterLink"),k=c("ButtonBackCloseCancel"),y=c("VueFooter"),v=c("ResponsiveWidthWrapper");return l(),b(v,null,{default:u(()=>[o("h1",I,a(e.$t("groups.groups")),1),o("div",L,a(e.$t("groups.manage_groups_legend")),1),o("div",T,[s(d,{class:"is-link mt-5",to:{name:"createGroup"}},{default:u(()=>[s(n,{icon:["fas","plus-circle"]}),_(" "+a(e.$t("groups.create_group")),1)]),_:1})]),i(t).isEmpty?h("",!0):(l(),m("div",W,[(l(!0),m(F,null,R(i(t).withoutTheAllGroup,r=>(l(),m("div",{key:r.id,class:"group-item is-size-5 is-size-6-mobile"},[_(a(r.name)+" ",1),s(i(N),null,{default:u(({mode:B})=>[o("button",{class:V(["button tag is-pulled-right",B=="dark"?"is-dark":"is-white"]),onClick:q=>i(t).delete(r.id),title:e.$t("commons.delete")},a(e.$t("commons.delete")),11,A)]),_:2},1024),s(d,{to:{name:"editGroup",params:{groupId:r.id}},class:"has-text-grey px-1",title:e.$t("commons.rename")},{default:u(()=>[s(n,{icon:["fas","pen-square"]})]),_:2},1032,["to","title"]),o("span",x,a(e.$t("groups.x_accounts",{count:r.twofaccounts_count})),1)]))),128)),o("div",M,a(e.$t("groups.deleting_group_does_not_delete_accounts")),1)])),i(p)&&i(t).isEmpty?(l(),m("div",S,[o("span",U,[s(n,{icon:["fas","spinner"],spin:""})])])):h("",!0),s(y,{showButtons:!0},{default:u(()=>[s(k,{returnTo:{name:"accounts"},action:"close"})]),_:1})]),_:1})}}};export{J as default};
import{u as C,T as $,r as w,o as z,a0 as G,e as c,f as l,k as b,p as u,h as o,t as a,m as s,j as _,i,g as m,F,G as R,n as V,U as N,l as h}from"./app-2d89b28f.js";import{u as E}from"./bus-7802a020.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const I={class:"title has-text-grey-dark"},L={class:"is-size-7-mobile"},T={class:"mt-3 mb-6"},W={key:0},A=["onClick","title"],x={class:"is-family-primary is-size-6 is-size-7-mobile has-text-grey"},M={class:"mt-2 is-size-7 is-pulled-right"},S={key:1,class:"has-text-centered"},U={class:"is-size-4"},J={__name:"Groups",setup(j){C();const t=$(),f=E(),p=w(!1);return z(async()=>{p.value=t.isEmpty,await t.fetch().finally(()=>{p.value=!1})}),G((e,g)=>{var n;e.name=="editGroup"&&(f.editedGroupName=(n=t.items.find(d=>d.id==e.params.groupId))==null?void 0:n.name)}),(e,g)=>{const n=c("FontAwesomeIcon"),d=c("RouterLink"),k=c("ButtonBackCloseCancel"),y=c("VueFooter"),v=c("ResponsiveWidthWrapper");return l(),b(v,null,{default:u(()=>[o("h1",I,a(e.$t("groups.groups")),1),o("div",L,a(e.$t("groups.manage_groups_legend")),1),o("div",T,[s(d,{class:"is-link mt-5",to:{name:"createGroup"}},{default:u(()=>[s(n,{icon:["fas","plus-circle"]}),_(" "+a(e.$t("groups.create_group")),1)]),_:1})]),i(t).isEmpty?h("",!0):(l(),m("div",W,[(l(!0),m(F,null,R(i(t).withoutTheAllGroup,r=>(l(),m("div",{key:r.id,class:"group-item is-size-5 is-size-6-mobile"},[_(a(r.name)+" ",1),s(i(N),null,{default:u(({mode:B})=>[o("button",{class:V(["button tag is-pulled-right",B=="dark"?"is-dark":"is-white"]),onClick:q=>i(t).delete(r.id),title:e.$t("commons.delete")},a(e.$t("commons.delete")),11,A)]),_:2},1024),s(d,{to:{name:"editGroup",params:{groupId:r.id}},class:"has-text-grey px-1",title:e.$t("commons.rename")},{default:u(()=>[s(n,{icon:["fas","pen-square"]})]),_:2},1032,["to","title"]),o("span",x,a(e.$t("groups.x_accounts",{count:r.twofaccounts_count})),1)]))),128)),o("div",M,a(e.$t("groups.deleting_group_does_not_delete_accounts")),1)])),i(p)&&i(t).isEmpty?(l(),m("div",S,[o("span",U,[s(n,{icon:["fas","spinner"],spin:""})])])):h("",!0),s(y,{showButtons:!0},{default:u(()=>[s(k,{returnTo:{name:"accounts"},action:"close"})]),_:1})]),_:1})}}};export{J as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{Q as G,b as H,a2 as R,S as J,r as m,o as O,d as Q,J as z,a0 as q,e as _,f as l,g as c,m as n,h as t,p as f,i as o,l as d,t as a,w as X,j as g,F as Y,G as Z,k as ee,U as se,n as A,D as S,I as y}from"./app-60af1d1a.js";import{F as te}from"./Form-0a788c90.js";import{_ as oe}from"./SettingTabs-0b59e581.js";import{S as ne}from"./Spinner-bfa27d3a.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const ae={class:"options-tabs"},ie=["innerHTML"],le={class:"title is-4 has-text-grey-light"},re={class:"is-size-7-mobile"},ce={class:"mt-3"},ue=["onKeyup"],de={key:1},me={class:"tags is-pulled-right"},_e=["onClick"],fe=["onClick","title"],pe={key:1,class:"is-size-7-mobile is-size-6 my-3"},ve={key:2,class:"pat is-family-monospace is-size-6 is-size-7-mobile has-text-success"},he={class:"mt-2 is-size-7 is-pulled-right"},ke={key:0,class:"is-overlay modal-otp modal-background"},ge={class:"main-section"},ye=["onSubmit"],be={class:"field is-grouped"},Te={class:"control"},Ce={class:"control"},ze={__name:"OAuth",setup(we){const x=G("2fauth"),p=H(),E=R(x.prefix+"returnTo","accounts"),{copy:L}=J({legacy:!0}),r=m([]),b=m(!1),T=m(!1),v=m(!1),h=m(null),C=m(null);O(()=>{w()});const u=Q(new te({name:""}));function w(){b.value=!0,z.getPersonalAccessTokens({returnError:!0}).then(e=>{r.value=[],e.data.forEach(i=>{i.id===C.value?(i.value=h.value,r.value.unshift(i)):r.value.push(i)})}).catch(e=>{e.response.status===405?T.value=!0:p.error(e)}).finally(()=>{b.value=!1,C.value=null,h.value=null})}function F(){P(),T.value?p.warn({text:y("errors.unsupported_with_reverseproxy")}):v.value=!0}function M(){u.post("/oauth/personal-access-tokens").then(e=>{h.value=e.data.accessToken,C.value=e.data.token.id,w(),v.value=!1,u.reset()})}function N(e){confirm(y("settings.confirm.revoke"))&&z.deletePersonalAccessToken(e).then(i=>{r.value=r.value.filter(k=>k.id!==e),p.success({text:y("settings.token_revoked")})})}function P(){r.value.forEach(e=>{e.value=null}),h.value=null}function K(e){L(e),p.success({text:y("commons.copied_to_clipboard")})}function I(){v.value=!1,u.reset()}return q(e=>{e.name.startsWith("settings.")||p.clear()}),(e,i)=>{const k=_("FontAwesomeIcon"),U=_("ButtonBackCloseCancel"),W=_("VueFooter"),V=_("FormWrapper"),j=_("FormField"),$=_("VueButton");return l(),c("div",null,[n(oe,{activeTab:"settings.oauth.tokens"},null,8,["activeTab"]),t("div",ae,[n(V,null,{default:f(()=>[o(T)?(l(),c("div",{key:0,class:"notification is-warning has-text-centered",innerHTML:e.$t("auth.auth_handled_by_proxy")},null,8,ie)):d("",!0),t("h4",le,a(e.$t("settings.personal_access_tokens")),1),t("div",re,a(e.$t("settings.token_legend")),1),t("div",ce,[t("a",{tabindex:"0",class:"is-link",onClick:F,onKeyup:X(F,["enter"])},[n(k,{icon:["fas","plus-circle"]}),g(" "+a(e.$t("settings.generate_new_token")),1)],40,ue)]),o(r).length>0?(l(),c("div",de,[(l(!0),c(Y,null,Z(o(r),s=>(l(),c("div",{key:s.id,class:"group-item is-size-5 is-size-6-mobile"},[s.value?(l(),ee(k,{key:0,class:"has-text-success",icon:["fas","check"]})):d("",!0),g(" "+a(s.name)+" ",1),t("div",me,[n(o(se),null,{default:f(({mode:B})=>[s.value?(l(),c("button",{key:0,class:A(["button tag",{"is-link":B!="dark"}]),onClick:S(D=>K(s.value),["stop"])},a(e.$t("commons.copy")),11,_e)):d("",!0),t("button",{class:A(["button tag",B==="dark"?"is-dark":"is-white"]),onClick:D=>N(s.id),title:e.$t("settings.revoke")},a(e.$t("settings.revoke")),11,fe)]),_:2},1024)]),s.value?(l(),c("span",pe,a(e.$t("settings.make_sure_copy_token")),1)):d("",!0),s.value?(l(),c("span",ve,a(s.value),1)):d("",!0)]))),128)),t("div",he,a(e.$t("settings.revoking_a_token_is_permanent")),1)])):d("",!0),n(ne,{isVisible:o(b)&&o(r).length===0},null,8,["isVisible"]),n(W,{showButtons:!0},{default:f(()=>[n(U,{returnTo:{name:o(E)},action:"close"},null,8,["returnTo"])]),_:1})]),_:1})]),o(v)?(l(),c("div",ke,[t("main",ge,[n(V,{title:"settings.forms.new_token"},{default:f(()=>[t("form",{onSubmit:S(M,["prevent"]),onKeydown:i[1]||(i[1]=s=>o(u).onKeydown(s))},[n(j,{modelValue:o(u).name,"onUpdate:modelValue":i[0]||(i[0]=s=>o(u).name=s),fieldName:"name",fieldError:o(u).errors.get("name"),inputType:"text",label:"commons.name",autofocus:""},null,8,["modelValue","fieldError"]),t("div",be,[t("div",Te,[n($,{id:"btnGenerateToken",isLoading:o(u).isBusy},{default:f(()=>[g(a(e.$t("commons.generate")),1)]),_:1},8,["isLoading"])]),t("div",Ce,[n($,{onClick:I,nativeType:"button",id:"btnCancel",color:"is-text"},{default:f(()=>[g(a(e.$t("commons.cancel")),1)]),_:1})])])],40,ye)]),_:1})])])):d("",!0)])}}};export{ze as default};
import{Q as G,b as H,a2 as R,S as J,r as m,o as O,d as Q,J as z,a0 as q,e as _,f as l,g as c,m as n,h as t,p as f,i as o,l as d,t as a,w as X,j as g,F as Y,G as Z,k as ee,U as se,n as A,D as S,I as y}from"./app-2d89b28f.js";import{F as te}from"./Form-5283f7b6.js";import{_ as oe}from"./SettingTabs-708dbaa6.js";import{S as ne}from"./Spinner-aea2b665.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const ae={class:"options-tabs"},ie=["innerHTML"],le={class:"title is-4 has-text-grey-light"},re={class:"is-size-7-mobile"},ce={class:"mt-3"},ue=["onKeyup"],de={key:1},me={class:"tags is-pulled-right"},_e=["onClick"],fe=["onClick","title"],pe={key:1,class:"is-size-7-mobile is-size-6 my-3"},ve={key:2,class:"pat is-family-monospace is-size-6 is-size-7-mobile has-text-success"},he={class:"mt-2 is-size-7 is-pulled-right"},ke={key:0,class:"is-overlay modal-otp modal-background"},ge={class:"main-section"},ye=["onSubmit"],be={class:"field is-grouped"},Te={class:"control"},Ce={class:"control"},ze={__name:"OAuth",setup(we){const x=G("2fauth"),p=H(),E=R(x.prefix+"returnTo","accounts"),{copy:L}=J({legacy:!0}),r=m([]),b=m(!1),T=m(!1),v=m(!1),h=m(null),C=m(null);O(()=>{w()});const u=Q(new te({name:""}));function w(){b.value=!0,z.getPersonalAccessTokens({returnError:!0}).then(e=>{r.value=[],e.data.forEach(i=>{i.id===C.value?(i.value=h.value,r.value.unshift(i)):r.value.push(i)})}).catch(e=>{e.response.status===405?T.value=!0:p.error(e)}).finally(()=>{b.value=!1,C.value=null,h.value=null})}function F(){P(),T.value?p.warn({text:y("errors.unsupported_with_reverseproxy")}):v.value=!0}function M(){u.post("/oauth/personal-access-tokens").then(e=>{h.value=e.data.accessToken,C.value=e.data.token.id,w(),v.value=!1,u.reset()})}function N(e){confirm(y("settings.confirm.revoke"))&&z.deletePersonalAccessToken(e).then(i=>{r.value=r.value.filter(k=>k.id!==e),p.success({text:y("settings.token_revoked")})})}function P(){r.value.forEach(e=>{e.value=null}),h.value=null}function K(e){L(e),p.success({text:y("commons.copied_to_clipboard")})}function I(){v.value=!1,u.reset()}return q(e=>{e.name.startsWith("settings.")||p.clear()}),(e,i)=>{const k=_("FontAwesomeIcon"),U=_("ButtonBackCloseCancel"),W=_("VueFooter"),V=_("FormWrapper"),j=_("FormField"),$=_("VueButton");return l(),c("div",null,[n(oe,{activeTab:"settings.oauth.tokens"},null,8,["activeTab"]),t("div",ae,[n(V,null,{default:f(()=>[o(T)?(l(),c("div",{key:0,class:"notification is-warning has-text-centered",innerHTML:e.$t("auth.auth_handled_by_proxy")},null,8,ie)):d("",!0),t("h4",le,a(e.$t("settings.personal_access_tokens")),1),t("div",re,a(e.$t("settings.token_legend")),1),t("div",ce,[t("a",{tabindex:"0",class:"is-link",onClick:F,onKeyup:X(F,["enter"])},[n(k,{icon:["fas","plus-circle"]}),g(" "+a(e.$t("settings.generate_new_token")),1)],40,ue)]),o(r).length>0?(l(),c("div",de,[(l(!0),c(Y,null,Z(o(r),s=>(l(),c("div",{key:s.id,class:"group-item is-size-5 is-size-6-mobile"},[s.value?(l(),ee(k,{key:0,class:"has-text-success",icon:["fas","check"]})):d("",!0),g(" "+a(s.name)+" ",1),t("div",me,[n(o(se),null,{default:f(({mode:B})=>[s.value?(l(),c("button",{key:0,class:A(["button tag",{"is-link":B!="dark"}]),onClick:S(D=>K(s.value),["stop"])},a(e.$t("commons.copy")),11,_e)):d("",!0),t("button",{class:A(["button tag",B==="dark"?"is-dark":"is-white"]),onClick:D=>N(s.id),title:e.$t("settings.revoke")},a(e.$t("settings.revoke")),11,fe)]),_:2},1024)]),s.value?(l(),c("span",pe,a(e.$t("settings.make_sure_copy_token")),1)):d("",!0),s.value?(l(),c("span",ve,a(s.value),1)):d("",!0)]))),128)),t("div",he,a(e.$t("settings.revoking_a_token_is_permanent")),1)])):d("",!0),n(ne,{isVisible:o(b)&&o(r).length===0},null,8,["isVisible"]),n(W,{showButtons:!0},{default:f(()=>[n(U,{returnTo:{name:o(E)},action:"close"},null,8,["returnTo"])]),_:1})]),_:1})]),o(v)?(l(),c("div",ke,[t("main",ge,[n(V,{title:"settings.forms.new_token"},{default:f(()=>[t("form",{onSubmit:S(M,["prevent"]),onKeydown:i[1]||(i[1]=s=>o(u).onKeydown(s))},[n(j,{modelValue:o(u).name,"onUpdate:modelValue":i[0]||(i[0]=s=>o(u).name=s),fieldName:"name",fieldError:o(u).errors.get("name"),inputType:"text",label:"commons.name",autofocus:""},null,8,["modelValue","fieldError"]),t("div",be,[t("div",Te,[n($,{id:"btnGenerateToken",isLoading:o(u).isBusy},{default:f(()=>[g(a(e.$t("commons.generate")),1)]),_:1},8,["isLoading"])]),t("div",Ce,[n($,{onClick:I,nativeType:"button",id:"btnCancel",color:"is-text"},{default:f(()=>[g(a(e.$t("commons.cancel")),1)]),_:1})])])],40,ye)]),_:1})])])):d("",!0)])}}};export{ze as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{u as _,_ as m,r as p,$ as f,K as h,e as c,f as n,g as r,h as a,i as t,l as B,m as s,p as g}from"./app-60af1d1a.js";import{S as k}from"./Spinner-bfa27d3a.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const v={class:"modal modal-otp is-active"},C=a("div",{class:"modal-background"},null,-1),V={class:"modal-content"},w={class:"has-text-centered m-5"},b=["src","alt"],F={__name:"QRcode",setup(y){_();const l=m(),e=p();f(()=>{i()});async function i(){const{data:o}=await h.getQrcode(l.params.twofaccountId);e.value=o.qrcode}return(o,R)=>{const u=c("ButtonBackCloseCancel"),d=c("VueFooter");return n(),r("div",v,[C,a("div",V,[a("p",w,[t(e)?(n(),r("img",{key:0,src:t(e),class:"has-background-light",alt:o.$t("commons.image_of_qrcode_to_scan")},null,8,b)):B("",!0),s(k,{isVisible:!t(e),type:"raw",class:"is-size-1"},null,8,["isVisible"])])]),s(d,{showButtons:!0,internalFooterType:"modal"},{default:g(()=>[s(u,{returnTo:{name:"accounts"},action:"close"})]),_:1})])}}};export{F as default};
import{u as _,_ as m,r as p,$ as f,K as h,e as c,f as n,g as r,h as a,i as t,l as B,m as s,p as g}from"./app-2d89b28f.js";import{S as k}from"./Spinner-aea2b665.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const v={class:"modal modal-otp is-active"},C=a("div",{class:"modal-background"},null,-1),V={class:"modal-content"},w={class:"has-text-centered m-5"},b=["src","alt"],F={__name:"QRcode",setup(y){_();const l=m(),e=p();f(()=>{i()});async function i(){const{data:o}=await h.getQrcode(l.params.twofaccountId);e.value=o.qrcode}return(o,R)=>{const u=c("ButtonBackCloseCancel"),d=c("VueFooter");return n(),r("div",v,[C,a("div",V,[a("p",w,[t(e)?(n(),r("img",{key:0,src:t(e),class:"has-background-light",alt:o.$t("commons.image_of_qrcode_to_scan")},null,8,b)):B("",!0),s(k,{isVisible:!t(e),type:"raw",class:"is-size-1"},null,8,["isVisible"])])]),s(d,{showButtons:!0,internalFooterType:"modal"},{default:g(()=>[s(u,{returnTo:{name:"accounts"},action:"close"})]),_:1})])}}};export{F as default};

View File

@ -1 +1 @@
import{S as h,b as v,e as w,f as r,g as l,h as n,t as s,m as c,p as _,n as y,i as d,I as u,U as g,D as q,l as m,F as $}from"./app-60af1d1a.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const x=n("div",{class:"too-bad"},null,-1),E={class:"block"},I={key:0,class:"block has-text-link"},B={class:"button is-link is-outlined is-rounded"},F={class:"icon is-small"},S={__name:"QrContentDisplay",props:{qrContent:String},setup(o){const{copy:b}=h({legacy:!0}),k=v();function p(t){var e=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/,a=new RegExp(e);return a.test(t)}function C(t){const e=document.createElement("a");e.setAttribute("href",t),e.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0}))}function f(t){b(t),k.success({text:u("commons.copied_to_clipboard")})}return(t,e)=>{const a=w("FontAwesomeIcon");return r(),l($,null,[x,n("div",E,s(t.$t("errors.data_of_qrcode_is_not_valid_URI")),1),c(d(g),null,{default:_(({mode:i})=>[n("div",{class:y(["block mb-6",i=="dark"?"has-text-light":"has-text-grey-dark"])},s(o.qrContent?o.qrContent:"["+("trans"in t?t.trans:d(u))("commons.nothing")+"]"),3)]),_:1}),o.qrContent?(r(),l("div",I,[n("button",{class:"button is-link is-outlined is-rounded",onClick:e[0]||(e[0]=q(i=>f(o.qrContent),["stop"]))},s(t.$t("commons.copy_to_clipboard")),1)])):m("",!0),p(o.qrContent)?(r(),l("div",{key:1,class:"block has-text-link",onClick:e[1]||(e[1]=i=>C(o.qrContent))},[n("button",B,[n("span",null,s(t.$t("commons.open_in_browser")),1),n("span",F,[c(a,{icon:["fas","external-link-alt"]})])])])):m("",!0)],64)}}};export{S as _};
import{S as h,b as v,e as w,f as r,g as l,h as n,t as s,m as c,p as _,n as y,i as d,I as u,U as g,D as q,l as m,F as $}from"./app-2d89b28f.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const x=n("div",{class:"too-bad"},null,-1),E={class:"block"},I={key:0,class:"block has-text-link"},B={class:"button is-link is-outlined is-rounded"},F={class:"icon is-small"},S={__name:"QrContentDisplay",props:{qrContent:String},setup(o){const{copy:b}=h({legacy:!0}),k=v();function p(t){var e=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/,a=new RegExp(e);return a.test(t)}function C(t){const e=document.createElement("a");e.setAttribute("href",t),e.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0}))}function f(t){b(t),k.success({text:u("commons.copied_to_clipboard")})}return(t,e)=>{const a=w("FontAwesomeIcon");return r(),l($,null,[x,n("div",E,s(t.$t("errors.data_of_qrcode_is_not_valid_URI")),1),c(d(g),null,{default:_(({mode:i})=>[n("div",{class:y(["block mb-6",i=="dark"?"has-text-light":"has-text-grey-dark"])},s(o.qrContent?o.qrContent:"["+("trans"in t?t.trans:d(u))("commons.nothing")+"]"),3)]),_:1}),o.qrContent?(r(),l("div",I,[n("button",{class:"button is-link is-outlined is-rounded",onClick:e[0]||(e[0]=q(i=>f(o.qrContent),["stop"]))},s(t.$t("commons.copy_to_clipboard")),1)])):m("",!0),p(o.qrContent)?(r(),l("div",{key:1,class:"block has-text-link",onClick:e[1]||(e[1]=i=>C(o.qrContent))},[n("button",B,[n("span",null,s(t.$t("commons.open_in_browser")),1),n("span",F,[c(a,{icon:["fas","external-link-alt"]})])])])):m("",!0)],64)}}};export{S as _};

View File

@ -1 +1 @@
import{Q as V,b as B,u as R,_ as g,a2 as $,d as N,a0 as C,e as a,f as D,k as S,p as d,h as u,D as q,i as s,m as l,j as c,t as m,I as A}from"./app-60af1d1a.js";import{F as L}from"./Form-0a788c90.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const W=["onSubmit"],x={class:"field"},I={__name:"Recover",setup(E){const p=V("2fauth"),r=B(),f=R(),i=g(),h=$(p.prefix+"showWebauthnForm",!1),o=N(new L({email:i.query.email,password:"",token:i.query.token,revokeAll:!1}));function _(t){r.clear(),o.post("/webauthn/recover",{returnError:!0}).then(e=>{h.value=!1,f.push({name:"login"})}).catch(e=>{e.response.status===401?r.alert({text:A("auth.forms.authentication_failed"),duration:-1}):e.response.status===422?r.alert({text:e.response.data.message,duration:-1}):r.error(e)})}return C(()=>{r.clear()}),(t,e)=>{const w=a("FormCheckbox"),b=a("FormPasswordField"),v=a("RouterLink"),F=a("FormButtons"),k=a("VueFooter"),y=a("FormWrapper");return D(),S(y,{title:t.$t("auth.webauthn.account_recovery"),punchline:t.$t("auth.webauthn.recover_account_instructions")},{default:d(()=>[u("div",null,[u("form",{onSubmit:q(_,["prevent"]),onKeydown:e[2]||(e[2]=n=>s(o).onKeydown(n))},[l(w,{modelValue:s(o).revokeAll,"onUpdate:modelValue":e[0]||(e[0]=n=>s(o).revokeAll=n),fieldName:"revokeAll",label:"auth.webauthn.disable_all_security_devices",help:"auth.webauthn.disable_all_security_devices_help"},null,8,["modelValue"]),l(b,{modelValue:s(o).password,"onUpdate:modelValue":e[1]||(e[1]=n=>s(o).password=n),fieldName:"password",fieldError:s(o).errors.get("password"),autocomplete:"current-password",showRules:!1,label:"auth.forms.current_password.label",help:"auth.forms.current_password.help"},null,8,["modelValue","fieldError"]),u("div",x,[u("p",null,[c(m(t.$t("auth.forms.forgot_your_password"))+"  ",1),l(v,{id:"lnkResetPwd",to:{name:"password.request"},class:"is-link","aria-label":t.$t("auth.forms.reset_your_password")},{default:d(()=>[c(m(t.$t("auth.forms.request_password_reset")),1)]),_:1},8,["to","aria-label"])])]),l(F,{submitId:"btnRecover",isBusy:s(o).isBusy,isDisabled:s(o).isDisabled,caption:t.$t("commons.continue"),showCancelButton:!0,cancelLandingView:"login"},null,8,["isBusy","isDisabled","caption"])],40,W)]),l(k)]),_:1},8,["title","punchline"])}}};export{I as default};
import{Q as V,b as B,u as R,_ as g,a2 as $,d as N,a0 as C,e as a,f as D,k as S,p as d,h as u,D as q,i as s,m as l,j as c,t as m,I as A}from"./app-2d89b28f.js";import{F as L}from"./Form-5283f7b6.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const W=["onSubmit"],x={class:"field"},I={__name:"Recover",setup(E){const p=V("2fauth"),r=B(),f=R(),i=g(),h=$(p.prefix+"showWebauthnForm",!1),o=N(new L({email:i.query.email,password:"",token:i.query.token,revokeAll:!1}));function _(t){r.clear(),o.post("/webauthn/recover",{returnError:!0}).then(e=>{h.value=!1,f.push({name:"login"})}).catch(e=>{e.response.status===401?r.alert({text:A("auth.forms.authentication_failed"),duration:-1}):e.response.status===422?r.alert({text:e.response.data.message,duration:-1}):r.error(e)})}return C(()=>{r.clear()}),(t,e)=>{const w=a("FormCheckbox"),b=a("FormPasswordField"),v=a("RouterLink"),F=a("FormButtons"),k=a("VueFooter"),y=a("FormWrapper");return D(),S(y,{title:t.$t("auth.webauthn.account_recovery"),punchline:t.$t("auth.webauthn.recover_account_instructions")},{default:d(()=>[u("div",null,[u("form",{onSubmit:q(_,["prevent"]),onKeydown:e[2]||(e[2]=n=>s(o).onKeydown(n))},[l(w,{modelValue:s(o).revokeAll,"onUpdate:modelValue":e[0]||(e[0]=n=>s(o).revokeAll=n),fieldName:"revokeAll",label:"auth.webauthn.disable_all_security_devices",help:"auth.webauthn.disable_all_security_devices_help"},null,8,["modelValue"]),l(b,{modelValue:s(o).password,"onUpdate:modelValue":e[1]||(e[1]=n=>s(o).password=n),fieldName:"password",fieldError:s(o).errors.get("password"),autocomplete:"current-password",showRules:!1,label:"auth.forms.current_password.label",help:"auth.forms.current_password.help"},null,8,["modelValue","fieldError"]),u("div",x,[u("p",null,[c(m(t.$t("auth.forms.forgot_your_password"))+"  ",1),l(v,{id:"lnkResetPwd",to:{name:"password.request"},class:"is-link","aria-label":t.$t("auth.forms.reset_your_password")},{default:d(()=>[c(m(t.$t("auth.forms.request_password_reset")),1)]),_:1},8,["to","aria-label"])])]),l(F,{submitId:"btnRecover",isBusy:s(o).isBusy,isDisabled:s(o).isDisabled,caption:t.$t("commons.continue"),showCancelButton:!0,cancelLandingView:"login"},null,8,["isBusy","isDisabled","caption"])],40,W)]),l(k)]),_:1},8,["title","punchline"])}}};export{I as default};

View File

@ -1 +1 @@
import{a as T,b as C,u as I,r as F,d as k,a0 as K,e as l,f as u,g as _,i as t,k as V,p as c,m as n,h as i,j as p,t as d,D,I as U}from"./app-60af1d1a.js";import{F as B}from"./Form-0a788c90.js";import{w as W}from"./webauthnService-1f4ca5dc.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const P={key:0,class:"field"},M={id:"lblDeviceRegistrationSuccess",class:"label mb-5"},j=["onSubmit"],A={key:1,class:"field is-grouped"},J={class:"control"},O={class:"control"},Y=["onSubmit"],q={class:"nav-links"},X={__name:"Register",setup(z){const b=T(),m=C(),R=I(),w=F(!1),f=F(null),s=k(new B({name:"",email:"",password:"",password_confirmation:""})),r=k(new B({name:""}));async function S(o){s.password_confirmation=s.password,s.post("/user").then(e=>{b.$patch({name:e.data.name,email:e.data.email,preferences:e.data.preferences,isAdmin:e.data.is_admin??!1}),b.applyTheme(),w.value=!0})}function N(){W.register().then(o=>{const e=JSON.parse(o.config.data);f.value=e.id}).catch(o=>{o.response.status===422?m.alert({text:o.response.data.message}):m.error(o)})}function E(o){r.patch("/webauthn/credentials/"+f.value+"/name").then(()=>{m.success({text:U("auth.webauthn.device_successfully_registered")}),R.push({name:"accounts"})})}return K(()=>{m.clear()}),(o,e)=>{const $=l("font-awesome-icon"),h=l("FormField"),g=l("FormButtons"),y=l("RouterLink"),v=l("FormWrapper"),x=l("FormPasswordField"),L=l("VueFooter");return u(),_("div",null,[t(w)?(u(),V(v,{key:0,title:"auth.authentication",punchline:"auth.webauthn.enhance_security_using_webauthn"},{default:c(()=>[t(f)?(u(),_("div",P,[i("label",M,[p(d(o.$t("auth.webauthn.device_successfully_registered"))+" ",1),n($,{icon:["fas","check"]})]),i("form",{onSubmit:D(E,["prevent"]),onKeydown:e[1]||(e[1]=a=>t(r).onKeydown(a))},[n(h,{modelValue:t(r).name,"onUpdate:modelValue":e[0]||(e[0]=a=>t(r).name=a),fieldName:"name",fieldError:t(r).errors.get("name"),inputType:"text",placeholder:"iPhone 12, TouchID, Yubikey 5C",label:"auth.forms.name_this_device"},null,8,["modelValue","fieldError"]),n(g,{isBusy:t(r).isBusy,isDisabled:t(r).isDisabled,caption:"commons.continue"},null,8,["isBusy","isDisabled"])],40,j)])):(u(),_("div",A,[i("div",J,[i("button",{type:"button",id:"btnRegisterNewDevice",onClick:e[2]||(e[2]=a=>N()),class:"button is-link"},d(o.$t("auth.webauthn.register_a_device")),1)]),i("div",O,[n(y,{id:"btnMaybeLater",to:{name:"accounts"},class:"button is-text"},{default:c(()=>[p(d(o.$t("auth.maybe_later")),1)]),_:1})])]))]),_:1})):(u(),V(v,{key:1,title:"auth.register",punchline:"auth.forms.register_punchline"},{default:c(()=>[i("form",{onSubmit:D(S,["prevent"]),onKeydown:e[6]||(e[6]=a=>t(s).onKeydown(a))},[n(h,{modelValue:t(s).name,"onUpdate:modelValue":e[3]||(e[3]=a=>t(s).name=a),fieldName:"name",fieldError:t(s).errors.get("name"),inputType:"text",label:"auth.forms.name",maxLength:255,autofocus:""},null,8,["modelValue","fieldError"]),n(h,{modelValue:t(s).email,"onUpdate:modelValue":e[4]||(e[4]=a=>t(s).email=a),fieldName:"email",fieldError:t(s).errors.get("email"),inputType:"email",label:"auth.forms.email",maxLength:255},null,8,["modelValue","fieldError"]),n(x,{modelValue:t(s).password,"onUpdate:modelValue":e[5]||(e[5]=a=>t(s).password=a),fieldName:"password",fieldError:t(s).errors.get("password"),showRules:!0,label:"auth.forms.password"},null,8,["modelValue","fieldError"]),n(g,{isBusy:t(s).isBusy,isDisabled:t(s).isDisabled,caption:"auth.register",submitId:"btnRegister"},null,8,["isBusy","isDisabled"])],40,Y),i("div",q,[i("p",null,[p(d(o.$t("auth.forms.already_register"))+" ",1),n(y,{id:"lnkSignIn",to:{name:"login"},class:"is-link"},{default:c(()=>[p(d(o.$t("auth.sign_in")),1)]),_:1})])])]),_:1})),n(L)])}}};export{X as default};
import{a as T,b as C,u as I,r as F,d as k,a0 as K,e as l,f as u,g as _,i as t,k as V,p as c,m as n,h as i,j as p,t as d,D,I as U}from"./app-2d89b28f.js";import{F as B}from"./Form-5283f7b6.js";import{w as W}from"./webauthnService-43ef310f.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const P={key:0,class:"field"},M={id:"lblDeviceRegistrationSuccess",class:"label mb-5"},j=["onSubmit"],A={key:1,class:"field is-grouped"},J={class:"control"},O={class:"control"},Y=["onSubmit"],q={class:"nav-links"},X={__name:"Register",setup(z){const b=T(),m=C(),R=I(),w=F(!1),f=F(null),s=k(new B({name:"",email:"",password:"",password_confirmation:""})),r=k(new B({name:""}));async function S(o){s.password_confirmation=s.password,s.post("/user").then(e=>{b.$patch({name:e.data.name,email:e.data.email,preferences:e.data.preferences,isAdmin:e.data.is_admin??!1}),b.applyTheme(),w.value=!0})}function N(){W.register().then(o=>{const e=JSON.parse(o.config.data);f.value=e.id}).catch(o=>{o.response.status===422?m.alert({text:o.response.data.message}):m.error(o)})}function E(o){r.patch("/webauthn/credentials/"+f.value+"/name").then(()=>{m.success({text:U("auth.webauthn.device_successfully_registered")}),R.push({name:"accounts"})})}return K(()=>{m.clear()}),(o,e)=>{const $=l("font-awesome-icon"),h=l("FormField"),g=l("FormButtons"),y=l("RouterLink"),v=l("FormWrapper"),x=l("FormPasswordField"),L=l("VueFooter");return u(),_("div",null,[t(w)?(u(),V(v,{key:0,title:"auth.authentication",punchline:"auth.webauthn.enhance_security_using_webauthn"},{default:c(()=>[t(f)?(u(),_("div",P,[i("label",M,[p(d(o.$t("auth.webauthn.device_successfully_registered"))+" ",1),n($,{icon:["fas","check"]})]),i("form",{onSubmit:D(E,["prevent"]),onKeydown:e[1]||(e[1]=a=>t(r).onKeydown(a))},[n(h,{modelValue:t(r).name,"onUpdate:modelValue":e[0]||(e[0]=a=>t(r).name=a),fieldName:"name",fieldError:t(r).errors.get("name"),inputType:"text",placeholder:"iPhone 12, TouchID, Yubikey 5C",label:"auth.forms.name_this_device"},null,8,["modelValue","fieldError"]),n(g,{isBusy:t(r).isBusy,isDisabled:t(r).isDisabled,caption:"commons.continue"},null,8,["isBusy","isDisabled"])],40,j)])):(u(),_("div",A,[i("div",J,[i("button",{type:"button",id:"btnRegisterNewDevice",onClick:e[2]||(e[2]=a=>N()),class:"button is-link"},d(o.$t("auth.webauthn.register_a_device")),1)]),i("div",O,[n(y,{id:"btnMaybeLater",to:{name:"accounts"},class:"button is-text"},{default:c(()=>[p(d(o.$t("auth.maybe_later")),1)]),_:1})])]))]),_:1})):(u(),V(v,{key:1,title:"auth.register",punchline:"auth.forms.register_punchline"},{default:c(()=>[i("form",{onSubmit:D(S,["prevent"]),onKeydown:e[6]||(e[6]=a=>t(s).onKeydown(a))},[n(h,{modelValue:t(s).name,"onUpdate:modelValue":e[3]||(e[3]=a=>t(s).name=a),fieldName:"name",fieldError:t(s).errors.get("name"),inputType:"text",label:"auth.forms.name",maxLength:255,autofocus:""},null,8,["modelValue","fieldError"]),n(h,{modelValue:t(s).email,"onUpdate:modelValue":e[4]||(e[4]=a=>t(s).email=a),fieldName:"email",fieldError:t(s).errors.get("email"),inputType:"email",label:"auth.forms.email",maxLength:255},null,8,["modelValue","fieldError"]),n(x,{modelValue:t(s).password,"onUpdate:modelValue":e[5]||(e[5]=a=>t(s).password=a),fieldName:"password",fieldError:t(s).errors.get("password"),showRules:!0,label:"auth.forms.password"},null,8,["modelValue","fieldError"]),n(g,{isBusy:t(s).isBusy,isDisabled:t(s).isDisabled,caption:"auth.register",submitId:"btnRegister"},null,8,["isBusy","isDisabled"])],40,Y),i("div",q,[i("p",null,[p(d(o.$t("auth.forms.already_register"))+" ",1),n(y,{id:"lnkSignIn",to:{name:"login"},class:"is-link"},{default:c(()=>[p(d(o.$t("auth.sign_in")),1)]),_:1})])])]),_:1})),n(L)])}}};export{X as default};

View File

@ -1 +1 @@
import{b as f,_,d as h,a0 as w,e as r,f as F,k as b,p as y,h as B,m as i,i as s,D as V}from"./app-60af1d1a.js";import{F as v}from"./Form-0a788c90.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const R=["onSubmit"],S={__name:"RequestReset",setup(k){const o=f(),n=_().name=="webauthn.lost",t=h(new v({email:""}));function l(a){o.clear(),t.post(n?"/webauthn/lost":"/user/password/lost",{returnError:!0}).then(e=>{o.success({text:e.data.message,duration:-1})}).catch(e=>{e.response.data.requestFailed?o.alert({text:e.response.data.requestFailed,duration:-1}):e.response.status!==422&&o.error(e)})}return w(()=>{o.clear()}),(a,e)=>{const m=r("FormField"),c=r("FormButtons"),d=r("VueFooter"),p=r("FormWrapper");return F(),b(p,{title:a.$t(n?"auth.webauthn.account_recovery":"auth.forms.reset_password"),punchline:a.$t(n?"auth.webauthn.recovery_punchline":"auth.forms.reset_punchline")},{default:y(()=>[B("form",{onSubmit:V(l,["prevent"]),onKeydown:e[1]||(e[1]=u=>s(t).onKeydown(u))},[i(m,{modelValue:s(t).email,"onUpdate:modelValue":e[0]||(e[0]=u=>s(t).email=u),fieldName:"email",fieldError:s(t).errors.get("email"),label:"auth.forms.email",autofocus:""},null,8,["modelValue","fieldError"]),i(c,{submitId:"btnSendResetPwd",isBusy:s(t).isBusy,caption:a.$t(n?"auth.webauthn.send_recovery_link":"auth.forms.send_password_reset_link"),showCancelButton:!0,cancelLandingView:"login"},null,8,["isBusy","caption"])],40,R),i(d)]),_:1},8,["title","punchline"])}}};export{S as default};
import{b as f,_,d as h,a0 as w,e as r,f as F,k as b,p as y,h as B,m as i,i as s,D as V}from"./app-2d89b28f.js";import{F as v}from"./Form-5283f7b6.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const R=["onSubmit"],S={__name:"RequestReset",setup(k){const o=f(),n=_().name=="webauthn.lost",t=h(new v({email:""}));function l(a){o.clear(),t.post(n?"/webauthn/lost":"/user/password/lost",{returnError:!0}).then(e=>{o.success({text:e.data.message,duration:-1})}).catch(e=>{e.response.data.requestFailed?o.alert({text:e.response.data.requestFailed,duration:-1}):e.response.status!==422&&o.error(e)})}return w(()=>{o.clear()}),(a,e)=>{const m=r("FormField"),c=r("FormButtons"),d=r("VueFooter"),p=r("FormWrapper");return F(),b(p,{title:a.$t(n?"auth.webauthn.account_recovery":"auth.forms.reset_password"),punchline:a.$t(n?"auth.webauthn.recovery_punchline":"auth.forms.reset_punchline")},{default:y(()=>[B("form",{onSubmit:V(l,["prevent"]),onKeydown:e[1]||(e[1]=u=>s(t).onKeydown(u))},[i(m,{modelValue:s(t).email,"onUpdate:modelValue":e[0]||(e[0]=u=>s(t).email=u),fieldName:"email",fieldError:s(t).errors.get("email"),label:"auth.forms.email",autofocus:""},null,8,["modelValue","fieldError"]),i(c,{submitId:"btnSendResetPwd",isBusy:s(t).isBusy,caption:a.$t(n?"auth.webauthn.send_recovery_link":"auth.forms.send_password_reset_link"),showCancelButton:!0,cancelLandingView:"login"},null,8,["isBusy","caption"])],40,R),i(d)]),_:1},8,["title","punchline"])}}};export{S as default};

View File

@ -1 +1 @@
import{b as g,u as B,_ as h,r as R,d as E,a0 as N,e as s,f as i,k as l,p as c,h as v,m as d,i as t,l as m,j as C,t as P,D as L}from"./app-60af1d1a.js";import{F as S}from"./Form-0a788c90.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const x=["onSubmit"],K={__name:"Reset",setup(D){const a=g();B();const p=h(),u=R(!0),e=E(new S({email:p.query.email,password:"",password_confirmation:"",token:p.query.token}));function f(n){e.password_confirmation=e.password,e.post("/user/password/reset",{returnError:!0}).then(o=>{e.password="",e.password_confirmation="",u.value=!1,a.success({text:o.data.message,duration:-1})}).catch(o=>{o.response.data.resetFailed?a.alert({text:o.response.data.resetFailed,duration:-1}):o.response.status!==422&&a.error(o)})}return N(()=>{a.clear()}),(n,o)=>{const w=s("FormField"),_=s("FormPasswordField"),F=s("FieldError"),k=s("FormButtons"),y=s("RouterLink"),V=s("VueFooter"),b=s("FormWrapper");return i(),l(b,{title:n.$t("auth.forms.new_password")},{default:c(()=>[v("form",{onSubmit:L(f,["prevent"]),onKeydown:o[2]||(o[2]=r=>t(e).onKeydown(r))},[d(w,{modelValue:t(e).email,"onUpdate:modelValue":o[0]||(o[0]=r=>t(e).email=r),isDisabled:!0,fieldName:"email",fieldError:t(e).errors.get("email"),label:"auth.forms.email",autofocus:""},null,8,["modelValue","fieldError"]),d(_,{modelValue:t(e).password,"onUpdate:modelValue":o[1]||(o[1]=r=>t(e).password=r),fieldName:"password",fieldError:t(e).errors.get("password"),autocomplete:"new-password",showRules:!0,label:"auth.forms.new_password"},null,8,["modelValue","fieldError"]),t(e).errors.get("token")!=null?(i(),l(F,{key:0,error:t(e).errors.get("token"),field:t(e).token},null,8,["error","field"])):m("",!0),t(u)?(i(),l(k,{key:1,submitId:"btnResetPwd",isBusy:t(e).isBusy,caption:n.$t("auth.forms.change_password"),showCancelButton:!0,cancelLandingView:"login"},null,8,["isBusy","caption"])):m("",!0),t(u)?m("",!0):(i(),l(y,{key:2,id:"btnContinue",to:{name:"accounts"},class:"button is-link"},{default:c(()=>[C(P(n.$t("commons.continue")),1)]),_:1}))],40,x),d(V)]),_:1},8,["title"])}}};export{K as default};
import{b as g,u as B,_ as h,r as R,d as E,a0 as N,e as s,f as i,k as l,p as c,h as v,m as d,i as t,l as m,j as C,t as P,D as L}from"./app-2d89b28f.js";import{F as S}from"./Form-5283f7b6.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const x=["onSubmit"],K={__name:"Reset",setup(D){const a=g();B();const p=h(),u=R(!0),e=E(new S({email:p.query.email,password:"",password_confirmation:"",token:p.query.token}));function f(n){e.password_confirmation=e.password,e.post("/user/password/reset",{returnError:!0}).then(o=>{e.password="",e.password_confirmation="",u.value=!1,a.success({text:o.data.message,duration:-1})}).catch(o=>{o.response.data.resetFailed?a.alert({text:o.response.data.resetFailed,duration:-1}):o.response.status!==422&&a.error(o)})}return N(()=>{a.clear()}),(n,o)=>{const w=s("FormField"),_=s("FormPasswordField"),F=s("FieldError"),k=s("FormButtons"),y=s("RouterLink"),V=s("VueFooter"),b=s("FormWrapper");return i(),l(b,{title:n.$t("auth.forms.new_password")},{default:c(()=>[v("form",{onSubmit:L(f,["prevent"]),onKeydown:o[2]||(o[2]=r=>t(e).onKeydown(r))},[d(w,{modelValue:t(e).email,"onUpdate:modelValue":o[0]||(o[0]=r=>t(e).email=r),isDisabled:!0,fieldName:"email",fieldError:t(e).errors.get("email"),label:"auth.forms.email",autofocus:""},null,8,["modelValue","fieldError"]),d(_,{modelValue:t(e).password,"onUpdate:modelValue":o[1]||(o[1]=r=>t(e).password=r),fieldName:"password",fieldError:t(e).errors.get("password"),autocomplete:"new-password",showRules:!0,label:"auth.forms.new_password"},null,8,["modelValue","fieldError"]),t(e).errors.get("token")!=null?(i(),l(F,{key:0,error:t(e).errors.get("token"),field:t(e).token},null,8,["error","field"])):m("",!0),t(u)?(i(),l(k,{key:1,submitId:"btnResetPwd",isBusy:t(e).isBusy,caption:n.$t("auth.forms.change_password"),showCancelButton:!0,cancelLandingView:"login"},null,8,["isBusy","caption"])):m("",!0),t(u)?m("",!0):(i(),l(y,{key:2,id:"btnContinue",to:{name:"accounts"},class:"button is-link"},{default:c(()=>[C(P(n.$t("commons.continue")),1)]),_:1}))],40,x),d(V)]),_:1},8,["title"])}}};export{K as default};

View File

@ -1 +1 @@
import{r as d,o as u,s as h,e as m,f as n,g as c,h as a,n as k,k as p}from"./app-60af1d1a.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const y={role:"search",class:"field"},f={class:"control has-icons-right"},v=["aria-label","title","placeholder","value"],g={class:"icon is-small is-right"},w=["title"],b={__name:"SearchBox",props:{keyword:String,hasNoBackground:{type:Boolean,default:!1},placeholder:String},setup(t){const s=d(null);u(()=>{document.addEventListener("keydown",r)}),h(()=>{document.removeEventListener("keydown",r)});function r(e){var o;e.key==="f"&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),(o=s.value)==null||o.focus())}return(e,o)=>{const i=m("FontAwesomeIcon");return n(),c("div",y,[a("div",f,[a("input",{ref_key:"searchInput",ref:s,id:"txtSearch",type:"search",tabindex:"1","aria-label":e.$t("commons.search"),title:e.$t("commons.search"),placeholder:t.placeholder,class:k(["input is-rounded is-search",{"has-no-background":t.hasNoBackground}]),value:t.keyword,onKeyup:o[0]||(o[0]=l=>e.$emit("update:keyword",l.target.value))},null,42,v),a("span",g,[t.keyword!=""?(n(),c("button",{key:0,id:"btnClearSearch",tabindex:"1",title:e.$t("commons.clear_search"),class:"clear-selection delete",onClick:o[1]||(o[1]=l=>e.$emit("update:keyword",""))},null,8,w)):(n(),p(i,{key:1,icon:["fas","search"]}))])])])}}};export{b as _};
import{r as d,o as u,s as h,e as m,f as n,g as c,h as a,n as k,k as p}from"./app-2d89b28f.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const y={role:"search",class:"field"},f={class:"control has-icons-right"},v=["aria-label","title","placeholder","value"],g={class:"icon is-small is-right"},w=["title"],b={__name:"SearchBox",props:{keyword:String,hasNoBackground:{type:Boolean,default:!1},placeholder:String},setup(t){const s=d(null);u(()=>{document.addEventListener("keydown",r)}),h(()=>{document.removeEventListener("keydown",r)});function r(e){var o;e.key==="f"&&(e.ctrlKey||e.metaKey)&&(e.preventDefault(),(o=s.value)==null||o.focus())}return(e,o)=>{const i=m("FontAwesomeIcon");return n(),c("div",y,[a("div",f,[a("input",{ref_key:"searchInput",ref:s,id:"txtSearch",type:"search",tabindex:"1","aria-label":e.$t("commons.search"),title:e.$t("commons.search"),placeholder:t.placeholder,class:k(["input is-rounded is-search",{"has-no-background":t.hasNoBackground}]),value:t.keyword,onKeyup:o[0]||(o[0]=l=>e.$emit("update:keyword",l.target.value))},null,42,v),a("span",g,[t.keyword!=""?(n(),c("button",{key:0,id:"btnClearSearch",tabindex:"1",title:e.$t("commons.clear_search"),class:"clear-selection delete",onClick:o[1]||(o[1]=l=>e.$emit("update:keyword",""))},null,8,w)):(n(),p(i,{key:1,icon:["fas","search"]}))])])])}}};export{b as _};

View File

@ -1 +1 @@
import{r as m,e as n,f as t,g as s,m as a,p as i,h as o,F as v,G as _,i as h,n as g,j as w,t as k}from"./app-60af1d1a.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const f={class:"options-header"},b={class:"tabs is-centered is-fullwidth"},R={__name:"SettingTabs",props:{activeTab:{type:String,default:""}},setup(r){const c=r,l=m([{name:"settings.options",view:"settings.options",id:"lnkTabOptions"},{name:"settings.account",view:"settings.account",id:"lnkTabAccount"},{name:"settings.oauth",view:"settings.oauth.tokens",id:"lnkTabOAuth"},{name:"settings.webauthn",view:"settings.webauthn.devices",id:"lnkTabWebauthn"}]);return(u,T)=>{const d=n("RouterLink"),p=n("ResponsiveWidthWrapper");return t(),s("div",f,[a(p,null,{default:i(()=>[o("div",b,[o("ul",null,[(t(!0),s(v,null,_(h(l),e=>(t(),s("li",{key:e.view,class:g({"is-active":e.view===c.activeTab})},[a(d,{id:e.id,to:{name:e.view}},{default:i(()=>[w(k(u.$t(e.name)),1)]),_:2},1032,["id","to"])],2))),128))])])]),_:1})])}}};export{R as _};
import{r as m,e as n,f as t,g as s,m as a,p as i,h as o,F as v,G as _,i as h,n as g,j as w,t as k}from"./app-2d89b28f.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const f={class:"options-header"},b={class:"tabs is-centered is-fullwidth"},R={__name:"SettingTabs",props:{activeTab:{type:String,default:""}},setup(r){const c=r,l=m([{name:"settings.options",view:"settings.options",id:"lnkTabOptions"},{name:"settings.account",view:"settings.account",id:"lnkTabAccount"},{name:"settings.oauth",view:"settings.oauth.tokens",id:"lnkTabOAuth"},{name:"settings.webauthn",view:"settings.webauthn.devices",id:"lnkTabWebauthn"}]);return(u,T)=>{const d=n("RouterLink"),p=n("ResponsiveWidthWrapper");return t(),s("div",f,[a(p,null,{default:i(()=>[o("div",b,[o("ul",null,[(t(!0),s(v,null,_(h(l),e=>(t(),s("li",{key:e.view,class:g({"is-active":e.view===c.activeTab})},[a(d,{id:e.id,to:{name:e.view}},{default:i(()=>[w(k(u.$t(e.name)),1)]),_:2},1032,["id","to"])],2))),128))])])]),_:1})])}}};export{R as _};

View File

@ -1 +1 @@
import{a5 as p,e as l,f as n,g as t,h as e,m as a,t as c,l as r,k as d}from"./app-60af1d1a.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const _={key:0},m={key:0,class:"spinner-container"},y={class:"spinner-wrapper"},u={id:"icnSpinnerFull",class:"is-size-1 spinner"},f={key:1,class:"spinner-overlay-container"},h={class:"spinner-wrapper"},v={id:"icnSpinnerFull",class:"is-size-1 spinner"},g={key:3,class:"has-text-centered mt-6"},S={id:"icnSpinner",class:"is-size-4"},k={__name:"Spinner",props:{isVisible:Boolean,type:{type:String,default:"inline"},message:{type:String,default:"commons.generating_otp"}},setup(s){return(o,w)=>{const i=l("FontAwesomeIcon");return s.isVisible?(n(),t("div",_,[s.type=="fullscreen"?(n(),t("div",m,[e("div",y,[e("span",u,[a(i,{icon:["fas","spinner"],spin:""})]),e("span",null,c(o.$t(s.message)),1)])])):r("",!0),s.type=="fullscreen-overlay"?(n(),t("div",f,[e("div",h,[e("span",v,[a(i,{icon:["fas","spinner"],spin:""})]),e("span",null,c(o.$t(s.message)),1)])])):s.type=="raw"?(n(),d(i,{key:2,icon:["fas","spinner"],spin:""})):(n(),t("div",g,[e("span",S,[a(i,{icon:["fas","spinner"],spin:""})])]))])):r("",!0)}}},V=p(k,[["__scopeId","data-v-247a4fa7"]]);export{V as S};
import{a5 as p,e as l,f as n,g as t,h as e,m as a,t as c,l as r,k as d}from"./app-2d89b28f.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const _={key:0},m={key:0,class:"spinner-container"},y={class:"spinner-wrapper"},u={id:"icnSpinnerFull",class:"is-size-1 spinner"},f={key:1,class:"spinner-overlay-container"},h={class:"spinner-wrapper"},v={id:"icnSpinnerFull",class:"is-size-1 spinner"},g={key:3,class:"has-text-centered mt-6"},S={id:"icnSpinner",class:"is-size-4"},k={__name:"Spinner",props:{isVisible:Boolean,type:{type:String,default:"inline"},message:{type:String,default:"commons.generating_otp"}},setup(s){return(o,w)=>{const i=l("FontAwesomeIcon");return s.isVisible?(n(),t("div",_,[s.type=="fullscreen"?(n(),t("div",m,[e("div",y,[e("span",u,[a(i,{icon:["fas","spinner"],spin:""})]),e("span",null,c(o.$t(s.message)),1)])])):r("",!0),s.type=="fullscreen-overlay"?(n(),t("div",f,[e("div",h,[e("span",v,[a(i,{icon:["fas","spinner"],spin:""})]),e("span",null,c(o.$t(s.message)),1)])])):s.type=="raw"?(n(),d(i,{key:2,icon:["fas","spinner"],spin:""})):(n(),t("div",g,[e("span",S,[a(i,{icon:["fas","spinner"],spin:""})])]))])):r("",!0)}}},V=p(k,[["__scopeId","data-v-247a4fa7"]]);export{V as S};

View File

@ -1 +1 @@
import{u as U,a as V,b as A,c as E,r as w,d as N,o as R,e as d,f as a,g as f,h as t,n as C,i as o,j as r,t as s,w as g,k as B,l as b,m as p,p as m,U as S}from"./app-60af1d1a.js";import{F as K}from"./Form-0a788c90.js";import{u as M}from"./bus-ab2b6d74.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const Q={class:"container has-text-centered"},T={class:"columns quick-uploader"},D=t("br",null,null,-1),j={class:"column is-full quick-uploader-button"},z={class:"quick-uploader-centerer"},G={class:"column is-full"},H={key:0,class:"block has-text-link"},J={class:"block has-text-link"},O={class:"block has-text-link"},Z={__name:"Start",setup(P){const k=U(),i=V(),h=M(),$=A(),v=E(),_=w(null),c=w(null),u=N(new K({qrcode:null,inputFormat:"fileUpload"}));function y(){u.clear(),u.qrcode=_.value.files[0],u.upload("/api/v1/qrcode/decode",{returnError:!0}).then(e=>{e.data.data.slice(0,33).toLowerCase()==="otpauth-migration://offline?data="?(h.migrationUri=e.data.data,k.push({name:"importAccounts"})):(h.decodedUri=e.data.data,k.push({name:"createAccount"}))}).catch(e=>{e.response.status!==422&&$.alert({text:e.response.data.message})})}function x(){k.push({name:"capture"})}return R(()=>{i.preferences.useDirectCapture&&i.preferences.defaultCaptureMode==="upload"&&c.value.click()}),(e,n)=>{const F=d("FieldError"),q=d("RouterLink"),I=d("ButtonBackCloseCancel"),L=d("VueFooter");return a(),f("div",Q,[t("div",T,[t("div",{class:C(["column is-full quick-uploader-header",{"is-invisible":o(v).count!==0}])},[r(s(e.$t("twofaccounts.no_account_here")),1),D,r(" "+s(e.$t("twofaccounts.add_first_account")),1)],2),t("div",j,[t("div",z,[o(i).preferences.useBasicQrcodeReader?(a(),f("label",{key:0,role:"button",tabindex:"0",class:"button is-link is-medium is-rounded is-main",ref_key:"qrcodeInputLabel",ref:c,onKeyup:n[0]||(n[0]=g(l=>o(c).click(),["enter"]))},[t("input",{"aria-hidden":"true",tabindex:"-1",class:"file-input",type:"file",accept:"image/*",onChange:y,ref_key:"qrcodeInput",ref:_},null,544),r(" "+s(e.$t("twofaccounts.forms.upload_qrcode")),1)],544)):(a(),f("button",{key:1,class:"button is-link is-medium is-rounded is-main",onClick:n[1]||(n[1]=l=>x())},s(e.$t("twofaccounts.forms.scan_qrcode")),1))]),o(u).errors.hasAny("qrcode")?(a(),B(F,{key:0,error:o(u).errors.get("qrcode"),field:"qrcode"},null,8,["error"])):b("",!0)]),t("div",G,[p(o(S),null,{default:m(({mode:l})=>[t("div",{class:C(["block",l=="dark"?"has-text-light":"has-text-grey-dark"])},s(e.$t("twofaccounts.forms.alternative_methods")),3)]),_:1}),o(i).preferences.useBasicQrcodeReader?b("",!0):(a(),f("div",H,[t("label",{role:"button",tabindex:"0",class:"button is-link is-outlined is-rounded",ref_key:"qrcodeInputLabel",ref:c,onKeyup:n[2]||(n[2]=g(l=>o(c).click(),["enter"]))},[t("input",{"aria-hidden":"true",tabindex:"-1",class:"file-input",type:"file",accept:"image/*",onChange:y,ref_key:"qrcodeInput",ref:_},null,544),r(" "+s(e.$t("twofaccounts.forms.upload_qrcode")),1)],544)])),t("div",J,[p(q,{class:"button is-link is-outlined is-rounded",to:{name:"createAccount"}},{default:m(()=>[r(s(e.$t("twofaccounts.forms.use_advanced_form")),1)]),_:1})]),t("div",O,[p(q,{id:"btnImport",class:"button is-link is-outlined is-rounded",to:{name:"importAccounts"}},{default:m(()=>[r(s(e.$t("twofaccounts.import.import")),1)]),_:1})])])]),p(L,{showButtons:!0},{default:m(()=>[o(v).isEmpty?b("",!0):(a(),B(I,{key:0,returnTo:{name:"accounts"},action:"back"}))]),_:1})])}}};export{Z as default};
import{u as U,a as V,b as A,c as E,r as w,d as N,o as R,e as d,f as a,g as f,h as t,n as C,i as o,j as r,t as s,w as g,k as B,l as b,m as p,p as m,U as S}from"./app-2d89b28f.js";import{F as K}from"./Form-5283f7b6.js";import{u as M}from"./bus-7802a020.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const Q={class:"container has-text-centered"},T={class:"columns quick-uploader"},D=t("br",null,null,-1),j={class:"column is-full quick-uploader-button"},z={class:"quick-uploader-centerer"},G={class:"column is-full"},H={key:0,class:"block has-text-link"},J={class:"block has-text-link"},O={class:"block has-text-link"},Z={__name:"Start",setup(P){const k=U(),i=V(),h=M(),$=A(),v=E(),_=w(null),c=w(null),u=N(new K({qrcode:null,inputFormat:"fileUpload"}));function y(){u.clear(),u.qrcode=_.value.files[0],u.upload("/api/v1/qrcode/decode",{returnError:!0}).then(e=>{e.data.data.slice(0,33).toLowerCase()==="otpauth-migration://offline?data="?(h.migrationUri=e.data.data,k.push({name:"importAccounts"})):(h.decodedUri=e.data.data,k.push({name:"createAccount"}))}).catch(e=>{e.response.status!==422&&$.alert({text:e.response.data.message})})}function x(){k.push({name:"capture"})}return R(()=>{i.preferences.useDirectCapture&&i.preferences.defaultCaptureMode==="upload"&&c.value.click()}),(e,n)=>{const F=d("FieldError"),q=d("RouterLink"),I=d("ButtonBackCloseCancel"),L=d("VueFooter");return a(),f("div",Q,[t("div",T,[t("div",{class:C(["column is-full quick-uploader-header",{"is-invisible":o(v).count!==0}])},[r(s(e.$t("twofaccounts.no_account_here")),1),D,r(" "+s(e.$t("twofaccounts.add_first_account")),1)],2),t("div",j,[t("div",z,[o(i).preferences.useBasicQrcodeReader?(a(),f("label",{key:0,role:"button",tabindex:"0",class:"button is-link is-medium is-rounded is-main",ref_key:"qrcodeInputLabel",ref:c,onKeyup:n[0]||(n[0]=g(l=>o(c).click(),["enter"]))},[t("input",{"aria-hidden":"true",tabindex:"-1",class:"file-input",type:"file",accept:"image/*",onChange:y,ref_key:"qrcodeInput",ref:_},null,544),r(" "+s(e.$t("twofaccounts.forms.upload_qrcode")),1)],544)):(a(),f("button",{key:1,class:"button is-link is-medium is-rounded is-main",onClick:n[1]||(n[1]=l=>x())},s(e.$t("twofaccounts.forms.scan_qrcode")),1))]),o(u).errors.hasAny("qrcode")?(a(),B(F,{key:0,error:o(u).errors.get("qrcode"),field:"qrcode"},null,8,["error"])):b("",!0)]),t("div",G,[p(o(S),null,{default:m(({mode:l})=>[t("div",{class:C(["block",l=="dark"?"has-text-light":"has-text-grey-dark"])},s(e.$t("twofaccounts.forms.alternative_methods")),3)]),_:1}),o(i).preferences.useBasicQrcodeReader?b("",!0):(a(),f("div",H,[t("label",{role:"button",tabindex:"0",class:"button is-link is-outlined is-rounded",ref_key:"qrcodeInputLabel",ref:c,onKeyup:n[2]||(n[2]=g(l=>o(c).click(),["enter"]))},[t("input",{"aria-hidden":"true",tabindex:"-1",class:"file-input",type:"file",accept:"image/*",onChange:y,ref_key:"qrcodeInput",ref:_},null,544),r(" "+s(e.$t("twofaccounts.forms.upload_qrcode")),1)],544)])),t("div",J,[p(q,{class:"button is-link is-outlined is-rounded",to:{name:"createAccount"}},{default:m(()=>[r(s(e.$t("twofaccounts.forms.use_advanced_form")),1)]),_:1})]),t("div",O,[p(q,{id:"btnImport",class:"button is-link is-outlined is-rounded",to:{name:"importAccounts"}},{default:m(()=>[r(s(e.$t("twofaccounts.import.import")),1)]),_:1})])])]),p(L,{showButtons:!0},{default:m(()=>[o(v).isEmpty?b("",!0):(a(),B(I,{key:0,returnTo:{name:"accounts"},action:"back"}))]),_:1})])}}};export{Z as default};

View File

@ -1 +1 @@
import{_ as j}from"./AdminTabs-94ad3971.js";import{Q as N,b as S,a2 as T,r as k,v as $,o as I,J as E,a0 as R,e as p,f as u,g as m,m as n,h as t,p as h,t as i,j as B,i as r,E as O,F as W,G as M,U as F,n as y,l as A}from"./app-60af1d1a.js";import{S as Z}from"./Spinner-bfa27d3a.js";import{_ as q}from"./SearchBox-62743462.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const D={class:"options-tabs"},G={class:"title is-4 has-text-grey-light"},J={class:"is-size-7-mobile"},Q={class:"mb-6 mt-3"},H={class:"columns"},K={class:"column pb-0"},P={class:"level is-mobile mb-0"},X={class:"level-item has-text-centered is-justify-content-end"},Y={class:"subtitle is-7"},ee={class:"level-item has-text-centered is-justify-content-start"},se={class:"buttons"},te={key:0},ae={class:"has-ellipsis"},oe={class:"is-block has-ellipsis is-family-primary is-size-6 is-size-7-mobile has-text-grey"},ne={class:"tags mt-2"},ie={class:"ml-3"},le={key:1,class:"mt-4 pl-3"},he={__name:"Users",setup(re){const x=N("2fauth"),w=S(),z=T(x.prefix+"returnTo","accounts"),f=k([]),a=k(""),g=k(!1),C=$(()=>f.value.filter(e=>{let s=e.name.toLowerCase().includes(d.value.keywords)||e.email.toLowerCase().includes(d.value.keywords);return d.value.admin!=null&&(s=s&&e.is_admin==d.value.admin),d.value.oauth!=null&&(s=s&&e.oauth_provider==d.value.oauth),s})),d=$(()=>{const e={admin:void 0,oauth:void 0,keywords:a.value.toLowerCase()},s=a.value.toLowerCase().split(" "),c=/admin:([01])/,_=/oauth:([a-zA-Z0-9])/;return s.forEach(l=>{l.match(c)&&(e.admin=parseInt(l.replace(c,"$1")),e.keywords=e.keywords.replace(l,"").trim()),l.match(_)&&(e.oauth=l.replace(_,"$1"),e.keywords=e.keywords.replace(l,"").trim())}),e});I(()=>{L()});function b(e){const s=/admin:([01])/,c=/oauth:([a-zA-Z0-9]*)/;a.value.match(s)&&e.match(s)?a.value=a.value.replace(s,e):d.value.oauth!=null&&e.match(c)?a.value=a.value.replace(c,e):a.value=a.value?a.value+" "+e:e}function L(){g.value=!0,E.getAll({returnError:!0}).then(e=>{f.value=e.data}).catch(e=>{w.error(e)}).finally(()=>{g.value=!1})}return R(e=>{e.name.startsWith("admin.")||w.clear()}),(e,s)=>{const c=p("FontAwesomeIcon"),_=p("RouterLink"),l=p("ButtonBackCloseCancel"),U=p("VueFooter"),V=p("FormWrapper");return u(),m("div",null,[n(j,{activeTab:"admin.users"}),t("div",D,[n(V,null,{default:h(()=>[t("h4",G,i(e.$t("admin.users")),1),t("div",J,i(e.$t("admin.users_legend")),1),t("div",Q,[n(_,{class:"is-link mt-5",to:{name:"admin.createUser"}},{default:h(()=>[n(c,{icon:["fas","plus-circle"]}),B(" "+i(e.$t("admin.create_new_user")),1)]),_:1},8,["to"])]),t("div",H,[t("div",K,[n(q,{keyword:r(a),"onUpdate:keyword":s[0]||(s[0]=o=>O(a)?a.value=o:null),hasNoBackground:!0,placeholder:e.$t("admin.search_user_placeholder")},null,8,["keyword","placeholder"])])]),t("div",P,[t("div",X,[t("p",Y,i(e.$t("admin.quick_filters_colons")),1)]),t("div",ee,[t("div",se,[t("button",{class:"button is-small is-ghost p-0",onClick:s[1]||(s[1]=o=>b("admin:1"))},"admin"),t("button",{class:"button is-small is-ghost p-0",onClick:s[2]||(s[2]=o=>b("oauth:github"))},"github"),t("button",{class:"button is-small is-ghost p-0",onClick:s[3]||(s[3]=o=>b("oauth:openid"))},"openId")])])]),r(C).length>0?(u(),m("div",te,[(u(!0),m(W,null,M(r(C),o=>(u(),m("div",{key:o.id,class:"list-item is-size-5 is-size-6-mobile is-flex is-justify-content-space-between"},[t("div",ae,[t("span",null,i(o.name),1),t("span",oe,i(o.email),1),n(r(F),null,{default:h(({mode:v})=>[t("div",ne,[o.is_admin?(u(),m("span",{key:0,class:y(["tag is-rounded has-text-warning-dark",v=="dark"?"has-background-black-bis":"has-background-grey-lighter"])},"admin",2)):A("",!0),o.oauth_provider?(u(),m("span",{key:1,class:y(["tag is-rounded has-text-grey",v=="dark"?"has-background-black-bis":"has-background-grey-lighter"])},"oauth: "+i(o.oauth_provider),3)):A("",!0)])]),_:2},1024)]),t("div",ie,[n(r(F),null,{default:h(({mode:v})=>[n(_,{to:{name:"admin.manageUser",params:{userId:o.id}},class:y(["button is-small has-normal-radius is-pulled-right",{"is-dark":v=="dark"}]),title:e.$t("commons.manage")},{default:h(()=>[B(i(e.$t("commons.manage")),1)]),_:2},1032,["to","class","title"])]),_:2},1024)])]))),128))])):(u(),m("div",le,i(e.$t("commons.no_result")),1)),n(Z,{isVisible:r(g)&&r(f).length===0},null,8,["isVisible"]),n(U,{showButtons:!0},{default:h(()=>[n(l,{returnTo:{name:r(z)},action:"close"},null,8,["returnTo"])]),_:1})]),_:1})])])}}};export{he as default};
import{_ as j}from"./AdminTabs-7af3858b.js";import{Q as N,b as S,a2 as T,r as k,v as $,o as I,J as E,a0 as R,e as p,f as u,g as m,m as n,h as t,p as h,t as i,j as B,i as r,E as O,F as W,G as M,U as F,n as y,l as A}from"./app-2d89b28f.js";import{S as Z}from"./Spinner-aea2b665.js";import{_ as q}from"./SearchBox-cb8625ff.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const D={class:"options-tabs"},G={class:"title is-4 has-text-grey-light"},J={class:"is-size-7-mobile"},Q={class:"mb-6 mt-3"},H={class:"columns"},K={class:"column pb-0"},P={class:"level is-mobile mb-0"},X={class:"level-item has-text-centered is-justify-content-end"},Y={class:"subtitle is-7"},ee={class:"level-item has-text-centered is-justify-content-start"},se={class:"buttons"},te={key:0},ae={class:"has-ellipsis"},oe={class:"is-block has-ellipsis is-family-primary is-size-6 is-size-7-mobile has-text-grey"},ne={class:"tags mt-2"},ie={class:"ml-3"},le={key:1,class:"mt-4 pl-3"},he={__name:"Users",setup(re){const x=N("2fauth"),w=S(),z=T(x.prefix+"returnTo","accounts"),f=k([]),a=k(""),g=k(!1),C=$(()=>f.value.filter(e=>{let s=e.name.toLowerCase().includes(d.value.keywords)||e.email.toLowerCase().includes(d.value.keywords);return d.value.admin!=null&&(s=s&&e.is_admin==d.value.admin),d.value.oauth!=null&&(s=s&&e.oauth_provider==d.value.oauth),s})),d=$(()=>{const e={admin:void 0,oauth:void 0,keywords:a.value.toLowerCase()},s=a.value.toLowerCase().split(" "),c=/admin:([01])/,_=/oauth:([a-zA-Z0-9])/;return s.forEach(l=>{l.match(c)&&(e.admin=parseInt(l.replace(c,"$1")),e.keywords=e.keywords.replace(l,"").trim()),l.match(_)&&(e.oauth=l.replace(_,"$1"),e.keywords=e.keywords.replace(l,"").trim())}),e});I(()=>{L()});function b(e){const s=/admin:([01])/,c=/oauth:([a-zA-Z0-9]*)/;a.value.match(s)&&e.match(s)?a.value=a.value.replace(s,e):d.value.oauth!=null&&e.match(c)?a.value=a.value.replace(c,e):a.value=a.value?a.value+" "+e:e}function L(){g.value=!0,E.getAll({returnError:!0}).then(e=>{f.value=e.data}).catch(e=>{w.error(e)}).finally(()=>{g.value=!1})}return R(e=>{e.name.startsWith("admin.")||w.clear()}),(e,s)=>{const c=p("FontAwesomeIcon"),_=p("RouterLink"),l=p("ButtonBackCloseCancel"),U=p("VueFooter"),V=p("FormWrapper");return u(),m("div",null,[n(j,{activeTab:"admin.users"}),t("div",D,[n(V,null,{default:h(()=>[t("h4",G,i(e.$t("admin.users")),1),t("div",J,i(e.$t("admin.users_legend")),1),t("div",Q,[n(_,{class:"is-link mt-5",to:{name:"admin.createUser"}},{default:h(()=>[n(c,{icon:["fas","plus-circle"]}),B(" "+i(e.$t("admin.create_new_user")),1)]),_:1},8,["to"])]),t("div",H,[t("div",K,[n(q,{keyword:r(a),"onUpdate:keyword":s[0]||(s[0]=o=>O(a)?a.value=o:null),hasNoBackground:!0,placeholder:e.$t("admin.search_user_placeholder")},null,8,["keyword","placeholder"])])]),t("div",P,[t("div",X,[t("p",Y,i(e.$t("admin.quick_filters_colons")),1)]),t("div",ee,[t("div",se,[t("button",{class:"button is-small is-ghost p-0",onClick:s[1]||(s[1]=o=>b("admin:1"))},"admin"),t("button",{class:"button is-small is-ghost p-0",onClick:s[2]||(s[2]=o=>b("oauth:github"))},"github"),t("button",{class:"button is-small is-ghost p-0",onClick:s[3]||(s[3]=o=>b("oauth:openid"))},"openId")])])]),r(C).length>0?(u(),m("div",te,[(u(!0),m(W,null,M(r(C),o=>(u(),m("div",{key:o.id,class:"list-item is-size-5 is-size-6-mobile is-flex is-justify-content-space-between"},[t("div",ae,[t("span",null,i(o.name),1),t("span",oe,i(o.email),1),n(r(F),null,{default:h(({mode:v})=>[t("div",ne,[o.is_admin?(u(),m("span",{key:0,class:y(["tag is-rounded has-text-warning-dark",v=="dark"?"has-background-black-bis":"has-background-grey-lighter"])},"admin",2)):A("",!0),o.oauth_provider?(u(),m("span",{key:1,class:y(["tag is-rounded has-text-grey",v=="dark"?"has-background-black-bis":"has-background-grey-lighter"])},"oauth: "+i(o.oauth_provider),3)):A("",!0)])]),_:2},1024)]),t("div",ie,[n(r(F),null,{default:h(({mode:v})=>[n(_,{to:{name:"admin.manageUser",params:{userId:o.id}},class:y(["button is-small has-normal-radius is-pulled-right",{"is-dark":v=="dark"}]),title:e.$t("commons.manage")},{default:h(()=>[B(i(e.$t("commons.manage")),1)]),_:2},1032,["to","class","title"])]),_:2},1024)])]))),128))])):(u(),m("div",le,i(e.$t("commons.no_result")),1)),n(Z,{isVisible:r(g)&&r(f).length===0},null,8,["isVisible"]),n(U,{showButtons:!0},{default:h(()=>[n(l,{returnTo:{name:r(z)},action:"close"},null,8,["returnTo"])]),_:1})]),_:1})])])}}};export{he as default};

View File

@ -1 +1 @@
import{Q as z,a as U,b as L,u as M,a2 as A,r as b,o as D,x as I,J as v,a0 as K,e as h,f as d,g as _,m as o,h as s,p as g,i as t,l as y,t as i,w as R,j as k,F as j,G as E,U as H,n as J,I as r}from"./app-60af1d1a.js";import{_ as G}from"./SettingTabs-0b59e581.js";import{w as P}from"./webauthnService-1f4ca5dc.js";import{S as Q}from"./Spinner-bfa27d3a.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const q={class:"options-tabs"},X=["innerHTML"],Y={class:"title is-4 has-text-grey-light"},Z={class:"is-size-7-mobile"},ee={class:"mt-3"},te=["onKeyup"],se={key:1,class:"field"},ne=["onClick","title"],ae={class:"mt-2 is-size-7 is-pulled-right"},oe={class:"title is-4 pt-6 has-text-grey-light"},ie={class:"field"},_e={__name:"WebAuthn",setup(re){const C=z("2fauth"),l=U(),n=L(),W=M(),$=A(C.prefix+"returnTo","accounts"),a=b([]),f=b(!1),p=b(!1);D(()=>{V()}),I(()=>l.preferences.useWebauthnOnly,()=>{v.updatePreference("useWebauthnOnly",l.preferences.useWebauthnOnly).then(e=>{n.success({text:r("settings.forms.setting_saved")})})});function w(){if(p==!0)return n.warn({text:r("errors.unsupported_with_reverseproxy")}),!1;P.register().then(e=>{W.push({name:"settings.webauthn.editCredential",params:{credentialId:JSON.parse(e.config.data).id}})}).catch(e=>{var u;"webauthn"in e?e.name=="is-warning"?n.warn({text:r(e.message)}):n.alert({text:r(e.message)}):((u=e.response)==null?void 0:u.status)===422?n.alert({text:e.response.data.message}):n.error(e)})}function x(e){confirm(r("auth.confirm.revoke_device"))&&v.revokeWebauthnDevice(e).then(u=>{a.value=a.value.filter(m=>m.id!==e),a.value.length==0&&(l.preferences.useWebauthnOnly=!1),n.success({text:r("auth.webauthn.device_revoked")})})}function F(e){return e.alias?e.alias:r("auth.webauthn.my_device")+" (#"+e.id.substring(0,10)+")"}function V(){f.value=!0,v.getWebauthnDevices({returnError:!0}).then(e=>{a.value=e.data}).catch(e=>{e.response.status===405?p.value=!0:n.error(e)}).finally(()=>{f.value=!1})}return K(e=>{e.name.startsWith("settings.")||n.clear()}),(e,u)=>{const m=h("FontAwesomeIcon"),B=h("FormCheckbox"),S=h("ButtonBackCloseCancel"),T=h("VueFooter"),N=h("FormWrapper");return d(),_("div",null,[o(G,{activeTab:"settings.webauthn.devices"},null,8,["activeTab"]),s("div",q,[o(N,null,{default:g(()=>[t(p)?(d(),_("div",{key:0,class:"notification is-warning has-text-centered",innerHTML:e.$t("auth.auth_handled_by_proxy")},null,8,X)):y("",!0),s("h4",Y,i(e.$t("auth.webauthn.security_devices")),1),s("div",Z,i(e.$t("auth.webauthn.security_devices_legend")),1),s("div",ee,[s("a",{tabindex:"0",onClick:w,onKeyup:R(w,["enter"])},[o(m,{icon:["fas","plus-circle"]}),k(" "+i(e.$t("auth.webauthn.register_a_new_device")),1)],40,te)]),t(a).length>0?(d(),_("div",se,[(d(!0),_(j,null,E(t(a),c=>(d(),_("div",{key:c.id,class:"group-item is-size-5 is-size-6-mobile"},[k(i(F(c))+" ",1),o(t(H),null,{default:g(({mode:O})=>[s("button",{class:J(["button tag is-pulled-right",O==="dark"?"is-dark":"is-white"]),onClick:ue=>x(c.id),title:e.$t("settings.revoke")},i(e.$t("settings.revoke")),11,ne)]),_:2},1024)]))),128)),s("div",ae,i(e.$t("auth.webauthn.revoking_a_device_is_permanent")),1)])):y("",!0),o(Q,{isVisible:t(f)&&t(a).length===0},null,8,["isVisible"]),s("h4",oe,i(e.$t("auth.webauthn.options")),1),s("div",ie,i(e.$t("auth.webauthn.need_a_security_device_to_enable_options")),1),s("form",null,[o(B,{modelValue:t(l).preferences.useWebauthnOnly,"onUpdate:modelValue":u[0]||(u[0]=c=>t(l).preferences.useWebauthnOnly=c),fieldName:"useWebauthnOnly",label:"auth.webauthn.use_webauthn_only.label",help:"auth.webauthn.use_webauthn_only.help",disabled:t(p)||t(a).length===0},null,8,["modelValue","disabled"])]),o(T,{showButtons:!0},{default:g(()=>[o(S,{returnTo:{name:t($)},action:"close"},null,8,["returnTo"])]),_:1})]),_:1})])])}}};export{_e as default};
import{Q as z,a as U,b as L,u as M,a2 as A,r as b,o as D,x as I,J as v,a0 as K,e as h,f as d,g as _,m as o,h as s,p as g,i as t,l as y,t as i,w as R,j as k,F as j,G as E,U as H,n as J,I as r}from"./app-2d89b28f.js";import{_ as G}from"./SettingTabs-708dbaa6.js";import{w as P}from"./webauthnService-43ef310f.js";import{S as Q}from"./Spinner-aea2b665.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const q={class:"options-tabs"},X=["innerHTML"],Y={class:"title is-4 has-text-grey-light"},Z={class:"is-size-7-mobile"},ee={class:"mt-3"},te=["onKeyup"],se={key:1,class:"field"},ne=["onClick","title"],ae={class:"mt-2 is-size-7 is-pulled-right"},oe={class:"title is-4 pt-6 has-text-grey-light"},ie={class:"field"},_e={__name:"WebAuthn",setup(re){const C=z("2fauth"),l=U(),n=L(),W=M(),$=A(C.prefix+"returnTo","accounts"),a=b([]),f=b(!1),p=b(!1);D(()=>{V()}),I(()=>l.preferences.useWebauthnOnly,()=>{v.updatePreference("useWebauthnOnly",l.preferences.useWebauthnOnly).then(e=>{n.success({text:r("settings.forms.setting_saved")})})});function w(){if(p==!0)return n.warn({text:r("errors.unsupported_with_reverseproxy")}),!1;P.register().then(e=>{W.push({name:"settings.webauthn.editCredential",params:{credentialId:JSON.parse(e.config.data).id}})}).catch(e=>{var u;"webauthn"in e?e.name=="is-warning"?n.warn({text:r(e.message)}):n.alert({text:r(e.message)}):((u=e.response)==null?void 0:u.status)===422?n.alert({text:e.response.data.message}):n.error(e)})}function x(e){confirm(r("auth.confirm.revoke_device"))&&v.revokeWebauthnDevice(e).then(u=>{a.value=a.value.filter(m=>m.id!==e),a.value.length==0&&(l.preferences.useWebauthnOnly=!1),n.success({text:r("auth.webauthn.device_revoked")})})}function F(e){return e.alias?e.alias:r("auth.webauthn.my_device")+" (#"+e.id.substring(0,10)+")"}function V(){f.value=!0,v.getWebauthnDevices({returnError:!0}).then(e=>{a.value=e.data}).catch(e=>{e.response.status===405?p.value=!0:n.error(e)}).finally(()=>{f.value=!1})}return K(e=>{e.name.startsWith("settings.")||n.clear()}),(e,u)=>{const m=h("FontAwesomeIcon"),B=h("FormCheckbox"),S=h("ButtonBackCloseCancel"),T=h("VueFooter"),N=h("FormWrapper");return d(),_("div",null,[o(G,{activeTab:"settings.webauthn.devices"},null,8,["activeTab"]),s("div",q,[o(N,null,{default:g(()=>[t(p)?(d(),_("div",{key:0,class:"notification is-warning has-text-centered",innerHTML:e.$t("auth.auth_handled_by_proxy")},null,8,X)):y("",!0),s("h4",Y,i(e.$t("auth.webauthn.security_devices")),1),s("div",Z,i(e.$t("auth.webauthn.security_devices_legend")),1),s("div",ee,[s("a",{tabindex:"0",onClick:w,onKeyup:R(w,["enter"])},[o(m,{icon:["fas","plus-circle"]}),k(" "+i(e.$t("auth.webauthn.register_a_new_device")),1)],40,te)]),t(a).length>0?(d(),_("div",se,[(d(!0),_(j,null,E(t(a),c=>(d(),_("div",{key:c.id,class:"group-item is-size-5 is-size-6-mobile"},[k(i(F(c))+" ",1),o(t(H),null,{default:g(({mode:O})=>[s("button",{class:J(["button tag is-pulled-right",O==="dark"?"is-dark":"is-white"]),onClick:ue=>x(c.id),title:e.$t("settings.revoke")},i(e.$t("settings.revoke")),11,ne)]),_:2},1024)]))),128)),s("div",ae,i(e.$t("auth.webauthn.revoking_a_device_is_permanent")),1)])):y("",!0),o(Q,{isVisible:t(f)&&t(a).length===0},null,8,["isVisible"]),s("h4",oe,i(e.$t("auth.webauthn.options")),1),s("div",ie,i(e.$t("auth.webauthn.need_a_security_device_to_enable_options")),1),s("form",null,[o(B,{modelValue:t(l).preferences.useWebauthnOnly,"onUpdate:modelValue":u[0]||(u[0]=c=>t(l).preferences.useWebauthnOnly=c),fieldName:"useWebauthnOnly",label:"auth.webauthn.use_webauthn_only.label",help:"auth.webauthn.use_webauthn_only.help",disabled:t(p)||t(a).length===0},null,8,["modelValue","disabled"])]),o(T,{showButtons:!0},{default:g(()=>[o(S,{returnTo:{name:t($)},action:"close"},null,8,["returnTo"])]),_:1})]),_:1})])])}}};export{_e as default};

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
import{a1 as e}from"./app-60af1d1a.js";/*! 2FAuth version 5.1.0 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const n=e({id:"bus",state:()=>({migrationUri:null,decodedUri:null,inManagementMode:!1,editedGroupName:null}),actions:{}});export{n as u};
import{a1 as e}from"./app-2d89b28f.js";/*! 2FAuth version 5.1.1 - Copyright (c) 2023 Bubka - https://github.com/Bubka/2FAuth */const n=e({id:"bus",state:()=>({migrationUri:null,decodedUri:null,inManagementMode:!1,editedGroupName:null}),actions:{}});export{n as u};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -3,66 +3,66 @@
"file": "assets/Spinner-2c227a70.css",
"src": "Spinner.css"
},
"_AdminTabs-94ad3971.js": {
"file": "assets/AdminTabs-94ad3971.js",
"_AdminTabs-7af3858b.js": {
"file": "assets/AdminTabs-7af3858b.js",
"imports": [
"resources/js/app.js"
]
},
"_CopyButton-643e0686.js": {
"file": "assets/CopyButton-643e0686.js",
"_CopyButton-7a25d704.js": {
"file": "assets/CopyButton-7a25d704.js",
"imports": [
"resources/js/app.js"
]
},
"_Form-0a788c90.js": {
"file": "assets/Form-0a788c90.js",
"_Form-5283f7b6.js": {
"file": "assets/Form-5283f7b6.js",
"imports": [
"resources/js/app.js"
]
},
"_OtpDisplay-f582bb88.js": {
"file": "assets/OtpDisplay-f582bb88.js",
"_OtpDisplay-2108b98d.js": {
"file": "assets/OtpDisplay-2108b98d.js",
"imports": [
"resources/js/app.js",
"_Spinner-bfa27d3a.js"
"_Spinner-aea2b665.js"
]
},
"_QrContentDisplay-ea3c63ab.js": {
"file": "assets/QrContentDisplay-ea3c63ab.js",
"_QrContentDisplay-251465e5.js": {
"file": "assets/QrContentDisplay-251465e5.js",
"imports": [
"resources/js/app.js"
]
},
"_SearchBox-62743462.js": {
"file": "assets/SearchBox-62743462.js",
"_SearchBox-cb8625ff.js": {
"file": "assets/SearchBox-cb8625ff.js",
"imports": [
"resources/js/app.js"
]
},
"_SettingTabs-0b59e581.js": {
"file": "assets/SettingTabs-0b59e581.js",
"_SettingTabs-708dbaa6.js": {
"file": "assets/SettingTabs-708dbaa6.js",
"imports": [
"resources/js/app.js"
]
},
"_Spinner-bfa27d3a.js": {
"_Spinner-aea2b665.js": {
"css": [
"assets/Spinner-2c227a70.css"
],
"file": "assets/Spinner-bfa27d3a.js",
"file": "assets/Spinner-aea2b665.js",
"imports": [
"resources/js/app.js"
]
},
"_bus-ab2b6d74.js": {
"file": "assets/bus-ab2b6d74.js",
"_bus-7802a020.js": {
"file": "assets/bus-7802a020.js",
"imports": [
"resources/js/app.js"
]
},
"_webauthnService-1f4ca5dc.js": {
"file": "assets/webauthnService-1f4ca5dc.js",
"_webauthnService-43ef310f.js": {
"file": "assets/webauthnService-43ef310f.js",
"imports": [
"resources/js/app.js"
]
@ -117,14 +117,15 @@
"resources/lang/php_ro.json",
"resources/lang/php_ru.json",
"resources/lang/php_si.json",
"resources/lang/php_tr.json",
"resources/lang/php_zh.json"
],
"file": "assets/app-60af1d1a.js",
"file": "assets/app-2d89b28f.js",
"isEntry": true,
"src": "resources/js/app.js"
},
"resources/js/views/About.vue": {
"file": "assets/About-21528213.js",
"file": "assets/About-51085f4f.js",
"imports": [
"resources/js/app.js"
],
@ -132,7 +133,7 @@
"src": "resources/js/views/About.vue"
},
"resources/js/views/Error.vue": {
"file": "assets/Error-0e5b1508.js",
"file": "assets/Error-5d72db66.js",
"imports": [
"resources/js/app.js"
],
@ -140,290 +141,295 @@
"src": "resources/js/views/Error.vue"
},
"resources/js/views/Start.vue": {
"file": "assets/Start-616d9df7.js",
"file": "assets/Start-864a4d60.js",
"imports": [
"resources/js/app.js",
"_Form-0a788c90.js",
"_bus-ab2b6d74.js"
"_Form-5283f7b6.js",
"_bus-7802a020.js"
],
"isDynamicEntry": true,
"src": "resources/js/views/Start.vue"
},
"resources/js/views/admin/AppSetup.vue": {
"file": "assets/AppSetup-45bab529.js",
"file": "assets/AppSetup-b7dcb9f9.js",
"imports": [
"_AdminTabs-94ad3971.js",
"_AdminTabs-7af3858b.js",
"resources/js/app.js",
"_CopyButton-643e0686.js"
"_CopyButton-7a25d704.js"
],
"isDynamicEntry": true,
"src": "resources/js/views/admin/AppSetup.vue"
},
"resources/js/views/admin/Users.vue": {
"file": "assets/Users-e4ea6e38.js",
"file": "assets/Users-422cc043.js",
"imports": [
"_AdminTabs-94ad3971.js",
"_AdminTabs-7af3858b.js",
"resources/js/app.js",
"_Spinner-bfa27d3a.js",
"_SearchBox-62743462.js"
"_Spinner-aea2b665.js",
"_SearchBox-cb8625ff.js"
],
"isDynamicEntry": true,
"src": "resources/js/views/admin/Users.vue"
},
"resources/js/views/admin/users/Create.vue": {
"file": "assets/Create-88a5e9ed.js",
"file": "assets/Create-3febca8f.js",
"imports": [
"resources/js/app.js",
"_Form-0a788c90.js"
"_Form-5283f7b6.js"
],
"isDynamicEntry": true,
"src": "resources/js/views/admin/users/Create.vue"
},
"resources/js/views/admin/users/Manage.vue": {
"file": "assets/Manage-002185c7.js",
"file": "assets/Manage-83b1727c.js",
"imports": [
"_CopyButton-643e0686.js",
"_CopyButton-7a25d704.js",
"resources/js/app.js"
],
"isDynamicEntry": true,
"src": "resources/js/views/admin/users/Manage.vue"
},
"resources/js/views/auth/Login.vue": {
"file": "assets/Login-0aa69f71.js",
"file": "assets/Login-69c0645b.js",
"imports": [
"resources/js/app.js",
"_Form-0a788c90.js",
"_webauthnService-1f4ca5dc.js"
"_Form-5283f7b6.js",
"_webauthnService-43ef310f.js"
],
"isDynamicEntry": true,
"src": "resources/js/views/auth/Login.vue"
},
"resources/js/views/auth/Register.vue": {
"file": "assets/Register-9acf7d81.js",
"file": "assets/Register-ac041825.js",
"imports": [
"resources/js/app.js",
"_Form-0a788c90.js",
"_webauthnService-1f4ca5dc.js"
"_Form-5283f7b6.js",
"_webauthnService-43ef310f.js"
],
"isDynamicEntry": true,
"src": "resources/js/views/auth/Register.vue"
},
"resources/js/views/auth/RequestReset.vue": {
"file": "assets/RequestReset-9775b58f.js",
"file": "assets/RequestReset-a2b01eb6.js",
"imports": [
"resources/js/app.js",
"_Form-0a788c90.js"
"_Form-5283f7b6.js"
],
"isDynamicEntry": true,
"src": "resources/js/views/auth/RequestReset.vue"
},
"resources/js/views/auth/password/Reset.vue": {
"file": "assets/Reset-4749a3f6.js",
"file": "assets/Reset-78a79c23.js",
"imports": [
"resources/js/app.js",
"_Form-0a788c90.js"
"_Form-5283f7b6.js"
],
"isDynamicEntry": true,
"src": "resources/js/views/auth/password/Reset.vue"
},
"resources/js/views/auth/webauthn/Recover.vue": {
"file": "assets/Recover-d16991a5.js",
"file": "assets/Recover-68154a1c.js",
"imports": [
"resources/js/app.js",
"_Form-0a788c90.js"
"_Form-5283f7b6.js"
],
"isDynamicEntry": true,
"src": "resources/js/views/auth/webauthn/Recover.vue"
},
"resources/js/views/groups/CreateUpdate.vue": {
"file": "assets/CreateUpdate-db65145e.js",
"file": "assets/CreateUpdate-643179e3.js",
"imports": [
"resources/js/app.js",
"_Form-0a788c90.js",
"_bus-ab2b6d74.js"
"_Form-5283f7b6.js",
"_bus-7802a020.js"
],
"isDynamicEntry": true,
"src": "resources/js/views/groups/CreateUpdate.vue"
},
"resources/js/views/groups/Groups.vue": {
"file": "assets/Groups-e3693e0e.js",
"file": "assets/Groups-1660394b.js",
"imports": [
"resources/js/app.js",
"_bus-ab2b6d74.js"
"_bus-7802a020.js"
],
"isDynamicEntry": true,
"src": "resources/js/views/groups/Groups.vue"
},
"resources/js/views/settings/Account.vue": {
"file": "assets/Account-a7d249ba.js",
"file": "assets/Account-9176478b.js",
"imports": [
"resources/js/app.js",
"_Form-0a788c90.js",
"_SettingTabs-0b59e581.js"
"_Form-5283f7b6.js",
"_SettingTabs-708dbaa6.js"
],
"isDynamicEntry": true,
"src": "resources/js/views/settings/Account.vue"
},
"resources/js/views/settings/Credentials/Edit.vue": {
"file": "assets/Edit-e1414c8a.js",
"file": "assets/Edit-307bbb3b.js",
"imports": [
"resources/js/app.js",
"_Form-0a788c90.js"
"_Form-5283f7b6.js"
],
"isDynamicEntry": true,
"src": "resources/js/views/settings/Credentials/Edit.vue"
},
"resources/js/views/settings/OAuth.vue": {
"file": "assets/OAuth-23b533cf.js",
"file": "assets/OAuth-c85ae7fb.js",
"imports": [
"resources/js/app.js",
"_Form-0a788c90.js",
"_SettingTabs-0b59e581.js",
"_Spinner-bfa27d3a.js"
"_Form-5283f7b6.js",
"_SettingTabs-708dbaa6.js",
"_Spinner-aea2b665.js"
],
"isDynamicEntry": true,
"src": "resources/js/views/settings/OAuth.vue"
},
"resources/js/views/settings/Options.vue": {
"file": "assets/Options-599918f8.js",
"file": "assets/Options-86d2ee8a.js",
"imports": [
"_SettingTabs-0b59e581.js",
"_SettingTabs-708dbaa6.js",
"resources/js/app.js"
],
"isDynamicEntry": true,
"src": "resources/js/views/settings/Options.vue"
},
"resources/js/views/settings/WebAuthn.vue": {
"file": "assets/WebAuthn-3d2e0d09.js",
"file": "assets/WebAuthn-ee78af22.js",
"imports": [
"resources/js/app.js",
"_SettingTabs-0b59e581.js",
"_webauthnService-1f4ca5dc.js",
"_Spinner-bfa27d3a.js"
"_SettingTabs-708dbaa6.js",
"_webauthnService-43ef310f.js",
"_Spinner-aea2b665.js"
],
"isDynamicEntry": true,
"src": "resources/js/views/settings/WebAuthn.vue"
},
"resources/js/views/twofaccounts/Accounts.vue": {
"file": "assets/Accounts-7bc9693f.js",
"file": "assets/Accounts-f711dee9.js",
"imports": [
"resources/js/app.js",
"_OtpDisplay-f582bb88.js",
"_SearchBox-62743462.js",
"_bus-ab2b6d74.js",
"_Spinner-bfa27d3a.js"
"_OtpDisplay-2108b98d.js",
"_SearchBox-cb8625ff.js",
"_bus-7802a020.js",
"_Spinner-aea2b665.js"
],
"isDynamicEntry": true,
"src": "resources/js/views/twofaccounts/Accounts.vue"
},
"resources/js/views/twofaccounts/Capture.vue": {
"file": "assets/Capture-1f19a38b.js",
"file": "assets/Capture-109ae9bf.js",
"imports": [
"resources/js/app.js",
"_Form-0a788c90.js",
"_Spinner-bfa27d3a.js",
"_QrContentDisplay-ea3c63ab.js",
"_bus-ab2b6d74.js"
"_Form-5283f7b6.js",
"_Spinner-aea2b665.js",
"_QrContentDisplay-251465e5.js",
"_bus-7802a020.js"
],
"isDynamicEntry": true,
"src": "resources/js/views/twofaccounts/Capture.vue"
},
"resources/js/views/twofaccounts/CreateUpdate.vue": {
"file": "assets/CreateUpdate-016104d4.js",
"file": "assets/CreateUpdate-f925f523.js",
"imports": [
"resources/js/app.js",
"_Form-0a788c90.js",
"_OtpDisplay-f582bb88.js",
"_QrContentDisplay-ea3c63ab.js",
"_bus-ab2b6d74.js",
"_Spinner-bfa27d3a.js"
"_Form-5283f7b6.js",
"_OtpDisplay-2108b98d.js",
"_QrContentDisplay-251465e5.js",
"_bus-7802a020.js",
"_Spinner-aea2b665.js"
],
"isDynamicEntry": true,
"src": "resources/js/views/twofaccounts/CreateUpdate.vue"
},
"resources/js/views/twofaccounts/Import.vue": {
"file": "assets/Import-058e3143.js",
"file": "assets/Import-8782f7b5.js",
"imports": [
"resources/js/app.js",
"_Form-0a788c90.js",
"_OtpDisplay-f582bb88.js",
"_Spinner-bfa27d3a.js",
"_bus-ab2b6d74.js"
"_Form-5283f7b6.js",
"_OtpDisplay-2108b98d.js",
"_Spinner-aea2b665.js",
"_bus-7802a020.js"
],
"isDynamicEntry": true,
"src": "resources/js/views/twofaccounts/Import.vue"
},
"resources/js/views/twofaccounts/QRcode.vue": {
"file": "assets/QRcode-62f040ad.js",
"file": "assets/QRcode-8e9b023f.js",
"imports": [
"resources/js/app.js",
"_Spinner-bfa27d3a.js"
"_Spinner-aea2b665.js"
],
"isDynamicEntry": true,
"src": "resources/js/views/twofaccounts/QRcode.vue"
},
"resources/lang/php_bg.json": {
"file": "assets/php_bg-79a9a6b2.js",
"file": "assets/php_bg-8c7ecc9c.js",
"isDynamicEntry": true,
"src": "resources/lang/php_bg.json"
},
"resources/lang/php_de.json": {
"file": "assets/php_de-edabb7b3.js",
"file": "assets/php_de-51559ca9.js",
"isDynamicEntry": true,
"src": "resources/lang/php_de.json"
},
"resources/lang/php_en.json": {
"file": "assets/php_en-65348e5a.js",
"file": "assets/php_en-74a0f48e.js",
"isDynamicEntry": true,
"src": "resources/lang/php_en.json"
},
"resources/lang/php_es.json": {
"file": "assets/php_es-8bc38a41.js",
"file": "assets/php_es-34404112.js",
"isDynamicEntry": true,
"src": "resources/lang/php_es.json"
},
"resources/lang/php_fr.json": {
"file": "assets/php_fr-4e3a581d.js",
"file": "assets/php_fr-0fb6d7f6.js",
"isDynamicEntry": true,
"src": "resources/lang/php_fr.json"
},
"resources/lang/php_hi.json": {
"file": "assets/php_hi-631b366e.js",
"file": "assets/php_hi-a4de9620.js",
"isDynamicEntry": true,
"src": "resources/lang/php_hi.json"
},
"resources/lang/php_id.json": {
"file": "assets/php_id-8aeb6da7.js",
"file": "assets/php_id-48a5ef59.js",
"isDynamicEntry": true,
"src": "resources/lang/php_id.json"
},
"resources/lang/php_it.json": {
"file": "assets/php_it-b90e26fa.js",
"file": "assets/php_it-b9c12090.js",
"isDynamicEntry": true,
"src": "resources/lang/php_it.json"
},
"resources/lang/php_ja.json": {
"file": "assets/php_ja-bbda5fec.js",
"file": "assets/php_ja-b8afbdc1.js",
"isDynamicEntry": true,
"src": "resources/lang/php_ja.json"
},
"resources/lang/php_ro.json": {
"file": "assets/php_ro-43bf93e4.js",
"file": "assets/php_ro-f956f1f2.js",
"isDynamicEntry": true,
"src": "resources/lang/php_ro.json"
},
"resources/lang/php_ru.json": {
"file": "assets/php_ru-e41b0033.js",
"file": "assets/php_ru-d62a7157.js",
"isDynamicEntry": true,
"src": "resources/lang/php_ru.json"
},
"resources/lang/php_si.json": {
"file": "assets/php_si-85c4e7b8.js",
"file": "assets/php_si-a2441031.js",
"isDynamicEntry": true,
"src": "resources/lang/php_si.json"
},
"resources/lang/php_tr.json": {
"file": "assets/php_tr-cbc04db3.js",
"isDynamicEntry": true,
"src": "resources/lang/php_tr.json"
},
"resources/lang/php_zh.json": {
"file": "assets/php_zh-7cc6d490.js",
"file": "assets/php_zh-9f8fe759.js",
"isDynamicEntry": true,
"src": "resources/lang/php_zh.json"
}