Skip to content

Commit

Permalink
fix(editor): update time dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Novout committed Dec 25, 2021
1 parent 7a2e67d commit 1c42379
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@
@click="onClickInEntity"
@contextmenu.prevent.stop="onSetContextMenu"
>
<section
v-if="EDITOR.configuration.entity.updateTime"
class="absolute top-0 text-xs wb-text"
>
{{ update }}
</section>
<section v-if="commands" class="absolute z-max left-40 -top-60">
<EditorCommands />
</section>
Expand Down Expand Up @@ -65,6 +71,7 @@
} from 'better-write-types'
import { useUtils } from '@/use/utils'
import { useMagicKeys } from '@vueuse/core'
import { useFormat } from '@/use/format'
const props = defineProps({
entity: {
Expand All @@ -87,6 +94,7 @@
const { t } = useI18n()
const raw = useRaw()
const plugin = usePlugin()
const format = useFormat()
const { alt } = useMagicKeys()
const hover = ref<boolean>(false)
Expand All @@ -104,6 +112,7 @@
const _index = computed(() => CONTEXT.entities.indexOf(props.entity))
const editable = computed(() => !entity.utils().isFixed(_index.value))
const last = computed(() => _index.value === CONTEXT.entities.length - 1)
const update = computed(() => format.lastTime(props.entity.updatedAt))
watch(props.entity, () => {
// new entity properties
Expand Down

0 comments on commit 1c42379

Please sign in to comment.