Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/text.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'js/editor-collab.js.map')
-rw-r--r--js/editor-collab.js.map2
1 files changed, 1 insertions, 1 deletions
diff --git a/js/editor-collab.js.map b/js/editor-collab.js.map
index 6dd2dd08d..27aa80473 100644
--- a/js/editor-collab.js.map
+++ b/js/editor-collab.js.map
@@ -1 +1 @@
-{"version":3,"sources":["webpack:///./src/components/SessionList.vue?551b","webpack:///src/components/SessionList.vue","webpack:///./src/components/SessionList.vue","webpack:///./src/components/SessionList.vue?8d52","webpack:///./src/components/SessionList.vue?b344","webpack:///./src/components/SessionList.vue?df5b"],"names":["component","___CSS_LOADER_EXPORT___","push","module","i","render","_vm","this","_h","$createElement","_c","_self","staticClass","directives","name","rawName","value","expression","modifiers","on","$event","popoverVisible","sessionsPopover","length","_e","_v","_l","session","key","id","style","sessionStyle","attrs","userId","guestName","_t","staticRenderFns","options","locals"],"mappings":"oGAAA,yHAA2L,YAAG,G,mGC0C9L,gBACA,YACA,YACA,Q,6xBAEA,I,EAGA,CACA,mBACA,YACA,iBACA,uBAEA,YACA,mBAEA,OACA,UACA,YACA,+BAGA,KAfA,WAgBA,OACA,kBACA,YAGA,UACA,eADA,WAEA,kCACA,iHACA,sCACA,sEAEA,mHAEA,UATA,WAUA,mBACA,uCAEA,gBACA,oBACA,wDACA,CACA,OACA,KANA,KAQA,8DAGA,eAvBA,WAwBA,+DACA,6BAhDA,KAgDA,cACA,yCAGA,eA7BA,WA8BA,6EAEA,aAhCA,WAiCA,mBACA,OACA,qCA3DA,GA2DA,QAKA,gBAxCA,WAyCA,uCAEA,gBA3CA,WA2CA,WACA,SACA,8CACA,OACA,SACA,oBACA,kDAMA,Y,8CC9HA,4IAQIA,EAAY,YACd,UACA,IACA,KACA,EACA,KACA,WACA,MAIa,UAAAA,E,0CCnBf,6BAGIC,EAHJ,MAG8B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,EAAI,0uBAA2uB,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,8CAA8C,MAAQ,GAAG,SAAW,sRAAsR,eAAiB,CAAC,i9BAAi9B,WAAa,MAE1mE,O,qGCPf,IAAIC,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,gBAAgB,CAACF,EAAG,MAAM,CAACG,WAAW,CAAC,CAACC,KAAK,UAAUC,QAAQ,mBAAmBC,MAAOV,EAAkB,eAAEW,WAAW,iBAAiBC,UAAU,CAAC,QAAS,KAAQN,YAAY,cAAcO,GAAG,CAAC,MAAQ,SAASC,GAAQd,EAAIe,gBAAgBf,EAAIe,kBAAkB,CAAEf,EAAIgB,gBAAgBC,OAAS,EAAGb,EAAG,MAAM,CAACE,YAAY,wBAAwBN,EAAIkB,KAAKlB,EAAImB,GAAG,KAAKnB,EAAIoB,GAAIpB,EAAmB,iBAAE,SAASqB,GAAS,OAAOjB,EAAG,SAAS,CAACkB,IAAID,EAAQE,GAAGC,MAAOxB,EAAIyB,aAAaJ,GAAUK,MAAM,CAAC,KAAOL,EAAQM,OAASN,EAAQM,OAASN,EAAQO,UAAU,WAA8B,OAAnBP,EAAQM,OAAgB,mBAAkB,EAAK,KAAO,UAAS,GAAG3B,EAAImB,GAAG,KAAKf,EAAG,MAAM,CAACG,WAAW,CAAC,CAACC,KAAK,OAAOC,QAAQ,SAASC,MAAOV,EAAkB,eAAEW,WAAW,mBAAmBL,YAAY,0BAA0B,CAACF,EAAG,cAAc,CAACsB,MAAM,CAAC,KAAO1B,EAAIgB,mBAAmBhB,EAAImB,GAAG,KAAKnB,EAAI6B,GAAG,YAAY,MACt9BC,EAAkB,I,+DCElBC,EAAU,CAEd,OAAiB,OACjB,WAAoB,GAEP,IAAI,IAASA,GAIX,IAAQC","file":"editor-collab.js?v=fbe2f40a217e0200bc2d","sourcesContent":["import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SessionList.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SessionList.vue?vue&type=script&lang=js&\"","<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<div class=\"session-list\">\n\t\t<div v-tooltip.bottom=\"editorsTooltip\" class=\"avatar-list\" @click=\"popoverVisible=!popoverVisible\">\n\t\t\t<div v-if=\"sessionsPopover.length > 0\" class=\"avatardiv icon-more\" />\n\t\t\t<Avatar v-for=\"session in sessionsVisible\"\n\t\t\t\t:key=\"session.id\"\n\t\t\t\t:user=\"session.userId ? session.userId : session.guestName\"\n\t\t\t\t:is-guest=\"session.userId === null\"\n\t\t\t\t:disable-tooltip=\"true\"\n\t\t\t\t:style=\"sessionStyle(session)\"\n\t\t\t\t:size=\"32\" />\n\t\t</div>\n\t\t<div v-show=\"popoverVisible\" class=\"popovermenu menu-right\">\n\t\t\t<PopoverMenu :menu=\"sessionsPopover\" />\n\t\t\t<slot />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport Avatar from '@nextcloud/vue/dist/Components/Avatar'\nimport PopoverMenu from '@nextcloud/vue/dist/Components/PopoverMenu'\nimport Tooltip from '@nextcloud/vue/dist/Directives/Tooltip'\nimport { generateUrl } from '@nextcloud/router'\n\nconst COLLABORATOR_IDLE_TIME = 60\nconst COLLABORATOR_DISCONNECT_TIME = 90\n\nexport default {\n\tname: 'SessionList',\n\tcomponents: {\n\t\tAvatar,\n\t\tPopoverMenu,\n\t},\n\tdirectives: {\n\t\ttooltip: Tooltip,\n\t},\n\tprops: {\n\t\tsessions: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => { return {} },\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tpopoverVisible: '',\n\t\t\tmyName: '',\n\t\t}\n\t},\n\tcomputed: {\n\t\teditorsTooltip() {\n\t\t\tif (this.sessionsPopover.length > 0) {\n\t\t\t\tconst first = this.activeSessions.slice(0, 3).map((session) => session.guestName ? session.guestName : session.displayName).join(', ')\n\t\t\t\tconst others = this.activeSessions.slice(3).length\n\t\t\t\treturn first + ' ' + n('text', 'and %n other editor', 'and %n other editors', others)\n\t\t\t}\n\t\t\treturn this.activeSessions.slice(0, 3).map((session) => session.guestName ? session.guestName : session.displayName).join(', ')\n\t\t},\n\t\tavatarUrl() {\n\t\t\treturn (session) => {\n\t\t\t\tconst user = !session.guestName ? session.userId : session.guestName\n\t\t\t\tconst size = 32\n\t\t\t\tconst guest = !!session.guestName\n\t\t\t\tconst avatarUrl = generateUrl(\n\t\t\t\t\tguest ? '/avatar/guest/{user}/{size}' : '/avatar/{user}/{size}',\n\t\t\t\t\t{\n\t\t\t\t\t\tuser,\n\t\t\t\t\t\tsize,\n\t\t\t\t\t})\n\t\t\t\treturn window.location.protocol + '//' + window.location.host + avatarUrl\n\t\t\t}\n\t\t},\n\t\tactiveSessions() {\n\t\t\treturn Object.values(this.sessions).filter((session) =>\n\t\t\t\tsession.lastContact > Date.now() / 1000 - COLLABORATOR_DISCONNECT_TIME && !session.isCurrent\n\t\t\t\t\t&& (session.userId !== null || session.guestName !== null)\n\t\t\t)\n\t\t},\n\t\tcurrentSession() {\n\t\t\treturn Object.values(this.sessions).find((session) => session.isCurrent)\n\t\t},\n\t\tsessionStyle() {\n\t\t\treturn (session) => {\n\t\t\t\treturn {\n\t\t\t\t\topacity: session.lastContact > Date.now() / 1000 - COLLABORATOR_IDLE_TIME ? 1 : 0.5,\n\t\t\t\t\t// 'border-color': session.color\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tsessionsVisible() {\n\t\t\treturn this.activeSessions.slice(0, 3)\n\t\t},\n\t\tsessionsPopover() {\n\t\t\treturn [\n\t\t\t\t...this.activeSessions.slice(3).map((session) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\thref: '#',\n\t\t\t\t\t\ticon: this.avatarUrl(session),\n\t\t\t\t\t\ttext: session.guestName ? session.guestName : session.displayName,\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t]\n\t\t},\n\t},\n\tmethods: {\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t.session-list {\n\t\tposition: relative;\n\n\t\t/deep/ .popovermenu {\n\t\t\tmargin-right: -4px;\n\t\t\timg {\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 32px !important;\n\t\t\t\theight: 32px !important;\n\t\t\t\tmargin: 6px;\n\t\t\t\tborder-radius: 50%;\n\t\t\t\tfilter: none !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t.avatar-list {\n\t\tdisplay: inline-flex;\n\t\tflex-direction: row-reverse;\n\n\t\t.avatardiv,\n\t\t/deep/ .avatardiv {\n\t\t\twidth: 36px;\n\t\t\theight: 36px;\n\t\t\tmargin-right: -8px;\n\t\t\tborder: 2px solid var(--color-main-background);\n\t\t\tbox-sizing: content-box !important;\n\t\t\t&.icon-more {\n\t\t\t\twidth: 32px;\n\t\t\t\theight: 32px;\n\t\t\t\topacity: .5;\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\t\t}\n\t}\n\n\t.popovermenu {\n\t\tdisplay: block;\n\t}\n</style>\n","import { render, staticRenderFns } from \"./SessionList.vue?vue&type=template&id=77055db6&scoped=true&\"\nimport script from \"./SessionList.vue?vue&type=script&lang=js&\"\nexport * from \"./SessionList.vue?vue&type=script&lang=js&\"\nimport style0 from \"./SessionList.vue?vue&type=style&index=0&id=77055db6&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"77055db6\",\n null\n \n)\n\nexport default component.exports","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".session-list[data-v-77055db6]{position:relative}.session-list[data-v-77055db6] .popovermenu{margin-right:-4px}.session-list[data-v-77055db6] .popovermenu img{padding:0;width:32px !important;height:32px !important;margin:6px;border-radius:50%;filter:none !important}.avatar-list[data-v-77055db6]{display:inline-flex;flex-direction:row-reverse}.avatar-list .avatardiv[data-v-77055db6],.avatar-list[data-v-77055db6] .avatardiv{width:36px;height:36px;margin-right:-8px;border:2px solid var(--color-main-background);box-sizing:content-box !important}.avatar-list .avatardiv.icon-more[data-v-77055db6],.avatar-list[data-v-77055db6] .avatardiv.icon-more{width:32px;height:32px;opacity:.5;cursor:pointer}.popovermenu[data-v-77055db6]{display:block}\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/SessionList.vue\"],\"names\":[],\"mappings\":\"AAoIA,+BACC,iBAAkB,CADnB,4CAIE,iBAAkB,CAJpB,gDAMG,SAAU,CACV,qBAAsB,CACtB,sBAAuB,CACvB,UAAW,CACX,iBAAkB,CAClB,sBAAuB,CACvB,8BAKF,mBAAoB,CACpB,0BAA2B,CAF5B,kFAME,UAAW,CACX,WAAY,CACZ,iBAAkB,CAClB,6CAA8C,CAC9C,iCAAkC,CAVpC,sGAYG,UAAW,CACX,WAAY,CACZ,UAAW,CACX,cAAe,CACf,8BAKF,aAAc\",\"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.session-list {\\n\\tposition: relative;\\n\\n\\t/deep/ .popovermenu {\\n\\t\\tmargin-right: -4px;\\n\\t\\timg {\\n\\t\\t\\tpadding: 0;\\n\\t\\t\\twidth: 32px !important;\\n\\t\\t\\theight: 32px !important;\\n\\t\\t\\tmargin: 6px;\\n\\t\\t\\tborder-radius: 50%;\\n\\t\\t\\tfilter: none !important;\\n\\t\\t}\\n\\t}\\n}\\n\\n.avatar-list {\\n\\tdisplay: inline-flex;\\n\\tflex-direction: row-reverse;\\n\\n\\t.avatardiv,\\n\\t/deep/ .avatardiv {\\n\\t\\twidth: 36px;\\n\\t\\theight: 36px;\\n\\t\\tmargin-right: -8px;\\n\\t\\tborder: 2px solid var(--color-main-background);\\n\\t\\tbox-sizing: content-box !important;\\n\\t\\t&.icon-more {\\n\\t\\t\\twidth: 32px;\\n\\t\\t\\theight: 32px;\\n\\t\\t\\topacity: .5;\\n\\t\\t\\tcursor: pointer;\\n\\t\\t}\\n\\t}\\n}\\n\\n.popovermenu {\\n\\tdisplay: block;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"session-list\"},[_c('div',{directives:[{name:\"tooltip\",rawName:\"v-tooltip.bottom\",value:(_vm.editorsTooltip),expression:\"editorsTooltip\",modifiers:{\"bottom\":true}}],staticClass:\"avatar-list\",on:{\"click\":function($event){_vm.popoverVisible=!_vm.popoverVisible}}},[(_vm.sessionsPopover.length > 0)?_c('div',{staticClass:\"avatardiv icon-more\"}):_vm._e(),_vm._v(\" \"),_vm._l((_vm.sessionsVisible),function(session){return _c('Avatar',{key:session.id,style:(_vm.sessionStyle(session)),attrs:{\"user\":session.userId ? session.userId : session.guestName,\"is-guest\":session.userId === null,\"disable-tooltip\":true,\"size\":32}})})],2),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.popoverVisible),expression:\"popoverVisible\"}],staticClass:\"popovermenu menu-right\"},[_c('PopoverMenu',{attrs:{\"menu\":_vm.sessionsPopover}}),_vm._v(\" \"),_vm._t(\"default\")],2)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import api from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SessionList.vue?vue&type=style&index=0&id=77055db6&scoped=true&lang=scss&\";\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};"],"sourceRoot":""} \ No newline at end of file
+{"version":3,"sources":["webpack:///./src/components/SessionList.vue?551b","webpack:///src/components/SessionList.vue","webpack:///./src/components/SessionList.vue","webpack:///./src/components/SessionList.vue?8d52","webpack:///./src/components/SessionList.vue?b344","webpack:///./src/components/SessionList.vue?df5b"],"names":["component","___CSS_LOADER_EXPORT___","push","module","i","render","_vm","this","_h","$createElement","_c","_self","staticClass","directives","name","rawName","value","expression","modifiers","on","$event","popoverVisible","sessionsPopover","length","_e","_v","_l","session","key","id","style","sessionStyle","attrs","userId","guestName","_t","staticRenderFns","options","locals"],"mappings":"oGAAA,yHAA2L,YAAG,G,mGC0C9L,gBACA,YACA,YACA,Q,6xBAEA,I,EAGA,CACA,mBACA,YACA,iBACA,uBAEA,YACA,mBAEA,OACA,UACA,YACA,+BAGA,KAfA,WAgBA,OACA,kBACA,YAGA,UACA,eADA,WAEA,kCACA,iHACA,sCACA,sEAEA,mHAEA,UATA,WAUA,mBACA,uCAEA,gBACA,oBACA,wDACA,CACA,OACA,KANA,KAQA,8DAGA,eAvBA,WAwBA,+DACA,6BAhDA,KAgDA,cACA,yCAGA,eA7BA,WA8BA,6EAEA,aAhCA,WAiCA,mBACA,OACA,qCA3DA,GA2DA,QAKA,gBAxCA,WAyCA,uCAEA,gBA3CA,WA2CA,WACA,SACA,8CACA,OACA,SACA,oBACA,kDAMA,Y,8CC9HA,4IAQIA,EAAY,YACd,UACA,IACA,KACA,EACA,KACA,WACA,MAIa,UAAAA,E,0CCnBf,6BAGIC,EAHJ,MAG8B,GAA4B,KAE1DA,EAAwBC,KAAK,CAACC,EAAOC,EAAI,0uBAA2uB,GAAG,CAAC,QAAU,EAAE,QAAU,CAAC,8CAA8C,MAAQ,GAAG,SAAW,sRAAsR,eAAiB,CAAC,i9BAAi9B,WAAa,MAE1mE,O,qGCPf,IAAIC,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,gBAAgB,CAACF,EAAG,MAAM,CAACG,WAAW,CAAC,CAACC,KAAK,UAAUC,QAAQ,mBAAmBC,MAAOV,EAAkB,eAAEW,WAAW,iBAAiBC,UAAU,CAAC,QAAS,KAAQN,YAAY,cAAcO,GAAG,CAAC,MAAQ,SAASC,GAAQd,EAAIe,gBAAgBf,EAAIe,kBAAkB,CAAEf,EAAIgB,gBAAgBC,OAAS,EAAGb,EAAG,MAAM,CAACE,YAAY,wBAAwBN,EAAIkB,KAAKlB,EAAImB,GAAG,KAAKnB,EAAIoB,GAAIpB,EAAmB,iBAAE,SAASqB,GAAS,OAAOjB,EAAG,SAAS,CAACkB,IAAID,EAAQE,GAAGC,MAAOxB,EAAIyB,aAAaJ,GAAUK,MAAM,CAAC,KAAOL,EAAQM,OAASN,EAAQM,OAASN,EAAQO,UAAU,WAA8B,OAAnBP,EAAQM,OAAgB,mBAAkB,EAAK,KAAO,UAAS,GAAG3B,EAAImB,GAAG,KAAKf,EAAG,MAAM,CAACG,WAAW,CAAC,CAACC,KAAK,OAAOC,QAAQ,SAASC,MAAOV,EAAkB,eAAEW,WAAW,mBAAmBL,YAAY,0BAA0B,CAACF,EAAG,cAAc,CAACsB,MAAM,CAAC,KAAO1B,EAAIgB,mBAAmBhB,EAAImB,GAAG,KAAKnB,EAAI6B,GAAG,YAAY,MACt9BC,EAAkB,I,+DCElBC,EAAU,CAEd,OAAiB,OACjB,WAAoB,GAEP,IAAI,IAASA,GAIX,IAAQC","file":"editor-collab.js?v=effdb2e215fdf26a4a49","sourcesContent":["import mod from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SessionList.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../node_modules/babel-loader/lib/index.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SessionList.vue?vue&type=script&lang=js&\"","<!--\n - @copyright Copyright (c) 2019 Julius Härtl <jus@bitgrid.net>\n -\n - @author Julius Härtl <jus@bitgrid.net>\n -\n - @license GNU AGPL version 3 or any later version\n -\n - This program is free software: you can redistribute it and/or modify\n - it under the terms of the GNU Affero General Public License as\n - published by the Free Software Foundation, either version 3 of the\n - License, or (at your option) any later version.\n -\n - This program is distributed in the hope that it will be useful,\n - but WITHOUT ANY WARRANTY; without even the implied warranty of\n - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\n - GNU Affero General Public License for more details.\n -\n - You should have received a copy of the GNU Affero General Public License\n - along with this program. If not, see <http://www.gnu.org/licenses/>.\n -\n -->\n\n<template>\n\t<div class=\"session-list\">\n\t\t<div v-tooltip.bottom=\"editorsTooltip\" class=\"avatar-list\" @click=\"popoverVisible=!popoverVisible\">\n\t\t\t<div v-if=\"sessionsPopover.length > 0\" class=\"avatardiv icon-more\" />\n\t\t\t<Avatar v-for=\"session in sessionsVisible\"\n\t\t\t\t:key=\"session.id\"\n\t\t\t\t:user=\"session.userId ? session.userId : session.guestName\"\n\t\t\t\t:is-guest=\"session.userId === null\"\n\t\t\t\t:disable-tooltip=\"true\"\n\t\t\t\t:style=\"sessionStyle(session)\"\n\t\t\t\t:size=\"32\" />\n\t\t</div>\n\t\t<div v-show=\"popoverVisible\" class=\"popovermenu menu-right\">\n\t\t\t<PopoverMenu :menu=\"sessionsPopover\" />\n\t\t\t<slot />\n\t\t</div>\n\t</div>\n</template>\n\n<script>\nimport Avatar from '@nextcloud/vue/dist/Components/Avatar'\nimport PopoverMenu from '@nextcloud/vue/dist/Components/PopoverMenu'\nimport Tooltip from '@nextcloud/vue/dist/Directives/Tooltip'\nimport { generateUrl } from '@nextcloud/router'\n\nconst COLLABORATOR_IDLE_TIME = 60\nconst COLLABORATOR_DISCONNECT_TIME = 90\n\nexport default {\n\tname: 'SessionList',\n\tcomponents: {\n\t\tAvatar,\n\t\tPopoverMenu,\n\t},\n\tdirectives: {\n\t\ttooltip: Tooltip,\n\t},\n\tprops: {\n\t\tsessions: {\n\t\t\ttype: Object,\n\t\t\tdefault: () => { return {} },\n\t\t},\n\t},\n\tdata() {\n\t\treturn {\n\t\t\tpopoverVisible: '',\n\t\t\tmyName: '',\n\t\t}\n\t},\n\tcomputed: {\n\t\teditorsTooltip() {\n\t\t\tif (this.sessionsPopover.length > 0) {\n\t\t\t\tconst first = this.activeSessions.slice(0, 3).map((session) => session.guestName ? session.guestName : session.displayName).join(', ')\n\t\t\t\tconst others = this.activeSessions.slice(3).length\n\t\t\t\treturn first + ' ' + n('text', 'and %n other editor', 'and %n other editors', others)\n\t\t\t}\n\t\t\treturn this.activeSessions.slice(0, 3).map((session) => session.guestName ? session.guestName : session.displayName).join(', ')\n\t\t},\n\t\tavatarUrl() {\n\t\t\treturn (session) => {\n\t\t\t\tconst user = !session.guestName ? session.userId : session.guestName\n\t\t\t\tconst size = 32\n\t\t\t\tconst guest = !!session.guestName\n\t\t\t\tconst avatarUrl = generateUrl(\n\t\t\t\t\tguest ? '/avatar/guest/{user}/{size}' : '/avatar/{user}/{size}',\n\t\t\t\t\t{\n\t\t\t\t\t\tuser,\n\t\t\t\t\t\tsize,\n\t\t\t\t\t})\n\t\t\t\treturn window.location.protocol + '//' + window.location.host + avatarUrl\n\t\t\t}\n\t\t},\n\t\tactiveSessions() {\n\t\t\treturn Object.values(this.sessions).filter((session) =>\n\t\t\t\tsession.lastContact > Date.now() / 1000 - COLLABORATOR_DISCONNECT_TIME && !session.isCurrent\n\t\t\t\t\t&& (session.userId !== null || session.guestName !== null)\n\t\t\t)\n\t\t},\n\t\tcurrentSession() {\n\t\t\treturn Object.values(this.sessions).find((session) => session.isCurrent)\n\t\t},\n\t\tsessionStyle() {\n\t\t\treturn (session) => {\n\t\t\t\treturn {\n\t\t\t\t\topacity: session.lastContact > Date.now() / 1000 - COLLABORATOR_IDLE_TIME ? 1 : 0.5,\n\t\t\t\t\t// 'border-color': session.color\n\t\t\t\t}\n\t\t\t}\n\t\t},\n\t\tsessionsVisible() {\n\t\t\treturn this.activeSessions.slice(0, 3)\n\t\t},\n\t\tsessionsPopover() {\n\t\t\treturn [\n\t\t\t\t...this.activeSessions.slice(3).map((session) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\thref: '#',\n\t\t\t\t\t\ticon: this.avatarUrl(session),\n\t\t\t\t\t\ttext: session.guestName ? session.guestName : session.displayName,\n\t\t\t\t\t}\n\t\t\t\t}),\n\t\t\t]\n\t\t},\n\t},\n\tmethods: {\n\t},\n}\n</script>\n\n<style scoped lang=\"scss\">\n\t.session-list {\n\t\tposition: relative;\n\n\t\t/deep/ .popovermenu {\n\t\t\tmargin-right: -4px;\n\t\t\timg {\n\t\t\t\tpadding: 0;\n\t\t\t\twidth: 32px !important;\n\t\t\t\theight: 32px !important;\n\t\t\t\tmargin: 6px;\n\t\t\t\tborder-radius: 50%;\n\t\t\t\tfilter: none !important;\n\t\t\t}\n\t\t}\n\t}\n\n\t.avatar-list {\n\t\tdisplay: inline-flex;\n\t\tflex-direction: row-reverse;\n\n\t\t.avatardiv,\n\t\t/deep/ .avatardiv {\n\t\t\twidth: 36px;\n\t\t\theight: 36px;\n\t\t\tmargin-right: -8px;\n\t\t\tborder: 2px solid var(--color-main-background);\n\t\t\tbox-sizing: content-box !important;\n\t\t\t&.icon-more {\n\t\t\t\twidth: 32px;\n\t\t\t\theight: 32px;\n\t\t\t\topacity: .5;\n\t\t\t\tcursor: pointer;\n\t\t\t}\n\t\t}\n\t}\n\n\t.popovermenu {\n\t\tdisplay: block;\n\t}\n</style>\n","import { render, staticRenderFns } from \"./SessionList.vue?vue&type=template&id=77055db6&scoped=true&\"\nimport script from \"./SessionList.vue?vue&type=script&lang=js&\"\nexport * from \"./SessionList.vue?vue&type=script&lang=js&\"\nimport style0 from \"./SessionList.vue?vue&type=style&index=0&id=77055db6&scoped=true&lang=scss&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"77055db6\",\n null\n \n)\n\nexport default component.exports","// Imports\nimport ___CSS_LOADER_API_SOURCEMAP_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/cssWithMappingToString.js\";\nimport ___CSS_LOADER_API_IMPORT___ from \"../../node_modules/css-loader/dist/runtime/api.js\";\nvar ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_SOURCEMAP_IMPORT___);\n// Module\n___CSS_LOADER_EXPORT___.push([module.id, \".session-list[data-v-77055db6]{position:relative}.session-list[data-v-77055db6] .popovermenu{margin-right:-4px}.session-list[data-v-77055db6] .popovermenu img{padding:0;width:32px !important;height:32px !important;margin:6px;border-radius:50%;filter:none !important}.avatar-list[data-v-77055db6]{display:inline-flex;flex-direction:row-reverse}.avatar-list .avatardiv[data-v-77055db6],.avatar-list[data-v-77055db6] .avatardiv{width:36px;height:36px;margin-right:-8px;border:2px solid var(--color-main-background);box-sizing:content-box !important}.avatar-list .avatardiv.icon-more[data-v-77055db6],.avatar-list[data-v-77055db6] .avatardiv.icon-more{width:32px;height:32px;opacity:.5;cursor:pointer}.popovermenu[data-v-77055db6]{display:block}\\n\", \"\",{\"version\":3,\"sources\":[\"webpack://./src/components/SessionList.vue\"],\"names\":[],\"mappings\":\"AAoIA,+BACC,iBAAkB,CADnB,4CAIE,iBAAkB,CAJpB,gDAMG,SAAU,CACV,qBAAsB,CACtB,sBAAuB,CACvB,UAAW,CACX,iBAAkB,CAClB,sBAAuB,CACvB,8BAKF,mBAAoB,CACpB,0BAA2B,CAF5B,kFAME,UAAW,CACX,WAAY,CACZ,iBAAkB,CAClB,6CAA8C,CAC9C,iCAAkC,CAVpC,sGAYG,UAAW,CACX,WAAY,CACZ,UAAW,CACX,cAAe,CACf,8BAKF,aAAc\",\"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.session-list {\\n\\tposition: relative;\\n\\n\\t/deep/ .popovermenu {\\n\\t\\tmargin-right: -4px;\\n\\t\\timg {\\n\\t\\t\\tpadding: 0;\\n\\t\\t\\twidth: 32px !important;\\n\\t\\t\\theight: 32px !important;\\n\\t\\t\\tmargin: 6px;\\n\\t\\t\\tborder-radius: 50%;\\n\\t\\t\\tfilter: none !important;\\n\\t\\t}\\n\\t}\\n}\\n\\n.avatar-list {\\n\\tdisplay: inline-flex;\\n\\tflex-direction: row-reverse;\\n\\n\\t.avatardiv,\\n\\t/deep/ .avatardiv {\\n\\t\\twidth: 36px;\\n\\t\\theight: 36px;\\n\\t\\tmargin-right: -8px;\\n\\t\\tborder: 2px solid var(--color-main-background);\\n\\t\\tbox-sizing: content-box !important;\\n\\t\\t&.icon-more {\\n\\t\\t\\twidth: 32px;\\n\\t\\t\\theight: 32px;\\n\\t\\t\\topacity: .5;\\n\\t\\t\\tcursor: pointer;\\n\\t\\t}\\n\\t}\\n}\\n\\n.popovermenu {\\n\\tdisplay: block;\\n}\\n\"],\"sourceRoot\":\"\"}]);\n// Exports\nexport default ___CSS_LOADER_EXPORT___;\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"session-list\"},[_c('div',{directives:[{name:\"tooltip\",rawName:\"v-tooltip.bottom\",value:(_vm.editorsTooltip),expression:\"editorsTooltip\",modifiers:{\"bottom\":true}}],staticClass:\"avatar-list\",on:{\"click\":function($event){_vm.popoverVisible=!_vm.popoverVisible}}},[(_vm.sessionsPopover.length > 0)?_c('div',{staticClass:\"avatardiv icon-more\"}):_vm._e(),_vm._v(\" \"),_vm._l((_vm.sessionsVisible),function(session){return _c('Avatar',{key:session.id,style:(_vm.sessionStyle(session)),attrs:{\"user\":session.userId ? session.userId : session.guestName,\"is-guest\":session.userId === null,\"disable-tooltip\":true,\"size\":32}})})],2),_vm._v(\" \"),_c('div',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.popoverVisible),expression:\"popoverVisible\"}],staticClass:\"popovermenu menu-right\"},[_c('PopoverMenu',{attrs:{\"menu\":_vm.sessionsPopover}}),_vm._v(\" \"),_vm._t(\"default\")],2)])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import api from \"!../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js\";\n import content from \"!!../../node_modules/css-loader/dist/cjs.js!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/sass-loader/dist/cjs.js!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./SessionList.vue?vue&type=style&index=0&id=77055db6&scoped=true&lang=scss&\";\n\nvar options = {};\n\noptions.insert = \"head\";\noptions.singleton = false;\n\nvar update = api(content, options);\n\n\n\nexport default content.locals || {};"],"sourceRoot":""} \ No newline at end of file