nextcloud/dist/core-recommendedapps.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

2 lines
11 KiB
JavaScript
Raw Permalink Normal View History

(()=>{"use strict";var e,t={45919:(e,t,n)=>{var i=n(21777),o=n(53334),a=n(85471),r=n(65043),s=n(81222),c=n(63814);function d(e,t,n){(function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")})(e,t),t.set(e,n)}function p(e,t,n){return e.set(u(e,t),n),n}function l(e,t){return e.get(u(e,t))}function u(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function h(e,t,n){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}class m{constructor(e){h(this,"value",void 0),h(this,"next",void 0),this.value=e}}var A=new WeakMap,g=new WeakMap,v=new WeakMap;class f{constructor(){d(this,A,void 0),d(this,g,void 0),d(this,v,void 0),this.clear()}enqueue(e){var t;const n=new m(e);l(A,this)?(l(g,this).next=n,p(g,this,n)):(p(A,this,n),p(g,this,n)),p(v,this,(t=l(v,this),++t))}dequeue(){var e;const t=l(A,this);if(t)return p(A,this,l(A,this).next),p(v,this,(e=l(v,this),--e)),t.value}peek(){if(l(A,this))return l(A,this).value}clear(){p(A,this,void 0),p(g,this,void 0),p(v,this,0)}get size(){return l(v,this)}*[Symbol.iterator](){let e=l(A,this);for(;e;)yield e.value,e=e.next}*drain(){for(;l(A,this);)yield this.dequeue()}}function C(e){b(e);const t=new f;let n=0;const i=()=>{n<e&&t.size>0&&(n++,t.dequeue()())},o=async(e,t,o)=>{const a=(async()=>e(...o))();t(a);try{await a}catch{}n--,i()},a=function(a){for(var r=arguments.length,s=new Array(r>1?r-1:0),c=1;c<r;c++)s[c-1]=arguments[c];return new Promise(r=>{((a,r,s)=>{new Promise(e=>{t.enqueue(e)}).then(o.bind(void 0,a,r,s)),n<e&&i()})(a,r,s)})};return Object.defineProperties(a,{activeCount:{get:()=>n},pendingCount:{get:()=>t.size},clearQueue:{value(){t.clear()}},concurrency:{get:()=>e,set(o){b(o),e=o,queueMicrotask(()=>{for(;n<e&&t.size>0;)i()})}},map:{async value(e,t){const n=e.map((e,n)=>this(t,e,n));return Promise.all(n)}}}),a}function b(e){if(!Number.isInteger(e)&&e!==Number.POSITIVE_INFINITY||!(e>0))throw new TypeError("Expected `concurrency` to be a number from 1 and up")}var y=n(74095),w=n(32073),x=n(35947);const _=null===(k=(0,i.HW)())?(0,x.YK)().setApp("core").build():(0,x.YK)().setApp("core").setUid(k.uid).build();var k;(0,x.YK)().setApp("unified-search").detectUser().build();const S={calendar:{description:(0,o.t)("core","Schedule work & meetings, synced with all your devices."),icon:(0,c.d0)("core","places/calendar.svg")},contacts:{description:(0,o.t)("core","Keep your colleagues and friends in one place without leaking their private info."),icon:(0,c.d0)("core","places/contacts.svg")},mail:{description:(0,o.t)("core","Simple email app nicely integrated with Files, Contacts and Calendar."),icon:(0,c.d0)("core","actions/mail.svg")},spreed:{description:(0,o.t)("core","Chatting, video calls, screen sharing, online meetings and web conferencing in your browser and with mobile apps."),icon:(0,c.d0)("core","apps/spreed.svg")},richdocuments:{name:"Nextcloud Office",description:(0,o.t)("core","Collaborative documents, spreadsheets and presentations, built on Collabora Online."),icon:(0,c.d0)("core","apps/richdocuments.svg")},notes:{description:(0,o.t)("core","Distraction free note taking app."),icon:(0,c.d0)("core","apps/notes.svg")},richdocumentscode:{hidden:!0}},I=Object.keys(S),P={name:"RecommendedApps",components:{NcCheckboxRadioSwitch:w.A,NcButton:y.A},data:()=>({showInstallButton:!1,installingApps:!1,loadingApps:!0,loadingAppsError:!1,apps:[],defaultPageUrl:(0,s.C)("core","defaultPageUrl")}),computed:{recommendedApps(){return this.apps.filter(e=>I.includes(e.id))},isAnyAppSelected(){return this.recommendedApps.some(e=>e.isSelected)}},async mounted(){try{const{data:e}=await r.Ay.get((0,c.Jv)("settings/apps/list
//# sourceMappingURL=core-recommendedapps.js.map?v=bcf2c5e5fc1833681bb0