Compare commits

...

7 Commits

Author SHA1 Message Date
kakkokari-gtyih 8608df20b2 フロントエンドもMkPaginationに 2023-11-11 17:10:23 +09:00
かっこかり ca5bb20cc1
Merge branch 'develop' into schedule-note 2023-11-11 16:45:58 +09:00
kakkokari-gtyih 3c207abd2b Merge branch 'schedule-note' of https://github.com/mattyatea/misskey into schedule-note 2023-11-11 16:43:13 +09:00
kakkokari-gtyih 9bc6d8024f ページネーションクエリに対応 2023-11-11 16:42:12 +09:00
zyoshoka cec02966ad
fix(frontend): 「フォロー中の人全員の返信を含める/含めないようにする」のボタンを押下した際の確認が機能していない問題を修正 (#12308)
* fix(frontend): 「フォロー中の人全員の返信を含める/含めないようにする」のボタンを押下した際の確認が機能していない問題を修正

* Update CHANGELOG.md
2023-11-11 16:34:46 +09:00
zyoshoka 0dd3cac8d9
fix(frontend): アイコンデコレーションが見切れる問題を修正 (#12239)
* fix(frontend): アイコンデコレーションがナビゲーションバーでクリップされないように

* Revert "fix(frontend): アイコンデコレーションがナビゲーションバーでクリップされないように"

This reverts commit db246b13d9.

* fix: tweak padding of account in navbar

* fix: set minimum height of note preview

* fix: リアクション一覧でアイコンデコレーションが見切れないように

* Update CHANGELOG.md

---------

Co-authored-by: syuilo <Syuilotan@yahoo.co.jp>
2023-11-11 16:07:07 +09:00
atsuchan 50430e310a
Fix: latestRequestReceivedAt (#12270) 2023-11-11 14:51:29 +09:00
10 changed files with 60 additions and 29 deletions

View File

@ -18,7 +18,8 @@
-
### Client
-
- Fix: アイコンデコレーションが複数の場所で見切れている問題を修正
― Fix: 「フォロー中の人全員の返信を含める/含めないようにする」のボタンを押下した際の確認が機能していない問題を修正
### Server
- Fix: トークンのないプラグインをアンインストールするときにエラーが出ないように

View File

@ -47,6 +47,7 @@ export class InstanceEntityService {
faviconUrl: instance.faviconUrl,
themeColor: instance.themeColor,
infoUpdatedAt: instance.infoUpdatedAt ? instance.infoUpdatedAt.toISOString() : null,
latestRequestReceivedAt: instance.latestRequestReceivedAt ? instance.latestRequestReceivedAt.toISOString() : null,
};
}

View File

@ -103,5 +103,10 @@ export const packedFederationInstanceSchema = {
optional: false, nullable: true,
format: 'date-time',
},
latestRequestReceivedAt: {
type: 'string',
optional: false, nullable: true,
format: 'date-time',
},
},
} as const;

View File

