Skip to content

Commit

Permalink
docs:调整样式
Browse files Browse the repository at this point in the history
  • Loading branch information
HRxiaohu committed Aug 4, 2023
1 parent 81a8fa2 commit e755c79
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 9 deletions.
1 change: 1 addition & 0 deletions .github/ISSUE_TEMPLATE/CRASH-UPLOAD.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ body:
attributes:
label: "崩溃日志"
description: 请将您的崩溃日志粘贴到此处
placeholder: 日志...
render: bash
validations:
required: true
Expand Down
23 changes: 15 additions & 8 deletions components/analyzer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<hr />
<h4 id="analysis_result_title">分析结果:</h4>
<p id="analysis_result_msg">分析器歇逼了</p>
<button id="redirect_btn" @click="FinishAnalysis">导航到解决方案</button>
<button id="redirect_btn" @click="redirectBtnClick">{{ redirectMsg }}</button>
</div>
</div>
</template>
Expand All @@ -25,6 +25,7 @@ import { ref } from 'vue';
var isBtnDisabled = ref(false);
var labelMsg = ref('未选择文件');
var btnMsg = ref('开始上传');
var redirectMsg = ref('导航到解决方案');
var launcher = 'Unknown'
var redirect_url = null;
var increaseOpacTimer = null;
Expand Down Expand Up @@ -77,6 +78,8 @@ function Clean() {
document.getElementById('analysis_result_main').style.display = 'none';
document.getElementById('analysis_result_main').style.opacity = 0;
document.getElementById('analysis_result_msg').innerText = '分析器歇逼了';
redirectMsg = ref('导航到解决方案');
redirect_url = null;
clearInterval(increaseOpacTimer);
clearInterval(increaseHeightTimer);
}
Expand Down Expand Up @@ -165,13 +168,12 @@ function StartAnalysis(file, ext) {
}
}
function LogAnalysis(log) {
if(''){}
else{
ShowAnalysisResult('本工具还未收录您所遇到的错误,请点击下方按钮前往 Github 反馈。','https://github.com/GlobeMC/crashmc.com/issues/new')
}
ShowAnalysisResult('本工具还未收录您所遇到的错误,请点击下方按钮前往 Github 反馈。', 'https://github.com/GlobeMC/crashmc.com/issues/new/choose')
umami.track('Analysis Finish', { Status: 'Unrecord', Launcher: launcher });
redirectMsg = ref('提交反馈');
}
function ShowAnalysisResult(msg,result_url) {
redirect_url.value = redirect_url;
function ShowAnalysisResult(msg, result_url) {
redirect_url = result_url;
document.getElementById('analysis_result_main').style.display = 'block';
document.getElementById('analysis_result_msg').innerText = msg;
Expand Down Expand Up @@ -217,6 +219,8 @@ function ShowAnalysisResult(msg,result_url) {
isBtnDisabled.value = false;
btnMsg.value = '重新上传'
FinishAnalysis('Success', '0')
}
function FinishAnalysis(Status, Msg) {
if (Status == 'CanFetchLogFile') {
Expand All @@ -238,10 +242,13 @@ function FinishAnalysis(Status, Msg) {
umami.track('Analysis Error', { Status: '日志文件解压错误', ErrMsg: Msg });
}
else if (Status == 'Success') {
window.location.href = redirect_url;
umami.track('Analysis Finish', { Status: 'Success', Launcher: launcher, CrashReason: 'lorem' });
}
}
function redirectBtnClick() {
window.location.href = redirect_url;
}
</script>

<style scoped>
Expand Down
2 changes: 1 addition & 1 deletion docs/analyzer.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,6 @@ import analyzer from '../components/analyzer.vue'

:::warning 隐私声明

所有文件的分析仅会在本地进行,部分错误信息将会上传到云端
所有文件的分析仅会在本地进行,仅会有部分错误信息被上传到云端

:::

0 comments on commit e755c79

Please sign in to comment.