mirror of
https://github.com/elk-zone/elk.git
synced 2024-11-24 02:06:12 +03:00
feat: add schedule post button to publish widget
This commit is contained in:
parent
8ad05dfd47
commit
4ba756946c
2 changed files with 20 additions and 1 deletions
|
@ -129,6 +129,8 @@ const expiresInOptions = computed(() => [
|
|||
|
||||
const expiresInDefaultOptionIndex = 2
|
||||
|
||||
const scheduleDateTime = ref('')
|
||||
|
||||
const characterCount = computed(() => {
|
||||
const text = htmlToText(editor.value?.getHTML() || '')
|
||||
|
||||
|
@ -456,7 +458,23 @@ function stopQuestionMarkPropagation(e: KeyboardEvent) {
|
|||
|
||||
<PublishEditorTools v-if="editor" :editor="editor" />
|
||||
|
||||
<div flex-auto />
|
||||
<CommonDropdown placement="bottom">
|
||||
<CommonTooltip placement="top" :content="$t('tooltip.schedule_post')" no-auto-focus>
|
||||
<button btn-action-icon :aria-label="$t('tooltip.schedule_post')">
|
||||
<div i-ri:calendar-schedule-line />
|
||||
</button>
|
||||
</CommonTooltip>
|
||||
<template #popper>
|
||||
<input
|
||||
v-model="scheduleDateTime"
|
||||
p2
|
||||
type="datetime-local"
|
||||
name="schedule-datetime"
|
||||
>
|
||||
</template>
|
||||
</CommonDropdown>
|
||||
|
||||
<div flex-auto />
|
||||
|
||||
<PublishCharacterCounter :max="characterLimit" :length="characterCount" />
|
||||
|
||||
|
|
|
@ -736,6 +736,7 @@
|
|||
"pick_an_icon": "Pick an icon",
|
||||
"publish_failed": "Close failed messages at the top of editor to republish posts",
|
||||
"remove_thread_item": "Remove item from thread",
|
||||
"schedule_post": "Schedule post",
|
||||
"start_thread": "Start thread",
|
||||
"toggle_bold": "Toggle bold",
|
||||
"toggle_code_block": "Toggle code block",
|
||||
|
|
Loading…
Reference in a new issue