From 8b130a302caf67e507b53e40e2952206081914d1 Mon Sep 17 00:00:00 2001 From: Novout Date: Wed, 13 Oct 2021 16:57:01 -0300 Subject: [PATCH] feat(editor): last edit time in popover --- .../editor/entity/EditorEntityInput.vue | 21 ++++++++++--------- .../editor/entity/EditorEntityShowPopover.vue | 14 +++++++++---- src/use/format.ts | 13 ++++++++++-- 3 files changed, 32 insertions(+), 16 deletions(-) diff --git a/src/components/editor/entity/EditorEntityInput.vue b/src/components/editor/entity/EditorEntityInput.vue index 6226939d6..0d09974c0 100644 --- a/src/components/editor/entity/EditorEntityInput.vue +++ b/src/components/editor/entity/EditorEntityInput.vue @@ -52,6 +52,7 @@ const { t } = useI18n() const emitter = useEmitter() const entity = useEntity() + const format = useFormat() const props = defineProps({ modelValue: String, @@ -126,8 +127,8 @@ const content = { type: 'page-break', raw: '__PAGE_BREAK__', - createdAt: useFormat().actually(), - updatedAt: useFormat().actually(), + createdAt: format.actually(), + updatedAt: format.actually(), } as ContextStatePageContent type.value = 'paragraph' @@ -144,8 +145,8 @@ const content = { type: 'line-break', raw: '__LINE_BREAK__', - createdAt: useFormat().actually(), - updatedAt: useFormat().actually(), + createdAt: format.actually(), + updatedAt: format.actually(), } as ContextStatePageContent type.value = 'paragraph' @@ -171,8 +172,8 @@ const content = { type: 'image', raw: reader.result, - createdAt: useFormat().actually(), - updatedAt: useFormat().actually(), + createdAt: format.actually(), + updatedAt: format.actually(), } as ContextStatePageContent type.value = 'paragraph' @@ -196,8 +197,8 @@ const content = { type: type.value, raw: props.modelValue, - createdAt: useFormat().actually(), - updatedAt: useFormat().actually(), + createdAt: format.actually(), + updatedAt: format.actually(), } as ContextStatePageContent type.value = 'paragraph' @@ -226,8 +227,8 @@ const content = { type: type.value, raw: normalize, - createdAt: useFormat().actually(), - updatedAt: useFormat().actually(), + createdAt: format.actually(), + updatedAt: format.actually(), } as ContextStatePageContent store.commit('context/addInPageWithPaste', content) diff --git a/src/components/editor/entity/EditorEntityShowPopover.vue b/src/components/editor/entity/EditorEntityShowPopover.vue index 51f340007..2606e981d 100644 --- a/src/components/editor/entity/EditorEntityShowPopover.vue +++ b/src/components/editor/entity/EditorEntityShowPopover.vue @@ -147,7 +147,7 @@ -

{{ t('editor.aside.entity.up') }}

+

{{ t('editor.aside.props.entity.up') }}

-

{{ t('editor.aside.entity.down') }}

+

{{ t('editor.aside.props.entity.down') }}

-

{{ t('editor.aside.entity.delete') }}

+

{{ t('editor.aside.props.entity.delete') }}

@@ -201,21 +201,27 @@ +
+

{{ update }}

+