1
2
|
!function(){"use strict";var n,e={54946:function(n,e,r){var o=r(20144),i=r(22200),a=r(9944),l=(r(73317),r(26932)),s=r(16453),d=r(67776),c=r.n(d),u=r(1412),f=r.n(u),p=r(31104),h=r(40751),g=r(40852),m=r(72449),v=r(15168),b=r.n(v);function C(n,t,e,r,o,i,a){try{var l=n[i](a),s=l.value}catch(n){return void e(n)}l.done?t(s):Promise.resolve(s).then(r,o)}var y={name:"PersonalSettings",components:{Button:f(),SettingsSection:c(),Twitter:p.Z,Facebook:h.Z,Web:g.Z,Clipboard:m.Z},directives:{Tooltip:b()},data:function(){return{color:(0,s.loadState)("federatedfilesharing","color"),textColor:(0,s.loadState)("federatedfilesharing","textColor"),logoPath:(0,s.loadState)("federatedfilesharing","logoPath"),reference:(0,s.loadState)("federatedfilesharing","reference"),cloudId:(0,s.loadState)("federatedfilesharing","cloudId"),docUrlFederated:(0,s.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.x2)(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),R=r(90323),D={};D.styleTagTransform=P(),D.setAttributes=U(),D.insert=T().bind(null,"head"),D.domAPI=_(),D.insertStyleElement=F(),x()(R.Z,D),R.Z&&R.Z.locals&&R.Z.locals;var Z=(0,r(51900).Z)(A,(function(){var n=this,t=n.$createElement,e=n._self._c||t;return e("SettingsSection",{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("Button",{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("Button",{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("Button",{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("Button",{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("Button",{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,"003d1a3f",null),j=Z.exports;r.nc=btoa((0,i.getRequestToken)()),o.default.mixin({methods:{t:a.translate}}),(new(o.default.extend(j))).$mount("#vue-personal-federated")},90323: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-003d1a3f]{margin-top:.5rem}.social-button button[data-v-003d1a3f]{display:inline-flex;margin-left:.5rem;margin-top:1rem}.cloud-id-text[data-v-003d1a3f]{display:flex;align-items:center}.cloud-id-text button[data-v-003d1a3f]{display:inline-flex}pre[data-v-003d1a3f]{margin-top:0;white-space:pre-wrap}#cloudid[data-v-003d1a3f]{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(c=0;c<n.length;c++){e=n[c][0],r=n[c][1],i=n[c][2];for(var l=!0,s=0;s<e.length;s++)(!1&i||a>=i)&&Object.keys(o.O).every((function(n){return o.O[n](e[s])}))?e.splice(s--,1):(l=!1,i<a&&(a=i));if(l){n.splice(c--,1);var d=r();void 0!==d&&(t=d)}}return t}i=i||0;for(var c=n.length;c>0&&n[c-1][2]>i;c--)n[c]=n[c-1];n[c]=[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],s=e[2],d=0;if(a.some((function(t){return 0!==n[t]}))){for(r in l)o.o(l,r)&&(o.m[r]=l[r]);if(s)var c=s(o)}for(t&&t(e);d<a.length;d++)i=a[d],o.o(n,i)&&n[i]&&n[i][0](),n[i]=0;return o.O(c)},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(54946)}));i=o.O(i)}();
//# sourceMappingURL=federatedfilesharing-vue-settings-personal.js.map?v=d20369de38b08cabe428
|