1
0
mirror of https://github.com/donaldzou/WGDashboard.git synced 2024-11-22 07:10:09 +01:00
This commit is contained in:
Donald Zou 2024-11-06 23:25:20 +08:00
parent 04ef2ea3b6
commit 3276c9a84c
3 changed files with 4 additions and 3 deletions

View File

@ -0,0 +1 @@
.slide-up-enter-active[data-v-e8a2c914],.slide-up-leave-active[data-v-e8a2c914]{transition:all .2s cubic-bezier(.42,0,.22,1)}.slide-up-enter-from[data-v-e8a2c914],.slide-up-leave-to[data-v-e8a2c914]{opacity:0;transform:scale(.9)}@keyframes spin-e8a2c914{0%{transform:rotate(0)}to{transform:rotate(360deg)}}#check[data-v-e8a2c914]{animation:cubic-bezier(.42,0,.22,1.3) .7s spin-e8a2c914}

View File

@ -1 +1 @@
import{L as l}from"./localeText.js";import{D as u,a as p,c as m,b as e,d as b}from"./index.js";const g={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},f={class:"container d-flex h-100 w-100"},h={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},_={class:"card rounded-3 shadow w-100"},x={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},C={class:"mb-0"},v={class:"card-body"},y=["value"],D={__name:"peerConfigurationFile",props:{configurationFile:String},emits:["close"],setup(s,{emit:a}){const n=a,i=s,t=u(),r=async()=>{if(navigator.clipboard&&navigator.clipboard.writeText)return navigator.clipboard.writeText(i.configurationFile).then(()=>{t.newMessage("WGDashboard","Configuration file copied with ClipboardAPI","success")});document.querySelector("#peerConfigurationFile").select(),document.execCommand("copy")?t.newMessage("WGDashboard","Text copied to clipboard using execCommand","success"):t.newMessage("WGDashboard","Failed to copy text with execCommand","danger")};return(c,o)=>(p(),m("div",g,[e("div",f,[e("div",h,[e("div",_,[e("div",x,[e("h4",C,[b(l,{t:"Configuration File"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:o[0]||(o[0]=d=>n("close"))})]),e("div",v,[e("button",{onClick:o[1]||(o[1]=d=>r()),class:"btn bg-primary-subtle border-primary-subtle text-primary-emphasis rounded-3"}," Copy "),e("textarea",{style:{height:"300px"},class:"form-control w-100 rounded-3",disabled:"",id:"peerConfigurationFile",value:s.configurationFile},null,8,y)])])])])]))}};export{D as default}; import{_ as f,D as m,r as _,a as o,c as a,b as e,d as l,w as g,T as h}from"./index.js";import{L as v}from"./localeText.js";const y={class:"peerSettingContainer w-100 h-100 position-absolute top-0 start-0"},x={class:"container d-flex h-100 w-100"},w={class:"m-auto modal-dialog-centered dashboardModal justify-content-center"},C={class:"card rounded-3 shadow w-100"},k={class:"card-header bg-transparent d-flex align-items-center gap-2 border-0 p-4 pb-0"},F={class:"mb-0"},T={class:"card-body p-4"},D={class:"d-flex"},S=["disabled"],B={key:0,class:"d-block"},M={key:1,class:"d-block",id:"check"},G=["value"],L={__name:"peerConfigurationFile",props:{configurationFile:String},emits:["close"],setup(i,{emit:r}){const c=r,d=i,n=m(),s=_(!1),u=async()=>{navigator.clipboard&&navigator.clipboard.writeText?navigator.clipboard.writeText(d.configurationFile).then(()=>{s.value=!0,setTimeout(()=>{s.value=!1},3e3)}).catch(()=>{n.newMessage("WGDashboard","Failed to copy","danger")}):(document.querySelector("#peerConfigurationFile").select(),document.execCommand("copy")?(s.value=!0,setTimeout(()=>{s.value=!1},3e3)):n.newMessage("WGDashboard","Failed to copy","danger"))};return(p,t)=>(o(),a("div",y,[e("div",x,[e("div",w,[e("div",C,[e("div",k,[e("h4",F,[l(v,{t:"Peer Configuration File"})]),e("button",{type:"button",class:"btn-close ms-auto",onClick:t[0]||(t[0]=b=>c("close"))})]),e("div",T,[e("div",D,[e("button",{onClick:t[1]||(t[1]=b=>u()),disabled:s.value,class:"ms-auto btn bg-primary-subtle border-primary-subtle text-primary-emphasis rounded-3 position-relative"},[l(h,{name:"slide-up",mode:"out-in"},{default:g(()=>[s.value?(o(),a("span",M,t[3]||(t[3]=[e("i",{class:"bi bi-check-circle-fill"},null,-1)]))):(o(),a("span",B,t[2]||(t[2]=[e("i",{class:"bi bi-clipboard-fill"},null,-1)])))]),_:1})],8,S)]),e("textarea",{style:{height:"300px"},class:"form-control w-100 rounded-3 mt-2",disabled:"",id:"peerConfigurationFile",value:i.configurationFile},null,8,G)])])])])]))}},W=f(L,[["__scopeId","data-v-e8a2c914"]]);export{W as default};

File diff suppressed because one or more lines are too long