nextcloud/dist/comments-init.mjs.map
nextcloud-command 78098c8325 chore(assets): Recompile assets
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
2026-04-01 13:41:02 +00:00

1 line
No EOL
3.6 KiB
Text

{"version":3,"file":"comments-init.mjs","sources":["../node_modules/@mdi/svg/svg/comment-processing.svg?raw","../build/frontend/apps/comments/src/actions/inlineUnreadCommentsAction.ts","../build/frontend/apps/comments/src/init.ts"],"sourcesContent":["export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" id=\\\"mdi-comment-processing\\\" viewBox=\\\"0 0 24 24\\\"><path d=\\\"M9,22A1,1 0 0,1 8,21V18H4A2,2 0 0,1 2,16V4C2,2.89 2.9,2 4,2H20A2,2 0 0,1 22,4V16A2,2 0 0,1 20,18H13.9L10.2,21.71C10,21.9 9.75,22 9.5,22V22H9M17,11V9H15V11H17M13,11V9H11V11H13M9,11V9H7V11H9Z\\\" /></svg>\"","/*!\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { IFileAction } from '@nextcloud/files'\n\nimport CommentProcessingSvg from '@mdi/svg/svg/comment-processing.svg?raw'\nimport { getSidebar } from '@nextcloud/files'\nimport { n, t } from '@nextcloud/l10n'\nimport logger from '../logger.ts'\nimport { isUsingActivityIntegration } from '../utils/activity.ts'\n\nexport const action: IFileAction = {\n\tid: 'comments-unread',\n\n\ttitle({ nodes }) {\n\t\tconst unread = nodes[0]?.attributes['comments-unread'] as number | undefined\n\t\tif (typeof unread === 'number' && unread >= 0) {\n\t\t\treturn n('comments', '1 new comment', '{unread} new comments', unread, { unread })\n\t\t}\n\t\treturn t('comments', 'Comment')\n\t},\n\n\t// Empty string when rendered inline\n\tdisplayName: () => '',\n\n\ticonSvgInline: () => CommentProcessingSvg,\n\n\tenabled({ nodes }) {\n\t\tconst unread = nodes[0]?.attributes?.['comments-unread'] as number | undefined\n\t\treturn typeof unread === 'number' && unread > 0\n\t},\n\n\tasync exec({ nodes }) {\n\t\tif (nodes.length !== 1 || !nodes[0]) {\n\t\t\treturn false\n\t\t}\n\n\t\ttry {\n\t\t\tconst sidebar = getSidebar()\n\t\t\tconst sidebarTabId = isUsingActivityIntegration() ? 'activity' : 'comments'\n\t\t\tif (sidebar.isOpen && sidebar.node?.source === nodes[0].source) {\n\t\t\t\tlogger.debug('Sidebar already open for this node, just activating comments tab')\n\t\t\t\tsidebar.setActiveTab(sidebarTabId)\n\t\t\t\treturn null\n\t\t\t}\n\t\t\tsidebar.open(nodes[0], sidebarTabId)\n\t\t\treturn null\n\t\t} catch (error) {\n\t\t\tlogger.error('Error while opening sidebar', { error })\n\t\t\treturn false\n\t\t}\n\t},\n\n\tinline: () => true,\n\n\torder: -140,\n}\n","/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport { registerFileAction } from '@nextcloud/files'\nimport { action } from './actions/inlineUnreadCommentsAction.ts'\n\nregisterFileAction(action)\n"],"names":["CommentProcessingSvg","action","nodes","unread","n","t","sidebar","getSidebar","sidebarTabId","isUsingActivityIntegration","logger","error","registerFileAction"],"mappings":"0UAAA,MAAAA,EAAe,2SCaFC,EAAsB,CAClC,GAAI,kBAEJ,MAAM,CAAE,MAAAC,GAAS,CAChB,MAAMC,EAASD,EAAM,CAAC,GAAG,WAAW,iBAAiB,EACrD,OAAI,OAAOC,GAAW,UAAYA,GAAU,EACpCC,EAAE,WAAY,gBAAiB,wBAAyBD,EAAQ,CAAE,OAAAA,EAAQ,EAE3EE,EAAE,WAAY,SAAS,CAC/B,EAGA,YAAa,IAAM,GAEnB,cAAe,IAAML,EAErB,QAAQ,CAAE,MAAAE,GAAS,CAClB,MAAMC,EAASD,EAAM,CAAC,GAAG,aAAa,iBAAiB,EACvD,OAAO,OAAOC,GAAW,UAAYA,EAAS,CAC/C,EAEA,MAAM,KAAK,CAAE,MAAAD,GAAS,CACrB,GAAIA,EAAM,SAAW,GAAK,CAACA,EAAM,CAAC,EACjC,MAAO,GAGR,GAAI,CACH,MAAMI,EAAUC,EAAA,EACVC,EAAeC,IAA+B,WAAa,WACjE,OAAIH,EAAQ,QAAUA,EAAQ,MAAM,SAAWJ,EAAM,CAAC,EAAE,QACvDQ,EAAO,MAAM,kEAAkE,EAC/EJ,EAAQ,aAAaE,CAAY,EAC1B,OAERF,EAAQ,KAAKJ,EAAM,CAAC,EAAGM,CAAY,EAC5B,KACR,OAASG,EAAO,CACf,OAAAD,EAAO,MAAM,8BAA+B,CAAE,MAAAC,CAAA,CAAO,EAC9C,EACR,CACD,EAEA,OAAQ,IAAM,GAEd,MAAO,IACR,EClDAC,EAAmBX,CAAM","x_google_ignoreList":[0]}