You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

federatedfilesharing-vue-settings-personal.js 10.0KB

12
  1. !function(){"use strict";var n,e={23105:function(n,e,r){var o=r(20144),i=r(22200),a=r(9944),l=(r(73317),r(26932)),c=r(16453),s=r(13299),d=r.n(s),u=r(10861),f=r.n(u),p=r(8731),h=r(78095),g=r(49298),m=r(75017),b=r(15168),v=r.n(b);function C(n,t,e,r,o,i,a){try{var l=n[i](a),c=l.value}catch(n){return void e(n)}l.done?t(c):Promise.resolve(c).then(r,o)}var y={name:"PersonalSettings",components:{NcButton:f(),NcSettingsSection:d(),Twitter:p.Z,Facebook:h.Z,Web:g.Z,Clipboard:m.Z},directives:{Tooltip:v()},data:function(){return{color:(0,c.loadState)("federatedfilesharing","color"),textColor:(0,c.loadState)("federatedfilesharing","textColor"),logoPath:(0,c.loadState)("federatedfilesharing","logoPath"),reference:(0,c.loadState)("federatedfilesharing","reference"),cloudId:(0,c.loadState)("federatedfilesharing","cloudId"),docUrlFederated:(0,c.loadState)("federatedfilesharing","docUrlFederated"),showHtml:!1,isCopied:!1}},computed:{messageWithURL:function(){return t("federatedfilesharing","Share with me through my #Nextcloud Federated Cloud ID, see {url}",{url:this.reference})},messageWithoutURL:function(){return t("federatedfilesharing","Share with me through my #Nextcloud Federated Cloud ID")},shareDiasporaUrl:function(){return"https://share.diasporafoundation.org/?title=".concat(encodeURIComponent(this.messageWithoutURL),"&url=").concat(encodeURIComponent(this.reference))},shareTwitterUrl:function(){return"https://twitter.com/intent/tweet?text=".concat(encodeURIComponent(this.messageWithURL))},shareFacebookUrl:function(){return"https://www.facebook.com/sharer/sharer.php?u=".concat(encodeURIComponent(this.reference))},logoPathAbsolute:function(){return window.location.protocol+"//"+window.location.host+this.logoPath},backgroundStyle:function(){return"padding:10px;background-color:".concat(this.color,";color:").concat(this.textColor,";border-radius:3px;padding-left:4px;")},linkStyle:function(){return"background-image:url(".concat(this.logoPathAbsolute,");width:50px;height:30px;position:relative;top:8px;background-size:contain;display:inline-block;background-repeat:no-repeat; background-position: center center;")},htmlCode:function(){return'<a target="_blank" rel="noreferrer noopener" href="'.concat(this.reference,'" style="').concat(this.backgroundStyle,'">\n\t<span style="').concat(this.linkStyle,'"></span>\n\t').concat(t("federatedfilesharing","Share with me via Nextcloud"),"\n</a>")},copyLinkTooltip:function(){return this.isCopied?t("federatedfilesharing","Cloud ID copied to the clipboard"):t("federatedfilesharing","Copy to clipboard")}},methods:{copyCloudId:function(){var n,e=this;return(n=regeneratorRuntime.mark((function n(){return regeneratorRuntime.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:if(navigator.clipboard){n.next=3;break}return(0,l.showError)(t("federatedfilesharing","Clipboard is not available")),n.abrupt("return");case 3:return n.next=5,navigator.clipboard.writeText(e.cloudId);case 5:e.isCopied=!0,e.$refs.clipboard.$el.focus();case 7:case"end":return n.stop()}}),n)})),function(){var t=this,e=arguments;return new Promise((function(r,o){var i=n.apply(t,e);function a(n){C(i,r,o,a,l,"next",n)}function l(n){C(i,r,o,a,l,"throw",n)}a(void 0)}))})()},goTo:function(n){window.location.href=n}}},A=y,w=r(93379),x=r.n(w),k=r(7795),_=r.n(k),S=r(90569),T=r.n(S),I=r(3565),U=r.n(I),B=r(19216),F=r.n(B),O=r(44589),P=r.n(O),N=r(15337),R={};R.styleTagTransform=P(),R.setAttributes=U(),R.insert=T().bind(null,"head"),R.domAPI=_(),R.insertStyleElement=F(),x()(N.Z,R),N.Z&&N.Z.locals&&N.Z.locals;var Z=(0,r(51900).Z)(A,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("NcSettingsSection",{attrs:{title:n.t("federatedfilesharing","Federated Cloud"),description:n.t("federatedfilesharing","You can share with anyone who uses a Nextcloud 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"),"doc-url":n.docUrlFederated}},[e("p",{staticClass:"cloud-id-text"},[n._v("\n\t\t"+n._s(n.t("federatedfilesharing","Your Federated Cloud ID:"))+"\n\t\t"),e("strong",{attrs:{id:"cloudid"}},[n._v(n._s(n.cloudId))]),n._v(" "),e("NcButton",{directives:[{name:"tooltip",rawName:"v-tooltip",value:n.copyLinkTooltip,expression:"copyLinkTooltip"}],ref:"clipboard",staticClass:"clipboard",attrs:{type:"tertiary-no-background"},on:{click:function(t){return t.preventDefault(),n.copyCloudId.apply(null,arguments)}},scopedSlots:n._u([{key:"icon",fn:function(){return[e("Clipboard",{attrs:{size:20}})]},proxy:!0}])})],1),n._v(" "),e("p",{staticClass:"social-button"},[n._v("\n\t\t"+n._s(n.t("federatedfilesharing","Share it so your friends can share files with you:"))),e("br"),n._v(" "),e("NcButton",{on:{click:function(t){return n.goTo(n.shareFacebookUrl)}},scopedSlots:n._u([{key:"icon",fn:function(){return[e("Facebook",{attrs:{size:20}})]},proxy:!0}])},[n._v("\n\t\t\t"+n._s(n.t("federatedfilesharing","Facebook"))+"\n\t\t\t")]),n._v(" "),e("NcButton",{on:{click:function(t){return n.goTo(n.shareTwitterUrl)}},scopedSlots:n._u([{key:"icon",fn:function(){return[e("Twitter",{attrs:{size:20}})]},proxy:!0}])},[n._v("\n\t\t\t"+n._s(n.t("federatedfilesharing","Twitter"))+"\n\t\t\t")]),n._v(" "),e("NcButton",{on:{click:function(t){return n.goTo(n.shareDiasporaUrl)}},scopedSlots:n._u([{key:"icon",fn:function(){return[e("svg",{attrs:{width:"20",height:"20",viewBox:"-10 -5 1034 1034",xmlns:"http://www.w3.org/2000/svg"}},[e("path",{attrs:{fill:"currentColor",d:"M502 197q-96 0-96.5 1.5t-1.5 137-1.5 138-2 2.5T266 432.5 132.5 390t-30 94T74 578l232 77q21 8 21 10t-79.5 117.5T168 899t79.5 56.5T328 1011t81-110 82-110 41 55l83 115q43 60 44 60t79.5-58 79-59-76-112.5-76-113.5T795 632.5t129.5-44-28-94T867 400t-128 42-128.5 43-2.5-7.5-1-38.5l-3-108q-4-133-5-133.5t-97-.5z"}})])]},proxy:!0}])},[n._v("\n\t\t\t"+n._s(n.t("federatedfilesharing","Diaspora"))+"\n\t\t\t")]),n._v(" "),e("NcButton",{on:{click:function(t){n.showHtml=!n.showHtml}},scopedSlots:n._u([{key:"icon",fn:function(){return[e("Web",{attrs:{size:20}})]},proxy:!0}])},[n._v("\n\t\t\t"+n._s(n.t("federatedfilesharing","Add to your website"))+"\n\t\t")])],1),n._v(" "),n.showHtml?[e("p",{staticStyle:{margin:"10px 0"}},[e("a",{style:n.backgroundStyle,attrs:{target:"_blank",rel:"noreferrer noopener",href:n.reference}},[e("span",{style:n.linkStyle}),n._v("\n\t\t\t\t"+n._s(n.t("federatedfilesharing","Share with me via Nextcloud"))+"\n\t\t\t")])]),n._v(" "),e("p",[n._v("\n\t\t\t"+n._s(n.t("federatedfilesharing","HTML Code:"))+"\n\t\t\t"),e("br"),n._v(" "),e("pre",[n._v(n._s(n.htmlCode))])])]:n._e()],2)}),[],!1,null,"e3fb521a",null),D=Z.exports;r.nc=btoa((0,i.getRequestToken)()),o.ZP.mixin({methods:{t:a.translate}}),(new(o.ZP.extend(D))).$mount("#vue-personal-federated")},15337:function(n,t,e){var r=e(87537),o=e.n(r),i=e(23645),a=e.n(i)()(o());a.push([n.id,".social-button[data-v-e3fb521a]{margin-top:.5rem}.social-button button[data-v-e3fb521a]{display:inline-flex;margin-left:.5rem;margin-top:1rem}.cloud-id-text[data-v-e3fb521a]{display:flex;align-items:center}.cloud-id-text button[data-v-e3fb521a]{display:inline-flex}pre[data-v-e3fb521a]{margin-top:0;white-space:pre-wrap}#cloudid[data-v-e3fb521a]{margin-left:.25rem}","",{version:3,sources:["webpack://./apps/federatedfilesharing/src/components/PersonalSettings.vue"],names:[],mappings:"AAiLA,gCACC,gBAAA,CACA,uCACC,mBAAA,CACA,iBAAA,CACA,eAAA,CAGF,gCACC,YAAA,CACA,kBAAA,CACA,uCACC,mBAAA,CAGF,qBACC,YAAA,CACA,oBAAA,CAED,0BACC,kBAAA",sourcesContent:["\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n.social-button {\n\tmargin-top: 0.5rem;\n\tbutton {\n\t\tdisplay: inline-flex;\n\t\tmargin-left: 0.5rem;\n\t\tmargin-top: 1rem;\n\t}\n}\n.cloud-id-text {\n\tdisplay: flex;\n\talign-items: center;\n\tbutton {\n\t\tdisplay: inline-flex;\n\t}\n}\npre {\n\tmargin-top: 0;\n\twhite-space: pre-wrap;\n}\n#cloudid {\n\tmargin-left: 0.25rem;\n}\n"],sourceRoot:""}]),t.Z=a}},r={};function o(n){var t=r[n];if(void 0!==t)return t.exports;var i=r[n]={id:n,loaded:!1,exports:{}};return e[n].call(i.exports,i,i.exports,o),i.loaded=!0,i.exports}o.m=e,o.amdD=function(){throw new Error("define cannot be used indirect")},o.amdO={},n=[],o.O=function(t,e,r,i){if(!e){var a=1/0;for(d=0;d<n.length;d++){e=n[d][0],r=n[d][1],i=n[d][2];for(var l=!0,c=0;c<e.length;c++)(!1&i||a>=i)&&Object.keys(o.O).every((function(n){return o.O[n](e[c])}))?e.splice(c--,1):(l=!1,i<a&&(a=i));if(l){n.splice(d--,1);var s=r();void 0!==s&&(t=s)}}return t}i=i||0;for(var d=n.length;d>0&&n[d-1][2]>i;d--)n[d]=n[d-1];n[d]=[e,r,i]},o.n=function(n){var t=n&&n.__esModule?function(){return n.default}:function(){return n};return o.d(t,{a:t}),t},o.d=function(n,t){for(var e in t)o.o(t,e)&&!o.o(n,e)&&Object.defineProperty(n,e,{enumerable:!0,get:t[e]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(n){if("object"==typeof window)return window}}(),o.o=function(n,t){return Object.prototype.hasOwnProperty.call(n,t)},o.r=function(n){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(n,"__esModule",{value:!0})},o.nmd=function(n){return n.paths=[],n.children||(n.children=[]),n},o.j=5855,function(){o.b=document.baseURI||self.location.href;var n={5855:0};o.O.j=function(t){return 0===n[t]};var t=function(t,e){var r,i,a=e[0],l=e[1],c=e[2],s=0;if(a.some((function(t){return 0!==n[t]}))){for(r in l)o.o(l,r)&&(o.m[r]=l[r]);if(c)var d=c(o)}for(t&&t(e);s<a.length;s++)i=a[s],o.o(n,i)&&n[i]&&n[i][0](),n[i]=0;return o.O(d)},e=self.webpackChunknextcloud=self.webpackChunknextcloud||[];e.forEach(t.bind(null,0)),e.push=t.bind(null,e.push.bind(e))}(),o.nc=void 0;var i=o.O(void 0,[7874],(function(){return o(23105)}));i=o.O(i)}();
  2. //# sourceMappingURL=federatedfilesharing-vue-settings-personal.js.map?v=919cc2207cd34ca7b268