From 3679a35ce2b987276c26e66d346d7e09ace528cf Mon Sep 17 00:00:00 2001 From: pen <121443048+penginn-0@users.noreply.github.com> Date: Mon, 25 Mar 2024 13:26:15 +0900 Subject: [PATCH 01/11] missinglocale --- locales/ja-JP.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index add32a5531..44d4231016 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -1800,6 +1800,9 @@ _achievements: _setNameToNoriDev: title: "神様コンプレックス(CherryPick)" description: "名前を noridev に設定した" + _setNameToYojo: + title: "ロリータコンプレックス" + description: "名前を 幼女 に設定した" _passedSinceAccountCreated1: title: "一周年" description: "アカウント作成から1年経過した" From 2121c6d9d35e02ad054363910416040ff9e8f309 Mon Sep 17 00:00:00 2001 From: pen <121443048+penginn-0@users.noreply.github.com> Date: Mon, 25 Mar 2024 13:28:56 +0900 Subject: [PATCH 02/11] fix:duplicatefileattached --- packages/frontend/src/pages/search.note.vue | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/packages/frontend/src/pages/search.note.vue b/packages/frontend/src/pages/search.note.vue index bd46fc868b..f7a8fe3944 100644 --- a/packages/frontend/src/pages/search.note.vue +++ b/packages/frontend/src/pages/search.note.vue @@ -47,22 +47,6 @@ SPDX-License-Identifier: AGPL-3.0-only -
- - - - -
-
- - - - - -
-
-
-
{{ i18n.ts.search }} From 3937e4e507975946a011891d026a1e706b6406ed Mon Sep 17 00:00:00 2001 From: pen <121443048+penginn-0@users.noreply.github.com> Date: Mon, 25 Mar 2024 13:49:00 +0900 Subject: [PATCH 03/11] =?UTF-8?q?=E5=BD=A2=E3=81=A0=E3=81=91=EF=BC=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/SearchService.ts | 8 +++++++- packages/frontend/src/pages/search.note.vue | 1 - 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/core/SearchService.ts b/packages/backend/src/core/SearchService.ts index 7db0614803..c38ebd8d7d 100644 --- a/packages/backend/src/core/SearchService.ts +++ b/packages/backend/src/core/SearchService.ts @@ -242,7 +242,13 @@ export class SearchService { query.andWhere('user.host = :host', { host: opts.host }); } } - + if(opts.fileOption){ + if(opts.fileOption === 'file-only'){ + + }if(opts.fileOption === 'no-file'){ + + } + } this.queryService.generateVisibilityQuery(query, me); if (me) this.queryService.generateMutedUserQuery(query, me); if (me) this.queryService.generateBlockedUserQuery(query, me); diff --git a/packages/frontend/src/pages/search.note.vue b/packages/frontend/src/pages/search.note.vue index f7a8fe3944..b8b80d17b9 100644 --- a/packages/frontend/src/pages/search.note.vue +++ b/packages/frontend/src/pages/search.note.vue @@ -118,7 +118,6 @@ async function search() { query: searchQuery.value, userId: user.value ? user.value.id : null, origin: searchOrigin.value, - fileOption: isfileOnly.value, }, }; From c8c894b866dc6b7747636329877c2b4b875ddfa6 Mon Sep 17 00:00:00 2001 From: pen <121443048+penginn-0@users.noreply.github.com> Date: Mon, 25 Mar 2024 13:56:51 +0900 Subject: [PATCH 04/11] lint? --- packages/backend/src/core/SearchService.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/backend/src/core/SearchService.ts b/packages/backend/src/core/SearchService.ts index c38ebd8d7d..37f9e34457 100644 --- a/packages/backend/src/core/SearchService.ts +++ b/packages/backend/src/core/SearchService.ts @@ -242,11 +242,9 @@ export class SearchService { query.andWhere('user.host = :host', { host: opts.host }); } } - if(opts.fileOption){ - if(opts.fileOption === 'file-only'){ - - }if(opts.fileOption === 'no-file'){ - + if (opts.fileOption) { + if (opts.fileOption === 'file-only') { + } if (opts.fileOption === 'no-file') { } } this.queryService.generateVisibilityQuery(query, me); From 08dd8aa81db5020b8e119d2f28a0fd863fe7326a Mon Sep 17 00:00:00 2001 From: pen <121443048+penginn-0@users.noreply.github.com> Date: Wed, 27 Mar 2024 09:56:25 +0900 Subject: [PATCH 05/11] query --- packages/backend/src/core/SearchService.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/backend/src/core/SearchService.ts b/packages/backend/src/core/SearchService.ts index 37f9e34457..8d55bf1868 100644 --- a/packages/backend/src/core/SearchService.ts +++ b/packages/backend/src/core/SearchService.ts @@ -244,7 +244,9 @@ export class SearchService { } if (opts.fileOption) { if (opts.fileOption === 'file-only') { + query.andWhere('note.fileIds != \'{}\'') } if (opts.fileOption === 'no-file') { + query.andWhere('note.fileIds == \'{}\'') } } this.queryService.generateVisibilityQuery(query, me); From 8f5c9de2a0edd05a8f0c13250ba0b996a722a061 Mon Sep 17 00:00:00 2001 From: pen <121443048+penginn-0@users.noreply.github.com> Date: Wed, 27 Mar 2024 09:58:48 +0900 Subject: [PATCH 06/11] frontendlint --- packages/frontend/src/pages/search.note.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/packages/frontend/src/pages/search.note.vue b/packages/frontend/src/pages/search.note.vue index b8b80d17b9..48bc6681c9 100644 --- a/packages/frontend/src/pages/search.note.vue +++ b/packages/frontend/src/pages/search.note.vue @@ -121,10 +121,9 @@ async function search() { }, }; - if(isfileOnly.value !== 'combined') - { - notePagination.value.endpoint = 'notes/search-file' - notePagination.value.params.fileOption = isfileOnly.value + if (isfileOnly.value !== 'combined') { + notePagination.value.endpoint = 'notes/search-file'; + notePagination.value.params.fileOption = isfileOnly.value; } if (isLocalOnly.value) notePagination.value.params.host = '.'; From 9024b2da3eb6a3c25bd262b277a2502201694b88 Mon Sep 17 00:00:00 2001 From: pen <121443048+penginn-0@users.noreply.github.com> Date: Wed, 27 Mar 2024 10:00:49 +0900 Subject: [PATCH 07/11] =?UTF-8?q?=E7=A7=81=E3=81=AF=E3=82=BB=E3=83=9F?= =?UTF-8?q?=E3=82=B3=E3=83=AD=E3=83=B3=E3=82=92=E3=81=A4=E3=81=91=E3=82=8B?= =?UTF-8?q?=E3=81=AE=E3=82=92=E5=BF=98=E3=82=8C=E3=81=BE=E3=81=97=E3=81=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/backend/src/core/SearchService.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/backend/src/core/SearchService.ts b/packages/backend/src/core/SearchService.ts index 8d55bf1868..9403320b97 100644 --- a/packages/backend/src/core/SearchService.ts +++ b/packages/backend/src/core/SearchService.ts @@ -244,9 +244,9 @@ export class SearchService { } if (opts.fileOption) { if (opts.fileOption === 'file-only') { - query.andWhere('note.fileIds != \'{}\'') + query.andWhere('note.fileIds != \'{}\''); } if (opts.fileOption === 'no-file') { - query.andWhere('note.fileIds == \'{}\'') + query.andWhere('note.fileIds == \'{}\''); } } this.queryService.generateVisibilityQuery(query, me); From 35f97237d48d55e62d3bf279b1113565ba91773a Mon Sep 17 00:00:00 2001 From: pen <121443048+penginn-0@users.noreply.github.com> Date: Wed, 27 Mar 2024 11:11:36 +0900 Subject: [PATCH 08/11] query --- packages/backend/src/core/SearchService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/core/SearchService.ts b/packages/backend/src/core/SearchService.ts index 9403320b97..e2ded13c22 100644 --- a/packages/backend/src/core/SearchService.ts +++ b/packages/backend/src/core/SearchService.ts @@ -245,7 +245,7 @@ export class SearchService { if (opts.fileOption) { if (opts.fileOption === 'file-only') { query.andWhere('note.fileIds != \'{}\''); - } if (opts.fileOption === 'no-file') { + } else if (opts.fileOption === 'no-file') { query.andWhere('note.fileIds == \'{}\''); } } From b24f4c394f1c55f0afdbdc01d2c24b7a874de14b Mon Sep 17 00:00:00 2001 From: pen <121443048+penginn-0@users.noreply.github.com> Date: Wed, 27 Mar 2024 11:25:07 +0900 Subject: [PATCH 09/11] frontend --- packages/frontend/src/pages/admin/roles.vue | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/packages/frontend/src/pages/admin/roles.vue b/packages/frontend/src/pages/admin/roles.vue index f393cbb389..c0f2a736ef 100644 --- a/packages/frontend/src/pages/admin/roles.vue +++ b/packages/frontend/src/pages/admin/roles.vue @@ -111,7 +111,15 @@ SPDX-License-Identifier: AGPL-3.0-only - + + + + + + + + + From 875e3aa7bf2236ebfcc78e1b416343171934954f Mon Sep 17 00:00:00 2001 From: pen <121443048+penginn-0@users.noreply.github.com> Date: Wed, 27 Mar 2024 12:10:08 +0900 Subject: [PATCH 10/11] fix --- packages/frontend/src/const.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/frontend/src/const.ts b/packages/frontend/src/const.ts index b8b5502aa0..d71e9cf6e5 100644 --- a/packages/frontend/src/const.ts +++ b/packages/frontend/src/const.ts @@ -84,6 +84,7 @@ export const ROLE_POLICIES = [ 'canManageCustomEmojis', 'canManageAvatarDecorations', 'canSearchNotes', + 'canAdvancedSearchNotes', 'canUseTranslator', 'canHideAds', 'driveCapacityMb', From 4101d423d0dce478a133f805a6222c181479544a Mon Sep 17 00:00:00 2001 From: pen <121443048+penginn-0@users.noreply.github.com> Date: Wed, 27 Mar 2024 12:48:53 +0900 Subject: [PATCH 11/11] Fix:query --- packages/backend/src/core/SearchService.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/core/SearchService.ts b/packages/backend/src/core/SearchService.ts index e2ded13c22..79e1d06d93 100644 --- a/packages/backend/src/core/SearchService.ts +++ b/packages/backend/src/core/SearchService.ts @@ -242,11 +242,12 @@ export class SearchService { query.andWhere('user.host = :host', { host: opts.host }); } } + if (opts.fileOption) { if (opts.fileOption === 'file-only') { query.andWhere('note.fileIds != \'{}\''); } else if (opts.fileOption === 'no-file') { - query.andWhere('note.fileIds == \'{}\''); + query.andWhere('note.fileIds = :fIds', { fIds: '{}' }); } } this.queryService.generateVisibilityQuery(query, me);