mirror of
https://github.com/nextcloud/server.git
synced 2026-04-23 23:27:46 -04:00
build(comments): move from frontend-legacy to frontend
Signed-off-by: Edward Ly <contact@edward.ly>
This commit is contained in:
parent
bb1ad1ca15
commit
4edf863803
5 changed files with 6 additions and 8 deletions
|
|
@ -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({
|
||||
|
|
|
|||
|
|
@ -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'),
|
||||
|
|
|
|||
|
|
@ -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'),
|
||||
|
|
|
|||
Loading…
Reference in a new issue