From c87ed513112bd25496f96c1df366a1141a6da868 Mon Sep 17 00:00:00 2001 From: KevinWh0 <45321184+ChaoticLeah@users.noreply.github.com> Date: Wed, 12 Jun 2024 13:35:37 +0200 Subject: [PATCH] made it so you can pick a search engine --- locales/en-US.yml | 4 +++ locales/index.d.ts | 16 +++++++++++ locales/ja-JP.yml | 4 +++ packages/frontend/src/components/MkGoogle.vue | 8 ++++-- .../frontend/src/pages/settings/general.vue | 28 ++++++++++++++++++- .../frontend/src/scripts/search-engine-map.ts | 12 ++++++++ packages/frontend/src/store.ts | 5 ++++ 7 files changed, 73 insertions(+), 4 deletions(-) create mode 100644 packages/frontend/src/scripts/search-engine-map.ts diff --git a/locales/en-US.yml b/locales/en-US.yml index c442d41c1e..23884aa043 100644 --- a/locales/en-US.yml +++ b/locales/en-US.yml @@ -752,6 +752,10 @@ 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" +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\"." +searchEngineCusomURI: "Custom URI" disableShowingAnimatedImages: "Don't play animated images" highlightSensitiveMedia: "Highlight sensitive media" verificationEmailSent: "A verification email has been sent. Please follow the included link to complete verification." diff --git a/locales/index.d.ts b/locales/index.d.ts index 6efd5b33b9..fe36e2dfd0 100644 --- a/locales/index.d.ts +++ b/locales/index.d.ts @@ -3020,6 +3020,22 @@ export interface Locale extends ILocale { * 添付画像のサムネイルをオリジナル画質にする */ "loadRawImages": string; + /** + * 検索MFMの検索エンジン + */ + "searchEngine": string; + /** + * 他 + */ + "searchEngineOther": string; + /** + * カスタム URI は、"https://www.google.com/search?q={query}" や "https://www.google.com/search?q=%s" のような形式で入力する必要があります。 + */ + "searchEngineCustomURIDescription": ParameterizedString<"query">; + /** + * カスタム URI + */ + "searchEngineCusomURI": string; /** * アニメーション画像を再生しない */ diff --git a/locales/ja-JP.yml b/locales/ja-JP.yml index 68e4091a88..293f8ec380 100644 --- a/locales/ja-JP.yml +++ b/locales/ja-JP.yml @@ -751,6 +751,10 @@ noCrawleDescription: "外部の検索エンジンにあなたのユーザーペ lockedAccountInfo: "フォローを承認制にしても、ノートの公開範囲を「フォロワー」にしない限り、誰でもあなたのノートを見ることができます。" alwaysMarkSensitive: "デフォルトでメディアをセンシティブ設定にする" loadRawImages: "添付画像のサムネイルをオリジナル画質にする" +searchEngine: "検索MFMの検索エンジン" +searchEngineOther: "他" +searchEngineCustomURIDescription: "カスタム URI は、\"https://www.google.com/search?q={query}\" や \"https://www.google.com/search?q=%s\" のような形式で入力する必要があります。" +searchEngineCusomURI: "カスタム URI" disableShowingAnimatedImages: "アニメーション画像を再生しない" highlightSensitiveMedia: "メディアがセンシティブであることを分かりやすく表示" verificationEmailSent: "確認のメールを送信しました。メールに記載されたリンクにアクセスして、設定を完了してください。" diff --git a/packages/frontend/src/components/MkGoogle.vue b/packages/frontend/src/components/MkGoogle.vue index c92a49d32a..d1809d1073 100644 --- a/packages/frontend/src/components/MkGoogle.vue +++ b/packages/frontend/src/components/MkGoogle.vue @@ -13,6 +13,7 @@ SPDX-License-Identifier: AGPL-3.0-only diff --git a/packages/frontend/src/pages/settings/general.vue b/packages/frontend/src/pages/settings/general.vue index 1e4e815d5d..c589a29001 100644 --- a/packages/frontend/src/pages/settings/general.vue +++ b/packages/frontend/src/pages/settings/general.vue @@ -63,6 +63,27 @@ SPDX-License-Identifier: AGPL-3.0-only {{ i18n.ts.showGapBetweenNotesInTimeline }} {{ i18n.ts.loadRawImages }} Show instance ticker on replies + + + + + + + + +
+ + + + +
+ @@ -271,11 +292,12 @@ SPDX-License-Identifier: AGPL-3.0-only