@ -24,13 +24,13 @@ export class ScheduleNotePostProcessorService {
@Inject(DI.usersRepository)
private usersRepository: UsersRepository,
private noteCreateService: NoteCreateService,
private queueLoggerService: QueueLoggerService,
private noteCreateService: NoteCreateService,
private queueLoggerService: QueueLoggerService,
) {
this.logger = this.queueLoggerService.logger.createSubLogger('schedule-note-post');
}
@bindThis
@bindThis
public async process(job: Bull.Job<ScheduleNotePostJobData>): Promise<void> {
this.scheduledNotesRepository.findOneBy({ id: job.data.scheduledNoteId }).then(async (data) => {
if (!data) {

View File

@ -9,6 +9,7 @@ import { Endpoint } from '@/server/api/endpoint-base.js';
import { DI } from '@/di-symbols.js';
import type { ScheduledNotesRepository } from '@/models/_.js';
import { UserEntityService } from '@/core/entities/UserEntityService.js';
import { QueryService } from '@/core/QueryService.js';
export const meta = {
tags: ['notes'],
@ -57,6 +58,12 @@ export const meta = {
} as const;
export const paramDef = {
type: 'object',
properties: {
sinceId: { type: 'string', format: 'misskey:id' },
untilId: { type: 'string', format: 'misskey:id' },
limit: { type: 'integer', minimum: 1, maximum: 100, default: 10 },
},
} as const;
@Injectable()
@ -64,10 +71,15 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
constructor(
@Inject(DI.scheduledNotesRepository)
private scheduledNotesRepository: ScheduledNotesRepository,
private userEntityService: UserEntityService,
private queryService: QueryService,
) {
super(meta, paramDef, async (ps, me) => {
const scheduleNotes = await this.scheduledNotesRepository.findBy({ userId: me.id });
const query = this.queryService.makePaginationQuery(this.scheduledNotesRepository.createQueryBuilder('note'), ps.sinceId, ps.untilId)
.andWhere('note.userId = :userId', { userId: me.id });
const scheduleNotes = await query.limit(ps.limit).getMany();
const user = await this.userEntityService.pack(me, me);
const scheduleNotesPack: {
id: string;

View File

@ -1143,6 +1143,7 @@ defineExpose({
.preview {
padding: 16px 20px 0 20px;
min-height: 75px;
max-height: 150px;
overflow: auto;
}

View File

@ -73,7 +73,6 @@ function getReactionName(reaction: string): string {
}
.users {
contain: content;
flex: 1;
min-width: 0;
margin: -4px 14px 0 10px;
@ -85,7 +84,7 @@ function getReactionName(reaction: string): string {
line-height: 24px;
padding-top: 4px;
white-space: nowrap;
overflow: hidden;
overflow: visible;
text-overflow: ellipsis;
}

View File

@ -12,39 +12,51 @@ SPDX-License-Identifier: AGPL-3.0-only
@closed="$emit('closed')"
>
<template #header>{{ i18n.ts._schedulePost.list }}</template>
<div v-for="item in notes">
<MkSpacer :marginMin="14" :marginMax="16">
<MkNoteSimple scheduled="true" :note="item.note"/>
</MkSpacer>
</div>
<MkSpacer :marginMin="14" :marginMax="16">
<MkPagination :pagination="pagination">
<template #empty>
<div class="_fullinfo">
<img :src="infoImageUrl" class="_ghost"/>
<div>{{ i18n.ts.nothing }}</div>
</div>
</template>
<template #default="{ items }">
<div class="_gaps">
<MkNoteSimple v-for="item in items" :key="item.id" :scheduled="true" :note="item.note"/>
</div>
</template>
</MkPagination>
</MkSpacer>
</MkModalWindow>
</template>
<script lang="ts" setup>
import { onMounted, ref } from 'vue';
import { ref } from 'vue';
import * as Misskey from 'misskey-js';
import type { Paging } from '@/components/MkPagination.vue';
import MkModalWindow from '@/components/MkModalWindow.vue';
import * as os from '@/os.js';
import MkPagination from '@/components/MkPagination.vue';
import MkNoteSimple from '@/components/MkNoteSimple.vue';
import { i18n } from '@/i18n.js';
import { infoImageUrl } from '@/instance.js';
const emit = defineEmits<{
(ev: 'ok', selected: Misskey.entities.UserDetailed): void;
(ev: 'cancel'): void;
(ev: 'closed'): void;
(ev: 'c-losed'): void;
}>();
let dialogEl = $ref();
const notes = ref([]);
const dialogEl = ref();
const cancel = () => {
emit('cancel');
dialogEl.close();
dialogEl.value.close();
};
onMounted(async () => {
notes.value = await os.api('notes/schedule/list');
});
const pagination: Paging = {
endpoint: 'notes/schedule/list',
limit: 10,
};
</script>
<style lang="scss" module>

View File

@ -148,12 +148,13 @@ async function reloadAsk() {
}
async function updateRepliesAll(withReplies: boolean) {
const { canceled } = os.confirm({
const { canceled } = await os.confirm({
type: 'warning',
text: withReplies ? i18n.ts.confirmShowRepliesAll : i18n.ts.confirmHideRepliesAll,
});
if (canceled) return;
await os.api('following/update-all', { withReplies });
os.api('following/update-all', { withReplies });
}
watch([

View File

@ -176,7 +176,7 @@ function more(ev: MouseEvent) {
.bottom {
position: sticky;
bottom: 0;
padding: 20px 0;
padding-top: 20px;
background: var(--X14);
-webkit-backdrop-filter: var(--blur, blur(8px));
backdrop-filter: var(--blur, blur(8px));
@ -228,11 +228,10 @@ function more(ev: MouseEvent) {
position: relative;
display: flex;
align-items: center;
padding-left: 30px;
padding: 20px 0 20px 30px;
width: 100%;
text-align: left;
box-sizing: border-box;
margin-top: 16px;
overflow: clip;
}
@ -363,7 +362,7 @@ function more(ev: MouseEvent) {
.bottom {
position: sticky;
bottom: 0;
padding: 20px 0;
padding-top: 20px;
background: var(--X14);
-webkit-backdrop-filter: var(--blur, blur(8px));
backdrop-filter: var(--blur, blur(8px));
@ -374,7 +373,6 @@ function more(ev: MouseEvent) {
position: relative;
width: 100%;
height: 52px;
margin-bottom: 16px;
text-align: center;
&:before {
@ -411,6 +409,7 @@ function more(ev: MouseEvent) {
.account {
display: block;
text-align: center;
padding: 20px 0;
width: 100%;
overflow: clip;
}