build(comments): move from frontend-legacy to frontend

Signed-off-by: Edward Ly <contact@edward.ly>
This commit is contained in:
Edward Ly 2026-02-13 22:13:00 -08:00 committed by Ferdinand Thiessen
parent bb1ad1ca15
commit 4edf863803
5 changed files with 6 additions and 8 deletions

View file

@ -5,7 +5,6 @@
import type { INode } from '@nextcloud/files'
import moment from '@nextcloud/moment'
import { createPinia, PiniaVuePlugin } from 'pinia'
import Vue, { type ComponentPublicInstance } from 'vue'
import logger from './logger.js'
@ -57,13 +56,12 @@ export function registerCommentsPlugins() {
)
logger.debug('Loaded comments', { node, comments })
const { default: CommentView } = await import('./views/ActivityCommentEntry.vue')
// @ts-expect-error Types are broken for Vue2
const CommentsViewObject = Vue.extend(CommentView)
return comments.map((comment) => ({
_CommentsViewInstance: undefined as ComponentPublicInstance | undefined,
timestamp: moment(comment.props?.creationDateTime).toDate().getTime(),
timestamp: Date.parse(comment.props?.creationDateTime as string | undefined ?? ''),
mount(element: HTMLElement, { reload }) {
this._CommentsViewInstance = new CommentsViewObject({

View file

@ -5,11 +5,6 @@
const path = require('path')
module.exports = {
comments: {
'comments-app': path.join(__dirname, 'apps/comments/src', 'comments-app.js'),
'comments-tab': path.join(__dirname, 'apps/comments/src', 'files-sidebar.ts'),
init: path.join(__dirname, 'apps/comments/src', 'init.ts'),
},
core: {
'ajax-cron': path.join(__dirname, 'core/src', 'ajax-cron.ts'),
install: path.join(__dirname, 'core/src', 'install.ts'),

View file

@ -7,6 +7,11 @@ import { createAppConfig } from '@nextcloud/vite-config'
import { resolve } from 'node:path'
const modules = {
comments: {
'comments-app': resolve(import.meta.dirname, 'apps/comments/src', 'comments-app.ts'),
'comments-tab': resolve(import.meta.dirname, 'apps/comments/src', 'files-sidebar.ts'),
init: resolve(import.meta.dirname, 'apps/comments/src', 'init.ts'),
},
dav: {
'settings-admin-caldav': resolve(import.meta.dirname, 'apps/dav/src', 'settings-admin.ts'),
'settings-admin-example-content': resolve(import.meta.dirname, 'apps/dav/src', 'settings-admin-example-content.ts'),