internal: incomplete vault systems behind feature flag (#2340)
This commit is contained in:
@@ -45,6 +45,7 @@ import { SuperEditorContentId } from '../SuperEditor/Constants'
|
||||
import { NoteViewController } from './Controller/NoteViewController'
|
||||
import { PlainEditor, PlainEditorInterface } from './PlainEditor/PlainEditor'
|
||||
import { EditorMargins, EditorMaxWidths } from '../EditorWidthSelectionModal/EditorWidths'
|
||||
import CollaborationInfoHUD from './CollaborationInfoHUD'
|
||||
import Button from '../Button/Button'
|
||||
import ModalOverlay from '../Modal/ModalOverlay'
|
||||
import NoteConflictResolutionModal from './NoteConflictResolutionModal/NoteConflictResolutionModal'
|
||||
@@ -74,7 +75,7 @@ type State = {
|
||||
monospaceFont?: boolean
|
||||
plainEditorFocused?: boolean
|
||||
paneGestureEnabled?: boolean
|
||||
|
||||
noteLastEditedByUuid?: string
|
||||
updateSavingIndicator?: boolean
|
||||
editorFeatureIdentifier?: string
|
||||
noteType?: NoteType
|
||||
@@ -270,6 +271,12 @@ class NoteView extends AbstractComponent<NoteViewProps, State> {
|
||||
})
|
||||
}
|
||||
|
||||
if (note.last_edited_by_uuid !== this.state.noteLastEditedByUuid) {
|
||||
this.setState({
|
||||
noteLastEditedByUuid: note.last_edited_by_uuid,
|
||||
})
|
||||
}
|
||||
|
||||
if (note.locked !== this.state.noteLocked) {
|
||||
this.setState({
|
||||
noteLocked: note.locked,
|
||||
@@ -651,7 +658,10 @@ class NoteView extends AbstractComponent<NoteViewProps, State> {
|
||||
}
|
||||
|
||||
performNoteDeletion(note: SNNote) {
|
||||
this.application.mutator.deleteItem(note).catch(console.error)
|
||||
this.application.mutator
|
||||
.deleteItem(note)
|
||||
.then(() => this.application.sync.sync())
|
||||
.catch(console.error)
|
||||
}
|
||||
|
||||
onPanelResizeFinish = async (width: number, left: number, isMaxWidth: boolean) => {
|
||||
@@ -897,6 +907,7 @@ class NoteView extends AbstractComponent<NoteViewProps, State> {
|
||||
)}
|
||||
{renderHeaderOptions && (
|
||||
<div className="note-view-options-buttons flex items-center gap-3">
|
||||
<CollaborationInfoHUD item={this.note} />
|
||||
<LinkedItemsButton
|
||||
filesController={this.viewControllerManager.filesController}
|
||||
linkingController={this.viewControllerManager.linkingController}
|
||||
|
||||
Reference in New Issue
Block a user