From 1f7044c75247d73584352a771202760e575c3be3 Mon Sep 17 00:00:00 2001 From: piuvas silly Date: Sat, 21 Sep 2024 00:09:33 +0000 Subject: [PATCH 01/30] fix mcaptcha. --- compose_example.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compose_example.yml b/compose_example.yml index 15df128eff..2243c1701d 100644 --- a/compose_example.yml +++ b/compose_example.yml @@ -53,7 +53,7 @@ services: # restart: always # image: mcaptcha/mcaptcha:latest # networks: -# shonks: +# shonk: # aliases: # - localhost # ports: @@ -63,6 +63,8 @@ services: # environment: # PORT: 7493 # MCAPTCHA_redis_URL: "redis://mcaptcha_redis/" +# MCAPTCHA_allow_registration: true +# MCAPTCHA_server_DOMAIN: "ChangeThis" # depends_on: # db: # condition: service_healthy @@ -72,7 +74,7 @@ services: # mcaptcha_redis: # image: mcaptcha/cache:latest # networks: -# - shonks +# - shonk # healthcheck: # test: "redis-cli ping" # interval: 5s From dc806e060564bfa3cf6ffaeebb39b6a6f7aaa870 Mon Sep 17 00:00:00 2001 From: piuvas silly Date: Sat, 21 Sep 2024 00:27:34 +0000 Subject: [PATCH 02/30] Update compose_example.yml --- compose_example.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compose_example.yml b/compose_example.yml index 2243c1701d..0db8b04dc6 100644 --- a/compose_example.yml +++ b/compose_example.yml @@ -64,7 +64,7 @@ services: # PORT: 7493 # MCAPTCHA_redis_URL: "redis://mcaptcha_redis/" # MCAPTCHA_allow_registration: true -# MCAPTCHA_server_DOMAIN: "ChangeThis" +# MCAPTCHA_server_DOMAIN: "example.tld" # depends_on: # db: # condition: service_healthy From b4bd9508ee0fd63f10aa54a844ae74d3112f8c88 Mon Sep 17 00:00:00 2001 From: cuteBoiButt Date: Thu, 5 Sep 2024 17:29:03 +0000 Subject: [PATCH 03/30] Use proper logging facilities in WebfingerService --- packages/backend/src/core/WebfingerService.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/packages/backend/src/core/WebfingerService.ts b/packages/backend/src/core/WebfingerService.ts index 1517dd0074..86079a115b 100644 --- a/packages/backend/src/core/WebfingerService.ts +++ b/packages/backend/src/core/WebfingerService.ts @@ -8,6 +8,8 @@ import { Injectable } from '@nestjs/common'; import { XMLParser } from 'fast-xml-parser'; import { HttpRequestService } from '@/core/HttpRequestService.js'; import { bindThis } from '@/decorators.js'; +import Logger from '@/logger.js'; +import { RemoteLoggerService } from './RemoteLoggerService.js'; export type ILink = { href: string; @@ -28,9 +30,13 @@ const defaultProtocol = process.env.MISSKEY_WEBFINGER_USE_HTTP?.toLowerCase() == @Injectable() export class WebfingerService { + private logger: Logger; + constructor( private httpRequestService: HttpRequestService, + private remoteLoggerService: RemoteLoggerService, ) { + this.logger = this.remoteLoggerService.logger.createSubLogger('webfinger'); } @bindThis @@ -103,7 +109,7 @@ export class WebfingerService { const template = (hostMeta['XRD']['Link'] as Array).filter(p => p['@_rel'] === 'lrdd')[0]['@_template']; return template.indexOf('{uri}') < 0 ? null : template; } catch (err) { - console.error(`error while request host-meta for ${url}: ${err}`); + this.logger.error(`error while request host-meta for ${url}: ${err}`); return null; } } From e8cdec227892fe89a5d60ec82582528087657e8c Mon Sep 17 00:00:00 2001 From: cuteBoiButt Date: Fri, 6 Sep 2024 11:45:00 +0000 Subject: [PATCH 04/30] We don't need the whole Logger class here --- packages/backend/src/core/WebfingerService.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/backend/src/core/WebfingerService.ts b/packages/backend/src/core/WebfingerService.ts index 86079a115b..f57e7a2c1f 100644 --- a/packages/backend/src/core/WebfingerService.ts +++ b/packages/backend/src/core/WebfingerService.ts @@ -8,7 +8,7 @@ import { Injectable } from '@nestjs/common'; import { XMLParser } from 'fast-xml-parser'; import { HttpRequestService } from '@/core/HttpRequestService.js'; import { bindThis } from '@/decorators.js'; -import Logger from '@/logger.js'; +import type Logger from '@/logger.js'; import { RemoteLoggerService } from './RemoteLoggerService.js'; export type ILink = { From 7aa956aca91671c9ea8bd858ad31f2703ccd8653 Mon Sep 17 00:00:00 2001 From: Esurio Date: Thu, 19 Sep 2024 12:37:56 +0000 Subject: [PATCH 05/30] fix: use i18n in settings --- locales/en-US.yml | 3 +++ locales/index.d.ts | 12 ++++++++++++ locales/ja-JP.yml | 3 +++ packages/frontend/src/pages/settings/general.vue | 6 +++--- 4 files changed, 21 insertions(+), 3 deletions(-) diff --git a/locales/en-US.yml b/locales/en-US.yml index 58712657e8..6d24bb5b41 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -776,6 +776,7 @@ noCrawleDescription: "Ask search engines to not index your profile page, notes, lockedAccountInfo: "Unless you set your note visiblity to \"Followers only\", your notes will be visible to anyone, even if you require followers to be manually approved." alwaysMarkSensitive: "Mark as sensitive by default" loadRawImages: "Load original images instead of showing thumbnails" +showTickerOnReplies: "Show instance ticker on replies" searchEngine: "Search Engine For Search MFM" searchEngineOther: "Other" searchEngineCustomURIDescription: "The custom URI must be input in the format like \"https://www.google.com/search?q=\\{query}\" or \"https://www.google.com/search?q=%s\"." @@ -1089,6 +1090,8 @@ collapseRenotes: "Collapse boosts you've already seen" collapseRenotesDescription: "Collapse boosts that you have boosted or reacted to" collapseNotesRepliedTo: "Collapse notes replied to" collapseFiles: "Collapse files" +uncollapseCW: "Uncollapse CWs on notes" +expandLongNote: "Always expand long notes" autoloadConversation: "Load conversation on replies" internalServerError: "Internal Server Error" internalServerErrorDescription: "The server has run into an unexpected error." diff --git a/locales/index.d.ts b/locales/index.d.ts index 55a95f8fd9..177a3c8160 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -3120,6 +3120,10 @@ export interface Locale extends ILocale { * 添付画像のサムネイルをオリジナル画質にする */ "loadRawImages": string; + /** + * 返信にサーバー情報を表示する + */ + "showTickerOnReplies": string; /** * 検索MFMの検索エンジン */ @@ -4373,6 +4377,14 @@ export interface Locale extends ILocale { * ファイルを折りたたむ */ "collapseFiles": string; + /** + * CWを展開する + */ + "uncollapseCW": string; + /** + * 長い投稿を常に展開する + */ + "expandLongNote": string; /** * 会話スレッドを自動で読み込む */ diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index da208147a1..b4d47a449c 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -776,6 +776,7 @@ noCrawleDescription: "外部の検索エンジンにあなたのユーザーペ lockedAccountInfo: "フォローを承認制にしても、ノートの公開範囲を「フォロワー」にしない限り、誰でもあなたのノートを見ることができます。" alwaysMarkSensitive: "デフォルトでメディアをセンシティブ設定にする" loadRawImages: "添付画像のサムネイルをオリジナル画質にする" +showTickerOnReplies: "返信にサーバー情報を表示する" searchEngine: "検索MFMの検索エンジン" searchEngineOther: "カスタム" searchEngineCustomURIDescription: "カスタム検索エンジンのURIは、\"https://www.google.com/search?q=\\{query}\" や \"https://www.google.com/search?q=%s\" のような形式で入力する必要があります。" @@ -1089,6 +1090,8 @@ collapseRenotes: "ブーストのスマート省略" collapseRenotesDescription: "リアクションやブーストをしたことがあるノートをたたんで表示します。" collapseNotesRepliedTo: "返信元のノートを折りたたむ" collapseFiles: "ファイルを折りたたむ" +uncollapseCW: "CWを展開する" +expandLongNote: "長い投稿を常に展開する" autoloadConversation: "会話スレッドを自動で読み込む" internalServerError: "サーバー内部エラー" internalServerErrorDescription: "サーバー内部で予期しないエラーが発生しました。" diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index 75afe67be7..637c1b24b9 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -56,8 +56,8 @@ SPDX-License-Identifier: AGPL-3.0-only {{ i18n.ts.collapseNotesRepliedTo }} {{ i18n.ts.collapseFiles }} - Uncollapse CWs on notes - Always expand long notes + {{ i18n.ts.uncollapseCW }} + {{ i18n.ts.expandLongNote }} {{ i18n.ts.showNoteActionsOnlyHover }} {{ i18n.ts.showClipButtonInNoteFooter }} {{ i18n.ts.autoloadConversation }} @@ -67,7 +67,7 @@ SPDX-License-Identifier: AGPL-3.0-only {{ i18n.ts.showReactionsCount }} {{ i18n.ts.showGapBetweenNotesInTimeline }} {{ i18n.ts.loadRawImages }} - Show instance ticker on replies + {{ i18n.ts.showTickerOnReplies }}