(enhance) 予約登録完了したことをわかりやすく

This commit is contained in:
kakkokari-gtyih 2023-11-09 22:22:26 +09:00
parent a0e9ebfb83
commit f65e85c319
3 changed files with 10 additions and 0 deletions

View file

@ -111,6 +111,7 @@ import { formatTimeString } from '@/scripts/format-time-string.js';
import { Autocomplete } from '@/scripts/autocomplete.js';
import * as os from '@/os.js';
import { selectFiles } from '@/scripts/select-file.js';
import { dateTimeFormat } from '@/scripts/intl-const.js';
import { defaultStore, notePostInterruptors, postFormActions } from '@/store.js';
import MkInfo from '@/components/MkInfo.vue';
import { i18n } from '@/i18n.js';
@ -808,6 +809,13 @@ async function post(ev?: MouseEvent) {
claimAchievement('notes1');
}
poll = null;
if (postData.schedule?.expiresAt) {
const d = new Date(postData.schedule.expiresAt);
const str = dateTimeFormat.format(d);
os.toast(i18n.t('_schedulePost.willBePostedAtX', { date: str }));
}
const text = postData.text ?? '';
const lowerCase = text.toLowerCase();
if ((lowerCase.includes('love') || lowerCase.includes('❤')) && lowerCase.includes('misskey')) {