nextcloud/dist/federatedfilesharing-settings-personal.mjs
Ferdinand Thiessen b4b5986be9 chore: compile assets
Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
2026-01-27 23:52:40 +01:00

10 lines
7 KiB
JavaScript

import{j as s,o,k as i,l as I,t as l,z as L,b as Z,c as w,w as r,e as u,u as e,p as _,r as z,g as f,F as j,N as J,h as W}from"./runtime-dom.esm-bundler-DSTOTAEf.chunk.mjs";import{d as H}from"./index-JpgrUA2Z-D4yQFKNw.chunk.mjs";import{a as M,l as h}from"./index-xFugdZPW.chunk.mjs";import{t as a}from"./translation-DoG5ZELJ-2ffMJaM4.chunk.mjs";import{i as x}from"./createElementId-DhjFt1I9-Bjk2333q.chunk.mjs";import{c as b}from"./logger-D3RVzcfQ-iUjwSNGe.chunk.mjs";import{N as q}from"./NcInputField-Bwsh2aHY-Bf_22pmD.chunk.mjs";import{I as E,N as G}from"./ContentCopy-caJ7vqeg.chunk.mjs";import"./modulepreload-polyfill-BxzAKjcf.chunk.mjs";import"./index-Dzo4H_NA.chunk.mjs";import"./mdi-kAZc0JKn.chunk.mjs";import"./index-6_gsQFyp.chunk.mjs";import"./NcNoteCard-CVhtNL04-CdF6Qoal.chunk.mjs";const K={name:"CheckIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},Q=["aria-hidden","aria-label"],X=["fill","width","height"],ee={d:"M21,7L9,19L3.5,13.5L4.91,12.09L9,16.17L19.59,5.59L21,7Z"},ae={key:0};function te(d,n,t,k,p,y){return o(),s("span",L(d.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon check-icon",role:"img",onClick:n[0]||(n[0]=m=>d.$emit("click",m))}),[(o(),s("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[i("path",ee,[t.title?(o(),s("title",ae,l(t.title),1)):I("",!0)])],8,X))],16,Q)}const ie=M(K,[["render",te]]),re={name:"WebIcon",emits:["click"],props:{title:{type:String},fillColor:{type:String,default:"currentColor"},size:{type:Number,default:24}}},le=["aria-hidden","aria-label"],oe=["fill","width","height"],ne={d:"M16.36,14C16.44,13.34 16.5,12.68 16.5,12C16.5,11.32 16.44,10.66 16.36,10H19.74C19.9,10.64 20,11.31 20,12C20,12.69 19.9,13.36 19.74,14M14.59,19.56C15.19,18.45 15.65,17.25 15.97,16H18.92C17.96,17.65 16.43,18.93 14.59,19.56M14.34,14H9.66C9.56,13.34 9.5,12.68 9.5,12C9.5,11.32 9.56,10.65 9.66,10H14.34C14.43,10.65 14.5,11.32 14.5,12C14.5,12.68 14.43,13.34 14.34,14M12,19.96C11.17,18.76 10.5,17.43 10.09,16H13.91C13.5,17.43 12.83,18.76 12,19.96M8,8H5.08C6.03,6.34 7.57,5.06 9.4,4.44C8.8,5.55 8.35,6.75 8,8M5.08,16H8C8.35,17.25 8.8,18.45 9.4,19.56C7.57,18.93 6.03,17.65 5.08,16M4.26,14C4.1,13.36 4,12.69 4,12C4,11.31 4.1,10.64 4.26,10H7.64C7.56,10.66 7.5,11.32 7.5,12C7.5,12.68 7.56,13.34 7.64,14M12,4.03C12.83,5.23 13.5,6.57 13.91,8H10.09C10.5,6.57 11.17,5.23 12,4.03M18.92,8H15.97C15.65,6.75 15.19,5.55 14.59,4.44C16.43,5.07 17.96,6.34 18.92,8M12,2C6.47,2 2,6.5 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2Z"},se={key:0};function de(d,n,t,k,p,y){return o(),s("span",L(d.$attrs,{"aria-hidden":t.title?null:"true","aria-label":t.title,class:"material-design-icon web-icon",role:"img",onClick:n[0]||(n[0]=m=>d.$emit("click",m))}),[(o(),s("svg",{fill:t.fillColor,class:"material-design-icon__svg",width:t.size,height:t.size,viewBox:"0 0 24 24"},[i("path",ne,[t.title?(o(),s("title",se,l(t.title),1)):I("",!0)])],8,oe))],16,le)}const ce=M(re,[["render",de]]),ue={class:"social-button"},fe=["src"],he=["src"],pe=["src"],me={style:{margin:"10px 0"}},ge=["href"],Ce=Z({__name:"PersonalSettings",setup(d){const n=window.OC.theme.productName,t=h("federatedfilesharing","color"),k=h("federatedfilesharing","textColor"),p=h("federatedfilesharing","cloudId"),y=h("federatedfilesharing","docUrlFederated"),m=h("federatedfilesharing","logoPath"),g=h("federatedfilesharing","reference"),S=x("core","facebook"),F=x("core","mastodon"),U=x("core","bluesky"),B=a("federatedfilesharing","Share with me through my #Nextcloud Federated Cloud ID, see {url}",{url:g}),D=a("federatedfilesharing","Share with me through my #Nextcloud Federated Cloud ID"),R=`https://mastodon.social/?text=${encodeURIComponent(D)}&url=${encodeURIComponent(g)}`,T=`https://www.facebook.com/sharer/sharer.php?u=${encodeURIComponent(g)}`,A=`https://bsky.app/intent/compose?text=${encodeURIComponent(B)}`,O=new URL(m,location.origin),v=z(!1),C=z(!1),$=_(()=>`
padding:10px;
background-color:${t};
color:${k};
border-radius:3px;
padding-inline-start:4px;`),N=`background-image:url(${O});width:50px;height:30px;position:relative;top:8px;background-size:contain;display:inline-block;background-repeat:no-repeat; background-position: center center;`,P=_(()=>`<a target="_blank" rel="noreferrer noopener" href="${g}" style="${$.value}">
<span style="${N}"></span>
${a("federatedfilesharing","Share with me via Nextcloud")}
</a>`),V=_(()=>C.value?a("federatedfilesharing","Cloud ID copied"):a("federatedfilesharing","Copy"));async function Y(){try{await navigator.clipboard.writeText(p),H(a("federatedfilesharing","Cloud ID copied"))}catch{window.prompt(a("federatedfilesharing","Clipboard not available. Please copy the cloud ID manually."),p)}C.value=!0,H(a("federatedfilesharing","Copied!")),setTimeout(()=>{C.value=!1},2e3)}return(ye,c)=>(o(),w(e(G),{name:e(a)("federatedfilesharing","Federated Cloud"),description:e(a)("federatedfilesharing","You can share with anyone who uses a {productName} server or other Open Cloud Mesh (OCM) compatible servers and services! Just put their Federated Cloud ID in the share dialog. It looks like person@cloud.example.com",{productName:e(n)}),docUrl:e(y)},{default:r(()=>[u(e(q),{class:"federated-cloud__cloud-id",readonly:"",label:e(a)("federatedfilesharing","Your Federated Cloud ID"),modelValue:e(p),success:C.value,showTrailingButton:"",trailingButtonLabel:V.value,onTrailingButtonClick:Y},{"trailing-button-icon":r(()=>[C.value?(o(),w(ie,{key:0,size:20,fillColor:"var(--color-border-success)"})):(o(),w(E,{key:1,size:20}))]),_:1},8,["label","modelValue","success","trailingButtonLabel"]),i("p",ue,[f(l(e(a)("federatedfilesharing","Share it so your friends can share files with you:")),1),c[1]||(c[1]=i("br",null,null,-1)),u(e(b),{href:A},{icon:r(()=>[i("img",{class:"social-button__icon",src:e(U)},null,8,fe)]),default:r(()=>[f(l(e(a)("federatedfilesharing","Bluesky"))+" ",1)]),_:1}),u(e(b),{href:T},{icon:r(()=>[i("img",{class:"social-button__icon social-button__icon--bright",src:e(S)},null,8,he)]),default:r(()=>[f(l(e(a)("federatedfilesharing","Facebook"))+" ",1)]),_:1}),u(e(b),{href:R},{icon:r(()=>[i("img",{class:"social-button__icon",src:e(F)},null,8,pe)]),default:r(()=>[f(l(e(a)("federatedfilesharing","Mastodon"))+" ",1)]),_:1}),u(e(b),{class:"social-button__website-button",onClick:c[0]||(c[0]=ve=>v.value=!v.value)},{icon:r(()=>[u(ce,{size:20})]),default:r(()=>[f(" "+l(e(a)("federatedfilesharing","Add to your website")),1)]),_:1})]),v.value?(o(),s(j,{key:0},[i("p",me,[i("a",{target:"_blank",rel:"noreferrer noopener",href:e(g),style:J($.value)},[i("span",{style:N}),f(" "+l(e(a)("federatedfilesharing","Share with me via {productName}",{productName:e(n)})),1)],12,ge)]),i("div",null,[i("p",null,l(e(a)("federatedfilesharing","HTML Code:")),1),c[2]||(c[2]=i("br",null,null,-1)),i("pre",null,[i("code",null,l(P.value),1)])])],64)):I("",!0)]),_:1},8,["name","description","docUrl"]))}}),be=M(Ce,[["__scopeId","data-v-7ee4c871"]]),ke=W(be);ke.mount("#vue-personal-federated");
//# sourceMappingURL=federatedfilesharing-settings-personal.mjs.map