Merge d9ba1a4fb3
into b8ae7edcec
This commit is contained in:
commit
cd967cdb4c
|
@ -5286,6 +5286,10 @@ export interface Locale extends ILocale {
|
|||
* 下書き
|
||||
*/
|
||||
"draft": string;
|
||||
/**
|
||||
* 予約投稿
|
||||
*/
|
||||
"scheduledNote": string;
|
||||
/**
|
||||
* 下書きと予約投稿
|
||||
*/
|
||||
|
|
|
@ -1317,6 +1317,7 @@ acknowledgeNotesAndEnable: "注意事項を理解した上でオンにします
|
|||
federationSpecified: "このサーバーはホワイトリスト連合で運用されています。管理者が指定したサーバー以外とやり取りすることはできません。"
|
||||
federationDisabled: "このサーバーは連合が無効化されています。他のサーバーのユーザーとやり取りすることはできません。"
|
||||
draft: "下書き"
|
||||
scheduledNote: "予約投稿"
|
||||
draftsAndScheduledNotes: "下書きと予約投稿"
|
||||
confirmOnReact: "リアクションする際に確認する"
|
||||
reactAreYouSure: "\" {emoji} \" をリアクションしますか?"
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
* SPDX-FileCopyrightText: syuilo and misskey-project
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
export class NoteScheduled1759048540292 {
|
||||
name = 'NoteScheduled1759048540292'
|
||||
|
||||
async up(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "note" ADD "scheduled" boolean NOT NULL DEFAULT false`);
|
||||
}
|
||||
|
||||
async down(queryRunner) {
|
||||
await queryRunner.query(`ALTER TABLE "note" DROP COLUMN "scheduled"`);
|
||||
}
|
||||
}
|
|
@ -137,6 +137,7 @@ type Option = {
|
|||
visibility?: string;
|
||||
visibleUsers?: MinimumUser[] | null;
|
||||
channel?: MiChannel | null;
|
||||
scheduled?: boolean;
|
||||
apMentions?: MinimumUser[] | null;
|
||||
apHashtags?: string[] | null;
|
||||
apEmojis?: string[] | null;
|
||||
|
@ -248,6 +249,7 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
localOnly: boolean;
|
||||
reactionAcceptance: MiNote['reactionAcceptance'];
|
||||
poll: IPoll | null;
|
||||
scheduled?: boolean;
|
||||
apMentions?: MinimumUser[] | null;
|
||||
apHashtags?: string[] | null;
|
||||
apEmojis?: string[] | null;
|
||||
|
@ -383,6 +385,7 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
visibility: data.visibility,
|
||||
visibleUsers,
|
||||
channel,
|
||||
scheduled: data.scheduled,
|
||||
apMentions: data.apMentions,
|
||||
apHashtags: data.apHashtags,
|
||||
apEmojis: data.apEmojis,
|
||||
|
@ -596,6 +599,7 @@ export class NoteCreateService implements OnApplicationShutdown {
|
|||
? data.visibleUsers.map(u => u.id)
|
||||
: []
|
||||
: [],
|
||||
scheduled: data.scheduled,
|
||||
|
||||
attachedFileTypes: data.files ? data.files.map(file => file.type) : [],
|
||||
|
||||
|
|
|
@ -99,6 +99,7 @@ function generateDummyNote(override?: Partial<MiNote>): MiNote {
|
|||
emojis: [],
|
||||
tags: [],
|
||||
hasPoll: false,
|
||||
scheduled: false,
|
||||
channelId: null,
|
||||
channel: null,
|
||||
userHost: null,
|
||||
|
|
|
@ -441,6 +441,7 @@ export class NoteEntityService implements OnModuleInit {
|
|||
} : undefined,
|
||||
mentions: note.mentions.length > 0 ? note.mentions : undefined,
|
||||
hasPoll: note.hasPoll || undefined,
|
||||
scheduled: note.scheduled || undefined,
|
||||
uri: note.uri ?? undefined,
|
||||
url: note.url ?? undefined,
|
||||
|
||||
|
|
|
@ -200,6 +200,12 @@ export class MiNote {
|
|||
})
|
||||
public hasPoll: boolean;
|
||||
|
||||
/** Misskeyの予約投稿経由で投稿されたかどうか */
|
||||
@Column('boolean', {
|
||||
default: false,
|
||||
})
|
||||
public scheduled: boolean;
|
||||
|
||||
@Index()
|
||||
@Column({
|
||||
...id(),
|
||||
|
|
|
@ -260,6 +260,10 @@ export const packedNoteSchema = {
|
|||
type: 'boolean',
|
||||
optional: true, nullable: false,
|
||||
},
|
||||
scheduled: {
|
||||
type: 'boolean',
|
||||
optional: true, nullable: false,
|
||||
},
|
||||
|
||||
myReaction: {
|
||||
type: 'string',
|
||||
|
|
|
@ -54,6 +54,7 @@ export class PostScheduledNoteProcessorService {
|
|||
visibility: draft.visibility,
|
||||
visibleUserIds: draft.visibleUserIds,
|
||||
channelId: draft.channelId,
|
||||
scheduled: true,
|
||||
});
|
||||
|
||||
// await不要
|
||||
|
|
|
@ -59,6 +59,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<i v-else-if="appearNote.visibility === 'specified'" ref="specified" class="ti ti-mail"></i>
|
||||
</span>
|
||||
<span v-if="appearNote.localOnly" style="margin-left: 0.5em;" :title="i18n.ts._visibility['disableFederation']"><i class="ti ti-rocket-off"></i></span>
|
||||
<span v-if="note.scheduled" style="margin-left: 0.5em;" :title="i18n.ts.scheduledNote"><i class="ti ti-clock"></i></span>
|
||||
</div>
|
||||
</div>
|
||||
<div :class="$style.noteHeaderUsernameAndBadgeRoles">
|
||||
|
|
|
@ -29,6 +29,7 @@ SPDX-License-Identifier: AGPL-3.0-only
|
|||
<i v-else-if="note.visibility === 'specified'" ref="specified" class="ti ti-mail"></i>
|
||||
</span>
|
||||
<span v-if="note.localOnly" style="margin-left: 0.5em;" :title="i18n.ts._visibility['disableFederation']"><i class="ti ti-rocket-off"></i></span>
|
||||
<span v-if="note.scheduled" style="margin-left: 0.5em;" :title="i18n.ts.scheduledNote"><i class="ti ti-clock"></i></span>
|
||||
<span v-if="note.channel" style="margin-left: 0.5em;" :title="note.channel.name"><i class="ti ti-device-tv"></i></span>
|
||||
</div>
|
||||
</header>
|
||||
|
|
|
@ -4413,6 +4413,7 @@ export type components = {
|
|||
reactionAndUserPairCache?: string[];
|
||||
clippedCount?: number;
|
||||
hasPoll?: boolean;
|
||||
scheduled?: boolean;
|
||||
myReaction?: string | null;
|
||||
};
|
||||
NoteDraft: {
|
||||
|
|
Loading…
Reference in New Issue