Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@
"@nextcloud/router": "^3.0.1",
"@nextcloud/sharing": "^0.2.4",
"@nextcloud/vue": "^8.27.0",
"@nextcloud/y-http": "^0.2.2",
"@quartzy/markdown-it-mentions": "^0.2.0",
"@tiptap/core": "^2.22.3",
"@tiptap/extension-blockquote": "^2.22.3",
Expand Down
10 changes: 6 additions & 4 deletions src/components/CollisionResolveDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import {
useEditorMixin,
useIsRichEditorMixin,
useSyncServiceMixin,
useConnectionMixin,
} from './Editor.provider.js'
import NcButton from '@nextcloud/vue/components/NcButton'
import setContent from './../mixins/setContent.js'
Expand All @@ -41,7 +41,7 @@ export default {
components: {
NcButton,
},
mixins: [useEditorMixin, useIsRichEditorMixin, setContent, useSyncServiceMixin],
mixins: [useEditorMixin, useIsRichEditorMixin, setContent, useConnectionMixin],
props: {
syncError: {
type: Object,
Expand All @@ -56,15 +56,17 @@ export default {
methods: {
resolveThisVersion() {
this.clicked = true
this.$syncService.forceSave().then(() => this.$syncService.syncUp())
// TODO: implement saving based on connection
// this.$syncService.forceSave().then(() => this.$syncService.syncUp())
this.$editor.setEditable(!this.readOnly)
},
resolveServerVersion() {
const { outsideChange } = this.syncError.data
this.clicked = true
this.$editor.setEditable(!this.readOnly)
this.setContent(outsideChange, { isRichEditor: this.$isRichEditor })
this.$syncService.forceSave().then(() => this.$syncService.syncUp())
// TODO: implement saving based on connection
// this.$syncService.forceSave().then(() => this.$syncService.syncUp())
},
},
}
Expand Down
8 changes: 4 additions & 4 deletions src/components/Editor.provider.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@

import { logger } from '../helpers/logger.js'

export const ATTACHMENT_RESOLVER = Symbol('attachment:resolver')
export const EDITOR = Symbol('tiptap:editor')
export const FILE = Symbol('editor:file')
export const ATTACHMENT_RESOLVER = Symbol('attachment:resolver')
export const IS_MOBILE = Symbol('editor:is-mobile')
export const IS_PUBLIC = Symbol('editor:is-public')
export const IS_RICH_EDITOR = Symbol('editor:is-rich-editor')
export const IS_RICH_WORKSPACE = Symbol('editor:is-rich-woskapace')
export const SYNC_SERVICE = Symbol('sync:service')
export const CONNECTION = Symbol('connection')
export const EDITOR_UPLOAD = Symbol('editor:upload')
export const HOOK_MENTION_SEARCH = Symbol('hook:mention-search')
export const HOOK_MENTION_INSERT = Symbol('hook:mention-insert')
Expand All @@ -23,9 +23,9 @@ export const useEditorMixin = {
},
}

export const useSyncServiceMixin = {
export const useConnectionMixin = {
inject: {
$syncService: { from: SYNC_SERVICE, default: null },
$connection: { from: CONNECTION, default: null },
},
}

Expand Down
Loading
Loading