1
|
{"version":3,"sources":["webpack:///nextcloud/apps/comments/src/comments-tab.js"],"names":["TabInstance","commentTab","OCA","Files","Sidebar","Tab","id","name","t","icon","mount","el","fileInfo","context","$destroy","Comments","View","parent","update","$mount","destroy","scrollBottomReached","onScrollBottomReached","window","addEventListener","registerTab"],"mappings":";qIAuBA,IAAIA,EAAc,KACZC,EAAa,IAAIC,IAAIC,MAAMC,QAAQC,IAAI,CAC5CC,GAAI,WACJC,KAAMC,EAAE,WAAY,YACpBC,KAAM,eAEAC,MALsC,SAKhCC,EAAIC,EAAUC,GAAS,O,EAAA,6HAC9Bb,GACHA,EAAYc,WAEbd,EAAc,IAAIE,IAAIa,SAASC,KAAK,QAAS,CAE5CC,OAAQJ,IANyB,SAS5Bb,EAAYkB,OAAON,EAASN,IATA,OAUlCN,EAAYmB,OAAOR,GAVe,0C,wLAYnCO,OAjB4C,SAiBrCN,GACNZ,EAAYkB,OAAON,EAASN,KAE7Bc,QApB4C,WAqB3CpB,EAAYc,WACZd,EAAc,MAEfqB,oBAxB4C,WAyB3CrB,EAAYsB,2BAIdC,OAAOC,iBAAiB,oBAAoB,WACvCtB,IAAIC,OAASD,IAAIC,MAAMC,SAC1BF,IAAIC,MAAMC,QAAQqB,YAAYxB,M","file":"comments-comments-tab.js?v=badfdc180a9f8cfb2cfa","sourcesContent":["/**\n * @copyright Copyright (c) 2020 John Molakvoæ <skjnldsv@protonmail.com>\n *\n * @author John Molakvoæ <skjnldsv@protonmail.com>\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// Init Comments tab component\nlet TabInstance = null\nconst commentTab = new OCA.Files.Sidebar.Tab({\n\tid: 'comments',\n\tname: t('comments', 'Comments'),\n\ticon: 'icon-comment',\n\n\tasync mount(el, fileInfo, context) {\n\t\tif (TabInstance) {\n\t\t\tTabInstance.$destroy()\n\t\t}\n\t\tTabInstance = new OCA.Comments.View('files', {\n\t\t\t// Better integration with vue parent component\n\t\t\tparent: context,\n\t\t})\n\t\t// Only mount after we have all the info we need\n\t\tawait TabInstance.update(fileInfo.id)\n\t\tTabInstance.$mount(el)\n\t},\n\tupdate(fileInfo) {\n\t\tTabInstance.update(fileInfo.id)\n\t},\n\tdestroy() {\n\t\tTabInstance.$destroy()\n\t\tTabInstance = null\n\t},\n\tscrollBottomReached() {\n\t\tTabInstance.onScrollBottomReached()\n\t},\n})\n\nwindow.addEventListener('DOMContentLoaded', function() {\n\tif (OCA.Files && OCA.Files.Sidebar) {\n\t\tOCA.Files.Sidebar.registerTab(commentTab)\n\t}\n})\n"],"sourceRoot":""}
|