mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-04 14:22:00 +01:00
3 lines
1.6 KiB
JavaScript
3 lines
1.6 KiB
JavaScript
|
import{S as v,a as C,l as f,m as r,d as a,e as o,t as s,f as w,H as l,G as y,i as c,j as _,F as g}from"./app-CzxRjCVM.js";/*! 2FAuth version 5.4.3 - Copyright (c) 2024 Bubka - https://github.com/Bubka/2FAuth */const h={class:"block"},q={class:"block mb-6 light-or-darker"},$={key:0,class:"block has-text-link"},E={type:"button",class:"button is-link is-outlined is-rounded"},B={class:"icon is-small"},I={__name:"QrContentDisplay",props:{qrContent:String},setup(e){const{copy:d}=v({legacy:!0}),u=C();function m(t){var n=/^(?:http(s)?:\/\/)?[\w.-]+(?:\.[\w\.-]+)+[\w\-\._~:/?#[\]@!\$&'\(\)\*\+,;=.]+$/,i=new RegExp(n);return i.test(t)}function b(t){const n=document.createElement("a");n.setAttribute("href",t),n.dispatchEvent(new MouseEvent("click",{view:window,bubbles:!0,cancelable:!0}))}function p(t){d(t),u.success({text:l("commons.copied_to_clipboard")})}return(t,n)=>{const i=f("FontAwesomeIcon");return r(),a(g,null,[n[2]||(n[2]=o("div",{class:"too-bad"},null,-1)),o("div",h,s(t.$t("errors.data_of_qrcode_is_not_valid_URI")),1),o("div",q,s(e.qrContent?e.qrContent:"["+("trans"in t?t.trans:w(l))("commons.nothing")+"]"),1),e.qrContent?(r(),a("div",$,[o("button",{type:"button",class:"button is-link is-outlined is-rounded",onClick:n[0]||(n[0]=y(k=>p(e.qrContent),["stop"]))},s(t.$t("commons.copy_to_clipboard")),1)])):c("",!0),m(e.qrContent)?(r(),a("div",{key:1,class:"block has-text-link",onClick:n[1]||(n[1]=k=>b(e.qrContent))},[o("button",E,[o("span",null,s(t.$t("commons.open_in_browser")),1),o("span",B,[_(i,{icon:["fas","external-link-alt"]})])])])):c("",!0)],64)}}};export{I as _};
|
||
|
//# sourceMappingURL=QrContentDisplay-C2fFtz-5.js.map
|