Skip to content

Commit b5d5602

Browse files
committed
refactor(comments): migrate to TypeScript
Signed-off-by: Edward Ly <contact@edward.ly>
1 parent 24ca317 commit b5d5602

20 files changed

+27
-27
lines changed

apps/comments/src/actions/inlineUnreadCommentsAction.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import type { IFolder, IView } from '@nextcloud/files'
77

88
import { File, Permission } from '@nextcloud/files'
99
import { describe, expect, test, vi } from 'vitest'
10-
import logger from '../logger.js'
10+
import logger from '../logger.ts'
1111
import { action } from './inlineUnreadCommentsAction.ts'
1212

1313
const view = {

apps/comments/src/actions/inlineUnreadCommentsAction.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import type { IFileAction } from '@nextcloud/files'
88
import CommentProcessingSvg from '@mdi/svg/svg/comment-processing.svg?raw'
99
import { getSidebar } from '@nextcloud/files'
1010
import { n, t } from '@nextcloud/l10n'
11-
import logger from '../logger.js'
12-
import { isUsingActivityIntegration } from '../utils/activity.js'
11+
import logger from '../logger.ts'
12+
import { isUsingActivityIntegration } from '../utils/activity.ts'
1313

1414
export const action: IFileAction = {
1515
id: 'comments-unread',

apps/comments/src/comments-activity-tab.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ import type { INode } from '@nextcloud/files'
88
import moment from '@nextcloud/moment'
99
import { createPinia, PiniaVuePlugin } from 'pinia'
1010
import Vue, { type ComponentPublicInstance } from 'vue'
11-
import logger from './logger.js'
12-
import { getComments } from './services/GetComments.js'
11+
import logger from './logger.ts'
12+
import { getComments } from './services/GetComments.ts'
1313

1414
Vue.use(PiniaVuePlugin)
1515

apps/comments/src/comments-app.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
55

6-
import logger from './logger.js'
7-
import CommentsInstance from './services/CommentsInstance.js'
6+
import logger from './logger.ts'
7+
import CommentsInstance from './services/CommentsInstance.ts'
88

99
// Init Comments
1010
if (window.OCA && !window.OCA.Comments) {

apps/comments/src/components/Comment.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ import IconArrowRight from 'vue-material-design-icons/ArrowRight.vue'
125125
import IconClose from 'vue-material-design-icons/Close.vue'
126126
import IconPencilOutline from 'vue-material-design-icons/PencilOutline.vue'
127127
import IconTrashCanOutline from 'vue-material-design-icons/TrashCanOutline.vue'
128-
import CommentMixin from '../mixins/CommentMixin.js'
129-
import { useDeletedCommentLimbo } from '../store/deletedCommentLimbo.js'
128+
import CommentMixin from '../mixins/CommentMixin.ts'
129+
import { useDeletedCommentLimbo } from '../store/deletedCommentLimbo.ts'
130130
131131
// Dynamic loading
132132
const NcRichContenteditable = () => import('@nextcloud/vue/components/NcRichContenteditable')
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@
55

66
import { showError, showUndo, TOAST_UNDO_TIMEOUT } from '@nextcloud/dialogs'
77
import { mapStores } from 'pinia'
8-
import logger from '../logger.js'
9-
import DeleteComment from '../services/DeleteComment.js'
10-
import EditComment from '../services/EditComment.js'
11-
import NewComment from '../services/NewComment.js'
12-
import { useDeletedCommentLimbo } from '../store/deletedCommentLimbo.js'
8+
import logger from '../logger.ts'
9+
import DeleteComment from '../services/DeleteComment.ts'
10+
import EditComment from '../services/EditComment.ts'
11+
import NewComment from '../services/NewComment.ts'
12+
import { useDeletedCommentLimbo } from '../store/deletedCommentLimbo.ts'
1313

1414
export default {
1515
props: {

apps/comments/src/services/CommentsInstance.js renamed to apps/comments/src/services/CommentsInstance.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { n, t } from '@nextcloud/l10n'
88
import { createPinia, PiniaVuePlugin } from 'pinia'
99
import Vue from 'vue'
1010
import CommentsApp from '../views/Comments.vue'
11-
import logger from '../logger.js'
11+
import logger from '../logger.ts'
1212

1313
Vue.use(PiniaVuePlugin)
1414

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
import { getRequestToken, onRequestTokenUpdate } from '@nextcloud/auth'
77
import { createClient } from 'webdav'
8-
import { getRootPath } from '../utils/davUtils.js'
8+
import { getRootPath } from '../utils/davUtils.ts'
99

1010
// init webdav client
1111
const client = createClient(getRootPath())

apps/comments/src/services/DeleteComment.js renamed to apps/comments/src/services/DeleteComment.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* SPDX-License-Identifier: AGPL-3.0-or-later
44
*/
55

6-
import client from './DavClient.js'
6+
import client from './DavClient.ts'
77

88
/**
99
* Delete a comment

0 commit comments

Comments
 (0)