From 93f93ffb357e3e2a0871286aee14a37aa975735d Mon Sep 17 00:00:00 2001 From: kakkokari-gtyih Date: Mon, 25 Dec 2023 18:37:43 +0900 Subject: [PATCH] fix --- .github/ISSUE_TEMPLATE/01_visitor-bug-report-ja.yml | 2 +- assets/js/misc/get-issue-url.ts | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/01_visitor-bug-report-ja.yml b/.github/ISSUE_TEMPLATE/01_visitor-bug-report-ja.yml index bce7e55c..a710e2e4 100644 --- a/.github/ISSUE_TEMPLATE/01_visitor-bug-report-ja.yml +++ b/.github/ISSUE_TEMPLATE/01_visitor-bug-report-ja.yml @@ -14,7 +14,7 @@ body: また、以下のことにもご注意ください。 - - **このフォームはバグ報告専用です。**機能リクエストは[こちら](https://github.com/misskey-dev/misskey-hub-next/issues/new?assignees=&labels=feature&projects=&template=04_feature-request.yml)からお願いします。 + - **このフォームはバグ報告専用です。** 機能リクエストは[こちら](https://github.com/misskey-dev/misskey-hub-next/issues/new?assignees=&labels=feature&projects=&template=04_feature-request.yml)からお願いします。 以上のことを試してもまだ問題が解決しない場合は、以下に症状をできるだけ詳しく記入してください。**貴重なお時間を使ってご報告いただきありがとうございます!** diff --git a/assets/js/misc/get-issue-url.ts b/assets/js/misc/get-issue-url.ts index 625d5b26..a7d7b47c 100644 --- a/assets/js/misc/get-issue-url.ts +++ b/assets/js/misc/get-issue-url.ts @@ -21,6 +21,7 @@ export async function getGhIssueUrl(options: { "fullVersionList", "platformVersion", ]); + let osVersion = 'v' + uaData.platformVersion; if (uaData.platform === 'Windows') { // https://learn.microsoft.com/ja-jp/microsoft-edge/web-platform/how-to-detect-win11 @@ -35,12 +36,15 @@ export async function getGhIssueUrl(options: { osVersion = '8.1 or before'; } } + const browserData = uaData.fullVersionList.find((item: any) => item.brand.toLowerCase() !== 'not_a brand'); + const env = [ `* Model and OS of the device(s): ${uaData.platform} ${osVersion}`, `* Browser: ${browserData.brand} ${browserData.version}`, `* Viewport Size: ${window.innerWidth}x${window.innerHeight}`, `* (UA Detected Using getHighEntropyValues)`, + (options.lang === 'ja') ? '* 【自動入力済】追記は不要です' : '* [Auto-filled] No need to write additional information.', ]; environment = env.join('\n'); } else { @@ -52,6 +56,7 @@ export async function getGhIssueUrl(options: { `* Browser: ${uaRes.browser.name} (${uaRes.engine.name}) v${uaRes.browser.version}`, `* Viewport Size: ${window.innerWidth}x${window.innerHeight}`, `* Raw User Agent: ${uaRes.ua}`, + (options.lang === 'ja') ? '* 【自動入力済】追記は不要です' : '* [Auto-filled] No need to write additional information.', ]; environment = env.join('\n'); }