From 0189b53c3e53ec5dc9254533f317ef9f0cee433f Mon Sep 17 00:00:00 2001 From: GrapeApple0 <84321396+GrapeApple0@users.noreply.github.com> Date: Mon, 15 Jan 2024 14:22:10 +0000 Subject: [PATCH 01/14] =?UTF-8?q?enhance:=20=E3=83=AA=E3=83=97=E3=83=A9?= =?UTF-8?q?=E3=82=A4=E4=B8=80=E8=A6=A7=E3=81=A8=E5=BC=95=E7=94=A8=E4=B8=80?= =?UTF-8?q?=E8=A6=A7=E3=82=92=E5=88=A5=E3=80=85=E3=81=AB=E8=A1=A8=E7=A4=BA?= =?UTF-8?q?=E3=81=99=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/index.d.ts | 1 + locales/ja-JP.yml | 1 + .../backend/src/server/api/EndpointsModule.ts | 4 + packages/backend/src/server/api/endpoints.ts | 2 + .../src/server/api/endpoints/notes/quotes.ts | 78 +++++++++++++++++++ .../src/components/MkNoteDetailed.vue | 55 +++++++++---- .../misskey-js/src/autogen/apiClientJSDoc.ts | 2 +- packages/misskey-js/src/autogen/endpoint.ts | 2 +- packages/misskey-js/src/autogen/entities.ts | 2 +- packages/misskey-js/src/autogen/models.ts | 2 +- packages/misskey-js/src/autogen/types.ts | 2 +- 11 files changed, 129 insertions(+), 22 deletions(-) create mode 100644 packages/backend/src/server/api/endpoints/notes/quotes.ts diff --git a/locales/index.d.ts b/locales/index.d.ts index 71134544d9..e64ea8724a 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -1144,6 +1144,7 @@ export interface Locale { "useSecurityKey": string; "replies": string; "renotes": string; + "quotes": string; "loadReplies": string; "loadConversation": string; "pinnedList": string; diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 743a3ca38e..8eb8278747 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1141,6 +1141,7 @@ youHaveUnreadAnnouncements: "未読のお知らせがあります。" useSecurityKey: "ブラウザまたはデバイスの指示に従って、セキュリティキーまたはパスキーを使用してください。" replies: "返信" renotes: "リノート" +quotes: "引用" loadReplies: "返信を見る" loadConversation: "会話を見る" pinnedList: "ピン留めされたリスト" diff --git a/packages/backend/src/server/api/EndpointsModule.ts b/packages/backend/src/server/api/EndpointsModule.ts index 781332d349..c932c523b0 100644 --- a/packages/backend/src/server/api/EndpointsModule.ts +++ b/packages/backend/src/server/api/EndpointsModule.ts @@ -277,6 +277,7 @@ import * as ep___notes_localTimeline from './endpoints/notes/local-timeline.js'; import * as ep___notes_mentions from './endpoints/notes/mentions.js'; import * as ep___notes_polls_recommendation from './endpoints/notes/polls/recommendation.js'; import * as ep___notes_polls_vote from './endpoints/notes/polls/vote.js'; +import * as ep___notes_quotes from './endpoints/notes/quotes.js'; import * as ep___notes_reactions from './endpoints/notes/reactions.js'; import * as ep___notes_reactions_create from './endpoints/notes/reactions/create.js'; import * as ep___notes_reactions_delete from './endpoints/notes/reactions/delete.js'; @@ -641,6 +642,7 @@ const $notes_localTimeline: Provider = { provide: 'ep:notes/local-timeline', use const $notes_mentions: Provider = { provide: 'ep:notes/mentions', useClass: ep___notes_mentions.default }; const $notes_polls_recommendation: Provider = { provide: 'ep:notes/polls/recommendation', useClass: ep___notes_polls_recommendation.default }; const $notes_polls_vote: Provider = { provide: 'ep:notes/polls/vote', useClass: ep___notes_polls_vote.default }; +const $notes_quotes: Provier = { provide: 'ep:notes/quotes', useClass: ep___notes_quotes.default }; const $notes_reactions: Provider = { provide: 'ep:notes/reactions', useClass: ep___notes_reactions.default }; const $notes_reactions_create: Provider = { provide: 'ep:notes/reactions/create', useClass: ep___notes_reactions_create.default }; const $notes_reactions_delete: Provider = { provide: 'ep:notes/reactions/delete', useClass: ep___notes_reactions_delete.default }; @@ -1009,6 +1011,7 @@ const $bubbleGame_ranking: Provider = { provide: 'ep:bubble-game/ranking', useCl $notes_mentions, $notes_polls_recommendation, $notes_polls_vote, + $notes_quotes, $notes_reactions, $notes_reactions_create, $notes_reactions_delete, @@ -1371,6 +1374,7 @@ const $bubbleGame_ranking: Provider = { provide: 'ep:bubble-game/ranking', useCl $notes_mentions, $notes_polls_recommendation, $notes_polls_vote, + $notes_quotes, $notes_reactions, $notes_reactions_create, $notes_reactions_delete, diff --git a/packages/backend/src/server/api/endpoints.ts b/packages/backend/src/server/api/endpoints.ts index f17db41a5d..834778f662 100644 --- a/packages/backend/src/server/api/endpoints.ts +++ b/packages/backend/src/server/api/endpoints.ts @@ -278,6 +278,7 @@ import * as ep___notes_localTimeline from './endpoints/notes/local-timeline.js'; import * as ep___notes_mentions from './endpoints/notes/mentions.js'; import * as ep___notes_polls_recommendation from './endpoints/notes/polls/recommendation.js'; import * as ep___notes_polls_vote from './endpoints/notes/polls/vote.js'; +import * as ep___notes_quotes from './endpoints/notes/quotes.js'; import * as ep___notes_reactions from './endpoints/notes/reactions.js'; import * as ep___notes_reactions_create from './endpoints/notes/reactions/create.js'; import * as ep___notes_reactions_delete from './endpoints/notes/reactions/delete.js'; @@ -640,6 +641,7 @@ const eps = [ ['notes/mentions', ep___notes_mentions], ['notes/polls/recommendation', ep___notes_polls_recommendation], ['notes/polls/vote', ep___notes_polls_vote], + ['notes/quotes', ep___notes_quotes], ['notes/reactions', ep___notes_reactions], ['notes/reactions/create', ep___notes_reactions_create], ['notes/reactions/delete', ep___notes_reactions_delete], diff --git a/packages/backend/src/server/api/endpoints/notes/quotes.ts b/packages/backend/src/server/api/endpoints/notes/quotes.ts new file mode 100644 index 0000000000..5023dfb5e5 --- /dev/null +++ b/packages/backend/src/server/api/endpoints/notes/quotes.ts @@ -0,0 +1,78 @@ +/* + * SPDX-FileCopyrightText: syuilo and other misskey contributors + * SPDX-License-Identifier: AGPL-3.0-only + */ + +import { Brackets } from 'typeorm'; +import { Inject, Injectable } from '@nestjs/common'; +import type { NotesRepository } from '@/models/_.js'; +import { Endpoint } from '@/server/api/endpoint-base.js'; +import { QueryService } from '@/core/QueryService.js'; +import { NoteEntityService } from '@/core/entities/NoteEntityService.js'; +import { DI } from '@/di-symbols.js'; + +export const meta = { + tags: ['notes'], + + requireCredential: false, + + res: { + type: 'array', + optional: false, nullable: false, + items: { + type: 'object', + optional: false, nullable: false, + ref: 'Note', + }, + }, +} as const; + +export const paramDef = { + type: 'object', + properties: { + noteId: { type: 'string', format: 'misskey:id' }, + sinceId: { type: 'string', format: 'misskey:id' }, + untilId: { type: 'string', format: 'misskey:id' }, + limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, + }, + required: ['noteId'], +} as const; + +@Injectable() +export default class extends Endpoint { // eslint-disable-line import/no-default-export + constructor( + @Inject(DI.notesRepository) + private notesRepository: NotesRepository, + + private noteEntityService: NoteEntityService, + private queryService: QueryService, + ) { + super(meta, paramDef, async (ps, me) => { + const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId) + .andWhere(new Brackets(qb => { + qb + .where('note.renoteId = :noteId', { noteId: ps.noteId }) + .andWhere(new Brackets(qb => { + qb + .where('note.text IS NOT NULL') + .orWhere('note.fileIds != \'{}\'') + .orWhere('note.hasPoll = TRUE'); + })) + .andWhere('note.replyId IS NULL'); + })) + .innerJoinAndSelect('note.user', 'user') + .leftJoinAndSelect('note.renote', 'renote') + .leftJoinAndSelect('renote.user', 'renoteUser'); + + this.queryService.generateVisibilityQuery(query, me); + if (me) { + this.queryService.generateMutedUserQuery(query, me); + this.queryService.generateBlockedUserQuery(query, me); + } + + const notes = await query.limit(ps.limit).getMany(); + + return await this.noteEntityService.packMany(notes, me); + }); + } +} diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index e941827d74..8a2c376feb 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -143,13 +143,15 @@ SPDX-License-Identifier: AGPL-3.0-only +
-
-
- {{ i18n.ts.loadReplies }} -
- +
+ + +
@@ -179,6 +181,13 @@ SPDX-License-Identifier: AGPL-3.0-only
+
+ + + +
@@ -302,6 +311,14 @@ provide('react', (reaction: string) => { const tab = ref('replies'); const reactionTabType = ref(null); +const repliesPagination = computed(() => ({ + endpoint: 'notes/replies', + limit: 10, + params: { + noteId: appearNote.value.id, + }, +})); + const renotesPagination = computed(() => ({ endpoint: 'notes/renotes', limit: 10, @@ -319,6 +336,14 @@ const reactionsPagination = computed(() => ({ }, })); +const quotesPagination = computed(() => ({ + endpoint: 'notes/quotes', + limit: 10, + params: { + noteId: appearNote.value.id, + }, +})); + useNoteCapture({ rootEl: el, note: appearNote, @@ -465,18 +490,6 @@ function blur() { el.value.blur(); } -const repliesLoaded = ref(false); - -function loadReplies() { - repliesLoaded.value = true; - misskeyApi('notes/children', { - noteId: appearNote.value.id, - limit: 30, - }).then(res => { - replies.value = res; - }); -} - const conversationLoaded = ref(false); function loadConversation() { @@ -708,6 +721,10 @@ function loadConversation() { border-bottom: solid 2px var(--accent); } +.tab_replies { + padding: 16px; +} + .tab_renotes { padding: 16px; } @@ -716,6 +733,10 @@ function loadConversation() { padding: 16px; } +.tab_quotes { + padding: 16px; +} + .reactionTabs { display: flex; gap: 8px; diff --git a/packages/misskey-js/src/autogen/apiClientJSDoc.ts b/packages/misskey-js/src/autogen/apiClientJSDoc.ts index b60f449a71..d5caf0746e 100644 --- a/packages/misskey-js/src/autogen/apiClientJSDoc.ts +++ b/packages/misskey-js/src/autogen/apiClientJSDoc.ts @@ -1,6 +1,6 @@ /* * version: 2023.12.2 - * generatedAt: 2024-01-13T04:31:38.782Z + * generatedAt: 2024-01-15T14:14:05.317Z */ import type { SwitchCaseResponseType } from '../api.js'; diff --git a/packages/misskey-js/src/autogen/endpoint.ts b/packages/misskey-js/src/autogen/endpoint.ts index dc591a7046..7f8123aa19 100644 --- a/packages/misskey-js/src/autogen/endpoint.ts +++ b/packages/misskey-js/src/autogen/endpoint.ts @@ -1,6 +1,6 @@ /* * version: 2023.12.2 - * generatedAt: 2024-01-13T04:31:38.778Z + * generatedAt: 2024-01-15T14:14:05.312Z */ import type { diff --git a/packages/misskey-js/src/autogen/entities.ts b/packages/misskey-js/src/autogen/entities.ts index dfe24ce0d8..3ee57a3f59 100644 --- a/packages/misskey-js/src/autogen/entities.ts +++ b/packages/misskey-js/src/autogen/entities.ts @@ -1,6 +1,6 @@ /* * version: 2023.12.2 - * generatedAt: 2024-01-13T04:31:38.775Z + * generatedAt: 2024-01-15T14:14:05.309Z */ import { operations } from './types.js'; diff --git a/packages/misskey-js/src/autogen/models.ts b/packages/misskey-js/src/autogen/models.ts index 5c6bebf2fd..9ecfbc3df4 100644 --- a/packages/misskey-js/src/autogen/models.ts +++ b/packages/misskey-js/src/autogen/models.ts @@ -1,6 +1,6 @@ /* * version: 2023.12.2 - * generatedAt: 2024-01-13T04:31:38.773Z + * generatedAt: 2024-01-15T14:14:05.306Z */ import { components } from './types.js'; diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index 76e2b5309c..d3e52524bd 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -3,7 +3,7 @@ /* * version: 2023.12.2 - * generatedAt: 2024-01-13T04:31:38.633Z + * generatedAt: 2024-01-15T14:14:05.132Z */ /** From b5c88ccf05d437b5ffc1d331319bb7522f1a4add Mon Sep 17 00:00:00 2001 From: GrapeApple0 <84321396+GrapeApple0@users.noreply.github.com> Date: Mon, 15 Jan 2024 14:23:12 +0000 Subject: [PATCH 02/14] Update CHANGELOD.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 945b6ac1ad..346343afa0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -30,6 +30,7 @@ - 配列の範囲外・非整数のインデックスへの代入が完全禁止になるので注意 - Enhance: 絵文字ピッカー・オートコンプリートで、完全一致した絵文字を優先的に表示するように - Enhance: Playの説明欄にMFMを使えるように +- Enhance: ノート詳細ページでリプライ一覧と引用一覧を別々に表示するように - Fix: ネイティブモードの絵文字がモノクロにならないように - Fix: v2023.12.0で追加された「モデレーターがユーザーのアイコンもしくはバナー画像を未設定状態にできる機能」が管理画面上で正しく表示されていない問題を修正 - Fix: AiScriptの`readline`関数が不正な値を返すことがある問題のv2023.12.0時点での修正がPlay以外に適用されていないのを修正 From 084dce2e9c6b4832cc2f7788da50e9feb898c300 Mon Sep 17 00:00:00 2001 From: GrapeApple0 <84321396+GrapeApple0@users.noreply.github.com> Date: Mon, 15 Jan 2024 14:29:22 +0000 Subject: [PATCH 03/14] =?UTF-8?q?disableAutoLoad=E3=82=92=E6=9C=89?= =?UTF-8?q?=E5=8A=B9=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/components/MkNoteDetailed.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index 8a2c376feb..7e9b7200dc 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -147,7 +147,7 @@ SPDX-License-Identifier: AGPL-3.0-only
- + @@ -181,7 +181,7 @@ SPDX-License-Identifier: AGPL-3.0-only
-
+
-
- - - -
@@ -289,7 +291,6 @@ const parsed = appearNote.value.text ? mfm.parse(appearNote.value.text) : null; const urls = parsed ? extractUrlFromMfm(parsed).filter((url) => appearNote.value.renote?.url !== url && appearNote.value.renote?.uri !== url) : null; const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.value.user.instance); const conversation = ref([]); -const replies = ref([]); const canRenote = computed(() => ['public', 'home'].includes(appearNote.value.visibility) || appearNote.value.userId === $i?.id); const keymap = { @@ -313,7 +314,7 @@ const reactionTabType = ref(null); const repliesPagination = computed(() => ({ endpoint: 'notes/replies', - limit: 10, + limit: 5, params: { noteId: appearNote.value.id, }, @@ -327,6 +328,14 @@ const renotesPagination = computed(() => ({ }, })); +const quotesPagination = computed(() => ({ + endpoint: 'notes/quotes', + limit: 5, + params: { + noteId: appearNote.value.id, + }, +})); + const reactionsPagination = computed(() => ({ endpoint: 'notes/reactions', limit: 10, @@ -336,14 +345,6 @@ const reactionsPagination = computed(() => ({ }, })); -const quotesPagination = computed(() => ({ - endpoint: 'notes/quotes', - limit: 10, - params: { - noteId: appearNote.value.id, - }, -})); - useNoteCapture({ rootEl: rootEl, note: appearNote, @@ -703,21 +704,34 @@ function loadConversation() { } } -.reply:not(:first-child) { - border-top: solid 0.5px var(--divider); +.reply:not(:last-child) { + border-bottom: solid 0.5px var(--divider); +} + +.tabsWrapper { + overflow-x: auto; + + &::-webkit-scrollbar { + display: none; + } + } .tabs { border-top: solid 0.5px var(--divider); border-bottom: solid 0.5px var(--divider); - display: flex; + min-width: max-content; + display: grid; + grid-auto-flow: column; + grid-template-columns: repeat(4, 1fr); } .tab { - flex: 1; + display: block; padding: 12px 8px; border-top: solid 2px transparent; border-bottom: solid 2px transparent; + white-space: nowrap; } .tabActive { @@ -732,10 +746,6 @@ function loadConversation() { padding: 16px; } -.tab_quotes { - padding: 16px; -} - .reactionTabs { display: flex; gap: 8px; diff --git a/packages/misskey-js/etc/misskey-js.api.md b/packages/misskey-js/etc/misskey-js.api.md index 3592153f9e..358462abb7 100644 --- a/packages/misskey-js/etc/misskey-js.api.md +++ b/packages/misskey-js/etc/misskey-js.api.md @@ -1527,6 +1527,8 @@ declare namespace entities { NotesPollsRecommendationRequest, NotesPollsRecommendationResponse, NotesPollsVoteRequest, + NotesQuotesRequest, + NotesQuotesResponse, NotesReactionsRequest, NotesReactionsResponse, NotesReactionsCreateRequest, @@ -2457,6 +2459,12 @@ type NotesPollsRecommendationResponse = operations['notes/polls/recommendation'] // @public (undocumented) type NotesPollsVoteRequest = operations['notes/polls/vote']['requestBody']['content']['application/json']; +// @public (undocumented) +type NotesQuotesRequest = operations['notes/quotes']['requestBody']['content']['application/json']; + +// @public (undocumented) +type NotesQuotesResponse = operations['notes/quotes']['responses']['200']['content']['application/json']; + // @public (undocumented) type NotesReactionsCreateRequest = operations['notes/reactions/create']['requestBody']['content']['application/json']; diff --git a/packages/misskey-js/src/autogen/apiClientJSDoc.ts b/packages/misskey-js/src/autogen/apiClientJSDoc.ts index cb761493a2..d17b79fa19 100644 --- a/packages/misskey-js/src/autogen/apiClientJSDoc.ts +++ b/packages/misskey-js/src/autogen/apiClientJSDoc.ts @@ -1,6 +1,6 @@ /* * version: 2024.2.0-beta.8 - * generatedAt: 2024-02-04T16:51:09.469Z + * generatedAt: 2024-02-06T08:37:12.150Z */ import type { SwitchCaseResponseType } from '../api.js'; @@ -3024,6 +3024,17 @@ declare module '../api.js' { credential?: string | null, ): Promise>; + /** + * No description provided. + * + * **Credential required**: *No* + */ + request( + endpoint: E, + params: P, + credential?: string | null, + ): Promise>; + /** * No description provided. * diff --git a/packages/misskey-js/src/autogen/endpoint.ts b/packages/misskey-js/src/autogen/endpoint.ts index 10ec645a53..9288bca505 100644 --- a/packages/misskey-js/src/autogen/endpoint.ts +++ b/packages/misskey-js/src/autogen/endpoint.ts @@ -1,6 +1,6 @@ /* * version: 2024.2.0-beta.8 - * generatedAt: 2024-02-04T16:51:09.467Z + * generatedAt: 2024-02-06T08:37:12.146Z */ import type { @@ -407,6 +407,8 @@ import type { NotesPollsRecommendationRequest, NotesPollsRecommendationResponse, NotesPollsVoteRequest, + NotesQuotesRequest, + NotesQuotesResponse, NotesReactionsRequest, NotesReactionsResponse, NotesReactionsCreateRequest, @@ -830,6 +832,7 @@ export type Endpoints = { 'notes/mentions': { req: NotesMentionsRequest; res: NotesMentionsResponse }; 'notes/polls/recommendation': { req: NotesPollsRecommendationRequest; res: NotesPollsRecommendationResponse }; 'notes/polls/vote': { req: NotesPollsVoteRequest; res: EmptyResponse }; + 'notes/quotes': { req: NotesQuotesRequest; res: NotesQuotesResponse }; 'notes/reactions': { req: NotesReactionsRequest; res: NotesReactionsResponse }; 'notes/reactions/create': { req: NotesReactionsCreateRequest; res: EmptyResponse }; 'notes/reactions/delete': { req: NotesReactionsDeleteRequest; res: EmptyResponse }; diff --git a/packages/misskey-js/src/autogen/entities.ts b/packages/misskey-js/src/autogen/entities.ts index 04b52e9fb6..3a6519120c 100644 --- a/packages/misskey-js/src/autogen/entities.ts +++ b/packages/misskey-js/src/autogen/entities.ts @@ -1,6 +1,6 @@ /* * version: 2024.2.0-beta.8 - * generatedAt: 2024-02-04T16:51:09.466Z + * generatedAt: 2024-02-06T08:37:12.144Z */ import { operations } from './types.js'; @@ -409,6 +409,8 @@ export type NotesMentionsResponse = operations['notes/mentions']['responses']['2 export type NotesPollsRecommendationRequest = operations['notes/polls/recommendation']['requestBody']['content']['application/json']; export type NotesPollsRecommendationResponse = operations['notes/polls/recommendation']['responses']['200']['content']['application/json']; export type NotesPollsVoteRequest = operations['notes/polls/vote']['requestBody']['content']['application/json']; +export type NotesQuotesRequest = operations['notes/quotes']['requestBody']['content']['application/json']; +export type NotesQuotesResponse = operations['notes/quotes']['responses']['200']['content']['application/json']; export type NotesReactionsRequest = operations['notes/reactions']['requestBody']['content']['application/json']; export type NotesReactionsResponse = operations['notes/reactions']['responses']['200']['content']['application/json']; export type NotesReactionsCreateRequest = operations['notes/reactions/create']['requestBody']['content']['application/json']; diff --git a/packages/misskey-js/src/autogen/models.ts b/packages/misskey-js/src/autogen/models.ts index ee14b22f74..dd9653c23a 100644 --- a/packages/misskey-js/src/autogen/models.ts +++ b/packages/misskey-js/src/autogen/models.ts @@ -1,6 +1,6 @@ /* * version: 2024.2.0-beta.8 - * generatedAt: 2024-02-04T16:51:09.465Z + * generatedAt: 2024-02-06T08:37:12.142Z */ import { components } from './types.js'; diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index cce2dadcdb..bf31d20515 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -3,7 +3,7 @@ /* * version: 2024.2.0-beta.8 - * generatedAt: 2024-02-04T16:51:09.378Z + * generatedAt: 2024-02-06T08:37:11.750Z */ /** @@ -2624,6 +2624,15 @@ export type paths = { */ post: operations['notes/polls/vote']; }; + '/notes/quotes': { + /** + * notes/quotes + * @description No description provided. + * + * **Credential required**: *No* + */ + post: operations['notes/quotes']; + }; '/notes/reactions': { /** * notes/reactions @@ -20634,6 +20643,66 @@ export type operations = { }; }; }; + /** + * notes/quotes + * @description No description provided. + * + * **Credential required**: *No* + */ + 'notes/quotes': { + requestBody: { + content: { + 'application/json': { + /** Format: misskey:id */ + noteId: string; + /** Format: misskey:id */ + sinceId?: string; + /** Format: misskey:id */ + untilId?: string; + /** @default 10 */ + limit?: number; + }; + }; + }; + responses: { + /** @description OK (with results) */ + 200: { + content: { + 'application/json': components['schemas']['Note'][]; + }; + }; + /** @description Client error */ + 400: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Authentication error */ + 401: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Forbidden error */ + 403: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description I'm Ai */ + 418: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + /** @description Internal server error */ + 500: { + content: { + 'application/json': components['schemas']['Error']; + }; + }; + }; + }; /** * notes/reactions * @description No description provided. From 614f18a1d42e2bc70bc404a28221910268170cc5 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Tue, 6 Feb 2024 18:33:19 +0900 Subject: [PATCH 07/14] =?UTF-8?q?=E6=9E=A0=E7=B7=9A=E3=81=8C=E3=81=8A?= =?UTF-8?q?=E3=81=8B=E3=81=97=E3=81=84=E3=81=AE=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/frontend/src/components/MkNoteDetailed.vue | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index 50e24426ec..071498bd60 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -151,7 +151,7 @@ SPDX-License-Identifier: AGPL-3.0-only
@@ -169,7 +169,7 @@ SPDX-License-Identifier: AGPL-3.0-only
@@ -704,8 +704,8 @@ function loadConversation() { } } -.reply:not(:last-child) { - border-bottom: solid 0.5px var(--divider); +.replyBorder { + border-top: solid 0.5px var(--divider); } .tabsWrapper { @@ -714,7 +714,6 @@ function loadConversation() { &::-webkit-scrollbar { display: none; } - } .tabs { From 2a94072ce2c71acf5e1037049309631f931d660d Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Tue, 6 Feb 2024 18:41:49 +0900 Subject: [PATCH 08/14] change initial limit --- packages/frontend/src/components/MkNoteDetailed.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index 071498bd60..492a273c22 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -314,7 +314,7 @@ const reactionTabType = ref(null); const repliesPagination = computed(() => ({ endpoint: 'notes/replies', - limit: 5, + limit: 3, params: { noteId: appearNote.value.id, }, @@ -330,7 +330,7 @@ const renotesPagination = computed(() => ({ const quotesPagination = computed(() => ({ endpoint: 'notes/quotes', - limit: 5, + limit: 3, params: { noteId: appearNote.value.id, }, From 7331b1808b334c0fbafa50d6f95bc4b1652b60b5 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Tue, 6 Feb 2024 18:50:53 +0900 Subject: [PATCH 09/14] for firefox --- packages/frontend/src/components/MkNoteDetailed.vue | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index 492a273c22..43a1c0f525 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -710,6 +710,7 @@ function loadConversation() { .tabsWrapper { overflow-x: auto; + scrollbar-width: none; &::-webkit-scrollbar { display: none; From 255b4ba6ba95499aca156704f35bae7e3f7b6685 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Tue, 6 Feb 2024 18:57:58 +0900 Subject: [PATCH 10/14] Update Changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 72e264b9f7..f108feafd3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -74,6 +74,7 @@ - Fix: キャプションが空の画像をクロップするとキャプションにnullという文字列が入ってしまう問題の修正 - Fix: プロフィールを編集してもリロードするまで反映されない問題を修正 - Fix: エラー画像URLを設定した後解除すると,デフォルトの画像が表示されない問題の修正 +- Fix: 返信が最大30件までしか読み込めない問題を修正 ### Server - Enhance: 連合先のレートリミットに引っかかった際にリトライするようになりました From 375c4363f61fc12efc583772232181f0b4ed058f Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Tue, 6 Feb 2024 19:44:08 +0900 Subject: [PATCH 11/14] =?UTF-8?q?=E3=83=AA=E3=83=97=E3=83=A9=E3=82=A4?= =?UTF-8?q?=E3=83=BB=E5=BC=95=E7=94=A8=E3=81=AF=E8=87=AA=E5=8B=95=E3=81=A7?= =?UTF-8?q?=E8=AA=AD=E3=81=BF=E8=BE=BC=E3=81=BE=E3=81=AA=E3=81=84=E3=82=88?= =?UTF-8?q?=E3=81=86=E3=81=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- locales/index.d.ts | 4 ++++ locales/ja-JP.yml | 1 + packages/frontend/src/components/MkNoteDetailed.vue | 12 ++++++++++-- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/locales/index.d.ts b/locales/index.d.ts index 9b805996b0..2c4fa25dc2 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -4592,6 +4592,10 @@ export interface Locale extends ILocale { * 返信を見る */ "loadReplies": string; + /** + * 引用を見る + */ + "loadQuotes": string; /** * 会話を見る */ diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index d4e707fbbd..cbdf8f0f27 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1144,6 +1144,7 @@ replies: "返信" renotes: "リノート" quotes: "引用" loadReplies: "返信を見る" +loadQuotes: "引用を見る" loadConversation: "会話を見る" pinnedList: "ピン留めされたリスト" keepScreenOn: "デバイスの画面を常にオンにする" diff --git a/packages/frontend/src/components/MkNoteDetailed.vue b/packages/frontend/src/components/MkNoteDetailed.vue index 43a1c0f525..e79e52419c 100644 --- a/packages/frontend/src/components/MkNoteDetailed.vue +++ b/packages/frontend/src/components/MkNoteDetailed.vue @@ -149,7 +149,10 @@ SPDX-License-Identifier: AGPL-3.0-only
- +
+ {{ i18n.ts.loadReplies }} +
+ @@ -167,7 +170,10 @@ SPDX-License-Identifier: AGPL-3.0-only
- +
+ {{ i18n.ts.loadQuotes }} +
+ @@ -292,6 +298,8 @@ const urls = parsed ? extractUrlFromMfm(parsed).filter((url) => appearNote.value const showTicker = (defaultStore.state.instanceTicker === 'always') || (defaultStore.state.instanceTicker === 'remote' && appearNote.value.user.instance); const conversation = ref([]); const canRenote = computed(() => ['public', 'home'].includes(appearNote.value.visibility) || appearNote.value.userId === $i?.id); +const showReplies = ref(false); +const showQuotes = ref(false); const keymap = { 'r': () => reply(true), From 958d2adcde07e541feca89a2e6de413ca12cdd38 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Wed, 24 Apr 2024 11:38:02 +0900 Subject: [PATCH 12/14] run build-misskey-js --- packages/misskey-js/src/autogen/types.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index c317445d1d..e97db24286 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -2626,7 +2626,7 @@ export type paths = { * * **Credential required**: *No* */ - post: operations['notes/quotes']; + post: operations['notes___quotes']; }; '/notes/reactions': { /** @@ -21129,7 +21129,7 @@ export type operations = { * * **Credential required**: *No* */ - 'notes/quotes': { + notes___quotes: { requestBody: { content: { 'application/json': { From 4b1161e477fa9032a5baa5c63a09bf5ecad9fab6 Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Wed, 24 Dec 2025 15:44:17 +0900 Subject: [PATCH 13/14] fix --- .../backend/src/server/api/endpoints/notes/quotes.ts | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/packages/backend/src/server/api/endpoints/notes/quotes.ts b/packages/backend/src/server/api/endpoints/notes/quotes.ts index 5023dfb5e5..1c9f5a4b4d 100644 --- a/packages/backend/src/server/api/endpoints/notes/quotes.ts +++ b/packages/backend/src/server/api/endpoints/notes/quotes.ts @@ -33,6 +33,8 @@ export const paramDef = { noteId: { type: 'string', format: 'misskey:id' }, sinceId: { type: 'string', format: 'misskey:id' }, untilId: { type: 'string', format: 'misskey:id' }, + sinceDate: { type: 'integer' }, + untilDate: { type: 'integer' }, limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 }, }, required: ['noteId'], @@ -48,7 +50,7 @@ export default class extends Endpoint { // eslint- private queryService: QueryService, ) { super(meta, paramDef, async (ps, me) => { - const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId) + const query = this.queryService.makePaginationQuery(this.notesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId, ps.sinceDate, ps.untilDate) .andWhere(new Brackets(qb => { qb .where('note.renoteId = :noteId', { noteId: ps.noteId }) @@ -65,10 +67,7 @@ export default class extends Endpoint { // eslint- .leftJoinAndSelect('renote.user', 'renoteUser'); this.queryService.generateVisibilityQuery(query, me); - if (me) { - this.queryService.generateMutedUserQuery(query, me); - this.queryService.generateBlockedUserQuery(query, me); - } + this.queryService.generateBaseNoteFilteringQuery(query, me); const notes = await query.limit(ps.limit).getMany(); From 16c46f5aaf2038ecd7ad6eb5f5616de6c04e13ba Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih <67428053+kakkokari-gtyih@users.noreply.github.com> Date: Wed, 24 Dec 2025 15:46:15 +0900 Subject: [PATCH 14/14] fix: run build-misskey-js-with-types --- packages/misskey-js/src/autogen/types.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/misskey-js/src/autogen/types.ts b/packages/misskey-js/src/autogen/types.ts index d89f6fb7ba..12003fbd6d 100644 --- a/packages/misskey-js/src/autogen/types.ts +++ b/packages/misskey-js/src/autogen/types.ts @@ -30435,6 +30435,8 @@ export interface operations { sinceId?: string; /** Format: misskey:id */ untilId?: string; + sinceDate?: number; + untilDate?: number; /** @default 10 */ limit?: number; };