mirror of
https://github.com/elk-zone/elk.git
synced 2025-03-28 20:41:20 +03:00
refactor: scheduleDateTime
-> scheduledTime
This commit is contained in:
parent
471c3c03e6
commit
eba54a6c67
1 changed files with 10 additions and 11 deletions
|
@ -129,10 +129,9 @@ const expiresInOptions = computed(() => [
|
||||||
|
|
||||||
const expiresInDefaultOptionIndex = 2
|
const expiresInDefaultOptionIndex = 2
|
||||||
|
|
||||||
const scheduleDateTime = ref('')
|
const scheduledTime = ref('')
|
||||||
|
|
||||||
watchEffect(() => {
|
watchEffect(() => {
|
||||||
draft.value.params.scheduledAt = scheduleDateTime.value
|
draft.value.params.scheduledAt = scheduledTime.value
|
||||||
})
|
})
|
||||||
|
|
||||||
const characterCount = computed(() => {
|
const characterCount = computed(() => {
|
||||||
|
@ -304,11 +303,11 @@ function stopQuestionMarkPropagation(e: KeyboardEvent) {
|
||||||
<header id="publish-failed" flex justify-between>
|
<header id="publish-failed" flex justify-between>
|
||||||
<div flex items-center gap-x-2 font-bold>
|
<div flex items-center gap-x-2 font-bold>
|
||||||
<div aria-hidden="true" i-ri:error-warning-fill />
|
<div aria-hidden="true" i-ri:error-warning-fill />
|
||||||
<p>{{ scheduleDateTime ? $t('state.schedule_failed') : $t('state.publish_failed') }}</p>
|
<p>{{ scheduledTime ? $t('state.schedule_failed') : $t('state.publish_failed') }}</p>
|
||||||
</div>
|
</div>
|
||||||
<CommonTooltip placement="bottom" :content="scheduleDateTime ? $t('state.clear_schedule_failed') : $t('action.clear_publish_failed')">
|
<CommonTooltip placement="bottom" :content="scheduledTime ? $t('state.clear_schedule_failed') : $t('action.clear_publish_failed')">
|
||||||
<button
|
<button
|
||||||
flex rounded-4 p1 hover:bg-active cursor-pointer transition-100 :aria-label="scheduleDateTime ? $t('state.clear_schedule_failed') : $t('action.clear_publish_failed')"
|
flex rounded-4 p1 hover:bg-active cursor-pointer transition-100 :aria-label="scheduledTime ? $t('state.clear_schedule_failed') : $t('action.clear_publish_failed')"
|
||||||
@click="failedMessages = []"
|
@click="failedMessages = []"
|
||||||
>
|
>
|
||||||
<span aria-hidden="true" w="1.75em" h="1.75em" i-ri:close-line />
|
<span aria-hidden="true" w="1.75em" h="1.75em" i-ri:close-line />
|
||||||
|
@ -487,12 +486,12 @@ function stopQuestionMarkPropagation(e: KeyboardEvent) {
|
||||||
<CommonDropdown placement="bottom">
|
<CommonDropdown placement="bottom">
|
||||||
<CommonTooltip placement="top" :content="$t('tooltip.schedule_post')" no-auto-focus>
|
<CommonTooltip placement="top" :content="$t('tooltip.schedule_post')" no-auto-focus>
|
||||||
<button btn-action-icon :aria-label="$t('tooltip.schedule_post')">
|
<button btn-action-icon :aria-label="$t('tooltip.schedule_post')">
|
||||||
<div i-ri:calendar-schedule-line :class="scheduleDateTime !== '' ? 'text-primary' : ''" />
|
<div i-ri:calendar-schedule-line :class="scheduledTime !== '' ? 'text-primary' : ''" />
|
||||||
</button>
|
</button>
|
||||||
</CommonTooltip>
|
</CommonTooltip>
|
||||||
<template #popper>
|
<template #popper>
|
||||||
<input
|
<input
|
||||||
v-model="scheduleDateTime"
|
v-model="scheduledTime"
|
||||||
p2
|
p2
|
||||||
type="datetime-local"
|
type="datetime-local"
|
||||||
name="schedule-datetime"
|
name="schedule-datetime"
|
||||||
|
@ -541,7 +540,7 @@ function stopQuestionMarkPropagation(e: KeyboardEvent) {
|
||||||
|
|
||||||
<CommonTooltip
|
<CommonTooltip
|
||||||
v-if="failedMessages.length > 0" id="publish-failed-tooltip" placement="top"
|
v-if="failedMessages.length > 0" id="publish-failed-tooltip" placement="top"
|
||||||
:content="scheduleDateTime ? $t('state.schedule_failed') : $t('tooltip.publish_failed')"
|
:content="scheduledTime ? $t('state.schedule_failed') : $t('tooltip.publish_failed')"
|
||||||
>
|
>
|
||||||
<button
|
<button
|
||||||
btn-danger rounded-3 text-sm w-full flex="~ gap1" items-center md:w-fit
|
btn-danger rounded-3 text-sm w-full flex="~ gap1" items-center md:w-fit
|
||||||
|
@ -550,7 +549,7 @@ function stopQuestionMarkPropagation(e: KeyboardEvent) {
|
||||||
<span block>
|
<span block>
|
||||||
<div block i-carbon:face-dizzy-filled />
|
<div block i-carbon:face-dizzy-filled />
|
||||||
</span>
|
</span>
|
||||||
<span>{{ scheduleDateTime ? $t('state.schedule_failed') : $t('state.publish_failed') }}</span>
|
<span>{{ scheduledTime ? $t('state.schedule_failed') : $t('state.publish_failed') }}</span>
|
||||||
</button>
|
</button>
|
||||||
</CommonTooltip>
|
</CommonTooltip>
|
||||||
|
|
||||||
|
@ -576,7 +575,7 @@ function stopQuestionMarkPropagation(e: KeyboardEvent) {
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<span v-if="draft.editingStatus">{{ $t('action.save_changes') }}</span>
|
<span v-if="draft.editingStatus">{{ $t('action.save_changes') }}</span>
|
||||||
<span v-else-if="draft.params.inReplyToId">{{ $t('action.reply') }}</span>
|
<span v-else-if="draft.params.inReplyToId">{{ $t('action.reply') }}</span>
|
||||||
<span v-else-if="scheduleDateTime">{{ !isSending ? $t('action.schedule') : $t('state.scheduling') }}</span>
|
<span v-else-if="scheduledTime">{{ !isSending ? $t('action.schedule') : $t('state.scheduling') }}</span>
|
||||||
<span v-else>{{ !isSending ? $t('action.publish') : $t('state.publishing') }}</span>
|
<span v-else>{{ !isSending ? $t('action.publish') : $t('state.publishing') }}</span>
|
||||||
</template>
|
</template>
|
||||||
</button>
|
</button>
|
||||||
|
|
Loading…
Add table
Reference in a new issue