chore: format and lint
This commit is contained in:
parent
dab6435577
commit
b0002334d1
2 changed files with 50 additions and 47 deletions
|
|
@ -90,6 +90,7 @@ function trimPollOptions() {
|
||||||
&& trimmedOptions.length >= currentInstance.value?.configuration?.polls.maxOptions) {
|
&& trimmedOptions.length >= currentInstance.value?.configuration?.polls.maxOptions) {
|
||||||
draft.value.params.poll!.options = trimmedOptions
|
draft.value.params.poll!.options = trimmedOptions
|
||||||
}
|
}
|
||||||
|
|
||||||
else {
|
else {
|
||||||
draft.value.params.poll!.options = [...trimmedOptions, '']
|
draft.value.params.poll!.options = [...trimmedOptions, '']
|
||||||
}
|
}
|
||||||
|
|
@ -334,37 +335,37 @@ function stopQuestionMarkPropagation(e: KeyboardEvent) {
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</CommonErrorMessage>
|
</CommonErrorMessage>
|
||||||
<CommonErrorMessage v-if="failedMessages.length > 0" described-by="publish-failed">
|
<CommonErrorMessage v-if="failedMessages.length > 0" described-by="publish-failed">
|
||||||
<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>{{ scheduledTime ? $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="scheduledTime ? $t('action.clear_schedule_failed') : $t('action.clear_publish_failed')">
|
<CommonTooltip placement="bottom" :content="scheduledTime ? $t('action.clear_schedule_failed') : $t('action.clear_publish_failed')">
|
||||||
<button
|
<button
|
||||||
flex rounded-4 p1 hover:bg-active cursor-pointer transition-100 :aria-label="scheduledTime ? $t('action.clear_schedule_failed') : $t('action.clear_publish_failed')"
|
flex rounded-4 p1 hover:bg-active cursor-pointer transition-100 :aria-label="scheduledTime ? $t('action.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 />
|
||||||
</button>
|
</button>
|
||||||
</CommonTooltip>
|
</CommonTooltip>
|
||||||
</header>
|
</header>
|
||||||
<ol ps-2 sm:ps-1>
|
<ol ps-2 sm:ps-1>
|
||||||
<li v-for="(error, i) in failedMessages" :key="i" flex="~ col sm:row" gap-y-1 sm:gap-x-2>
|
<li v-for="(error, i) in failedMessages" :key="i" flex="~ col sm:row" gap-y-1 sm:gap-x-2>
|
||||||
<strong>{{ i + 1 }}.</strong>
|
<strong>{{ i + 1 }}.</strong>
|
||||||
<span>{{ error }}</span>
|
<span>{{ error }}</span>
|
||||||
</li>
|
</li>
|
||||||
</ol>
|
</ol>
|
||||||
</CommonErrorMessage>
|
</CommonErrorMessage>
|
||||||
|
|
||||||
<CommonErrorMessage v-if="!isValidScheduledTime" described-by="scheduled-time-invalid" pt-2>
|
<CommonErrorMessage v-if="!isValidScheduledTime" described-by="scheduled-time-invalid" pt-2>
|
||||||
<header id="scheduled-time-invalid" flex justify-between>
|
<header id="scheduled-time-invalid" 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>{{ $t('state.schedule_time_invalid', [minimumScheduledTime.toLocaleString()]) }}</p>
|
<p>{{ $t('state.schedule_time_invalid', [minimumScheduledTime.toLocaleString()]) }}</p>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
</CommonErrorMessage>
|
</CommonErrorMessage>
|
||||||
|
|
||||||
<div relative flex-1 flex flex-col :class="shouldExpanded ? 'min-h-30' : ''">
|
<div relative flex-1 flex flex-col :class="shouldExpanded ? 'min-h-30' : ''">
|
||||||
<EditorContent
|
<EditorContent
|
||||||
|
|
@ -527,24 +528,24 @@ function stopQuestionMarkPropagation(e: KeyboardEvent) {
|
||||||
|
|
||||||
<PublishEditorTools v-if="editor" :editor="editor" />
|
<PublishEditorTools v-if="editor" :editor="editor" />
|
||||||
|
|
||||||
<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="scheduledTime !== '' ? 'text-primary' : ''" />
|
<div i-ri:calendar-schedule-line :class="scheduledTime !== '' ? 'text-primary' : ''" />
|
||||||
</button>
|
</button>
|
||||||
</CommonTooltip>
|
</CommonTooltip>
|
||||||
<template #popper>
|
<template #popper>
|
||||||
<input
|
<input
|
||||||
v-model="scheduledTime"
|
v-model="scheduledTime"
|
||||||
p2
|
p2
|
||||||
type="datetime-local"
|
type="datetime-local"
|
||||||
name="schedule-datetime"
|
name="schedule-datetime"
|
||||||
:min="getDatetimeInputFormat(minimumScheduledTime)"
|
:min="getDatetimeInputFormat(minimumScheduledTime)"
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</CommonDropdown>
|
</CommonDropdown>
|
||||||
|
|
||||||
<div flex-auto />
|
<div flex-auto />
|
||||||
|
|
||||||
<PublishCharacterCounter :max="characterLimit" :length="characterCount" />
|
<PublishCharacterCounter :max="characterLimit" :length="characterCount" />
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,8 @@ const client = useMastoClient()
|
||||||
|
|
||||||
async function cancelSchedule(id: string) {
|
async function cancelSchedule(id: string) {
|
||||||
const status = await client.v1.scheduledStatuses.$select(id)
|
const status = await client.v1.scheduledStatuses.$select(id)
|
||||||
|
// DEBUG: temporarily disable
|
||||||
|
// eslint-disable-next-line no-alert
|
||||||
if (confirm('Are you sure to cancel this scheduled post?'))
|
if (confirm('Are you sure to cancel this scheduled post?'))
|
||||||
status.remove()
|
status.remove()
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue