Skip to content

Commit 5f2f792

Browse files
committed
🎨 优化报告问题流程
1 parent 32bfa21 commit 5f2f792

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,9 +58,8 @@ body:
5858
id: additional-info
5959
attributes:
6060
label: 补充信息 (选填)
61+
description: 错误日志/截图/脚本代码片段/相关配置...
6162
placeholder: |
62-
错误日志/截图/脚本代码片段/相关配置...
63-
6463
如果涉及某个具体的脚本,最好在扩展的首页中,选中将其导出后的zip压缩包上传上来,或者给出脚本的安装地址
6564
6665
扩展本身的错误日志查看流程为:

src/pages/popup/App.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,14 @@ function App() {
153153
await scriptClient.requestCheckUpdate("");
154154
window.close();
155155
break;
156+
case "report_issue":
157+
const browserInfo = `${navigator.userAgent}`;
158+
const issueUrl =
159+
`https://github.com/scriptscat/scriptcat/issues/new?` +
160+
`template=bug_report.yaml&scriptcat-version=${ExtVersion}&` +
161+
`browser-version=${encodeURIComponent(browserInfo)}`;
162+
window.open(issueUrl, "_blank");
163+
break;
156164
default:
157165
window.open(key, "_blank");
158166
break;
@@ -171,7 +179,7 @@ function App() {
171179
<IconSync style={iconStyle} />
172180
检查更新
173181
</Menu.Item>
174-
<Menu.Item key="https://github.com/scriptscat/scriptcat/issues/new?template=bug_report.yaml">
182+
<Menu.Item key="report_issue">
175183
<IconBug style={iconStyle} />
176184
{t("report_issue")}
177185
</Menu.Item>

0 commit comments

Comments
 (0)