Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🎉 init(崩溃分析): init #69

Merged
merged 1 commit into from
Aug 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions components/analyzer.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
<template>
<component is="script">
<!-- <script> -->
function Checkfiles() {
var fup = document.getElementById('file_uploader');
var fileName = fup.value;
var ext = fileName.substring(fileName.lastIndexOf('.') + 1).toLowerCase();
if (ext == "zip" || ext == "log" || ext == "txt") {
document.getElementById('file_uploader_label').innerText = fileName;
document.getElementById('file_uploader_btn').innerHTML = "重新上传";
return true;
}
else {
document.getElementById('file_uploader_label').innerText = "请上传 .zip/.txt/.log 文件!";
fup.focus();
return false;
}
}
<!-- </script> -->
</component>
<div class="analyzer_main">
<h4 style="text-align: center;">请点击按钮上传导出的 .zip/.txt/.log 文件</h4>
<img class="icon_upload" src="../docs/src/logo-upload.svg">
<div class="file_uploader_container">
<h4 id="file_uploader_label" for="file_uploader" singleLine="false">未选择文件</h4>
<button id="file_uploader_btn" onclick="file_uploader.click()">开始上传</button>
<input type="file" name="file_uploader" id="file_uploader" onchange="Checkfiles()" style="display: none;" />
</div>
</div>
</template>

<style scoped>
div {
height: auto;
width: auto;
}

.analyzer_main {
border: 1px solid transparent;
border-color: var(--vp-custom-block-tip-border);
color: var(--vp-custom-block-tip-text);
background-color: var(--vp-custom-block-tip-bg);
border-radius: 8px;
padding: 16px 16px 8px;
line-height: 24px;
font-size: var(--vp-custom-block-font-size);
}

.icon_upload {
margin: auto;
height: 20%;
width: 20%;
}

.file_uploader_container {
text-align: center;
margin: auto;
width: 100%;
height: 100%;
}

#file_uploader_btn {
margin-top: 3px;
height: 35px;
width: 120px;
border: 1px solid transparent;
border-color: var(--vp-custom-block-tip-border);
background-color: var(--vp-custom-block-tip-bg);
border-radius: 8px;
}
</style>
3 changes: 2 additions & 1 deletion docs/.vitepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { withPwa } from "@vite-pwa/vitepress";
import process from "node:process";
import { defineConfig } from "vitepress";
import { withPwa } from "@vite-pwa/vitepress";
import { pwa } from "./scripts/pwa";

const COMMIT_ID = process.env.CF_PAGES_COMMIT_SHA || process.env.COMMIT_REF;
Expand Down Expand Up @@ -83,6 +83,7 @@ export default withPwa(
{
text: "文档",
items: [
{ text: "崩溃分析工具", link: "/analyzer" },
{ text: "客户端崩溃", link: "/clients" },
{ text: "服务端崩溃", link: "/servers" },
{ text: "Mixin", link: "/mixin" },
Expand Down
18 changes: 18 additions & 0 deletions docs/analyzer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
<script setup>
import analyzer from '../components/analyzer.vue'
</script>

# 崩溃分析工具

:::warning 警告 ⚠

施工中 请绕行

:::
---

<analyzer/>

::: warning 隐私声明
所有文件的分析仅会在本地进行,不会有任何数据上传到云端。
:::
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ hero:
alt: CrashMC
actions:
- theme: brand
text: 崩溃分析工具
link: /analyzer
- theme: alt
text: 客户端崩溃
link: /clients
- theme: alt
Expand Down
12 changes: 12 additions & 0 deletions docs/src/logo-upload.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions docs/team.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,14 @@ const members = [
links: [
{ icon: 'github', link: 'https://github.com/bwtx2023' },
]
},
{
avatar: 'https://jsd.onmicrosoft.cn/avatar/1dd95c166685a1aa305e102aa6828a84.png',
name: 'HRxiaohu',
title: '开发者',
links: [
{ icon: 'github', link: 'https://github.com/HRxiaohu' },
]
},
{
avatar: 'https://jsd.onmicrosoft.cn/avatar/636d113ce37111d08f08faee780ce9b8',
Expand Down
Loading