(enhance) 予約登録完了したことをわかりやすく
This commit is contained in:
parent
a0e9ebfb83
commit
f65e85c319
|
@ -2474,6 +2474,7 @@ export interface Locale {
|
|||
"postTime": string;
|
||||
"localTime": string;
|
||||
"addSchedule": string;
|
||||
"willBePostedAtX": string;
|
||||
};
|
||||
}
|
||||
declare const locales: {
|
||||
|
|
|
@ -2362,3 +2362,4 @@ _schedulePost:
|
|||
postTime: "時刻"
|
||||
localTime: "端末に設定されているタイムゾーンの時刻で投稿されます。"
|
||||
addSchedule: "予約設定"
|
||||
willBePostedAtX: "このノートは{date}に投稿されます。"
|
||||
|
|
|
@ -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')) {
|
||||
|
|
Loading…
Reference in New Issue