From 5ad811ea30839bc6248e0c79549b8b03ec8f82eb Mon Sep 17 00:00:00 2001 From: syuilo Date: Fri, 21 Jan 2022 18:27:33 +0900 Subject: [PATCH] feat: increase files limit for note #8062 --- CHANGELOG.md | 1 + packages/backend/src/server/api/endpoints/notes/create.ts | 6 +++--- packages/client/src/components/post-form-attaches.vue | 3 +-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 88e8055da..7fb7a37e2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ - リバーシ機能が削除されました - 後日別リポジトリとして復活予定です - Chat UIが削除されました +- ノートに添付できるファイルの数が16に増えました ### Improvements - カスタム絵文字一括編集機能 diff --git a/packages/backend/src/server/api/endpoints/notes/create.ts b/packages/backend/src/server/api/endpoints/notes/create.ts index 6adbc821e..4efa76b24 100644 --- a/packages/backend/src/server/api/endpoints/notes/create.ts +++ b/packages/backend/src/server/api/endpoints/notes/create.ts @@ -48,7 +48,7 @@ export const meta = { validator: $.optional.nullable.str.pipe(text => text.trim() != '' && length(text.trim()) <= maxNoteTextLength - && Array.from(text.trim()).length <= DB_MAX_NOTE_TEXT_LENGTH // DB limit + && Array.from(text.trim()).length <= DB_MAX_NOTE_TEXT_LENGTH, // DB limit ), default: null, }, @@ -78,11 +78,11 @@ export const meta = { }, fileIds: { - validator: $.optional.arr($.type(ID)).unique().range(1, 4), + validator: $.optional.arr($.type(ID)).unique().range(1, 16), }, mediaIds: { - validator: $.optional.arr($.type(ID)).unique().range(1, 4), + validator: $.optional.arr($.type(ID)).unique().range(1, 16), deprecated: true, }, diff --git a/packages/client/src/components/post-form-attaches.vue b/packages/client/src/components/post-form-attaches.vue index 0782ce22e..591022c5f 100644 --- a/packages/client/src/components/post-form-attaches.vue +++ b/packages/client/src/components/post-form-attaches.vue @@ -10,7 +10,7 @@ -

{{ 4 - files.length }}/4

+

{{ 16 - files.length }}/16

@@ -41,7 +41,6 @@ export default defineComponent({ data() { return { menu: null as Promise | null, - }; },