Skip to content
This repository was archived by the owner on May 11, 2025. It is now read-only.

Commit 9a52681

Browse files
committed
update frontend
1 parent 9cb1072 commit 9a52681

File tree

2 files changed

+48
-4
lines changed

2 files changed

+48
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,9 +40,9 @@ The repository card are used to show the language analysis of the project, stars
4040
## 🍎 Contributor Card
4141
The contributor card is used to count the contributors in a project and will be ranked by the number of `commits`.
4242
```markdown
43-
[![Web ChatGPT QQ Bot's Contributors](https://stats.deeptrain.net/contributor/zmh-program/web-chatgpt-qq-bot?column=8)](https://github.com/zmh-program/code-statistic)
43+
[![Web ChatGPT QQ Bot's Contributors](https://stats.deeptrain.net/contributor/zmh-program/web-chatgpt-qq-bot)](https://github.com/zmh-program/code-statistic)
4444
```
45-
[![Web ChatGPT QQ Bot's Contributors](https://stats.deeptrain.net/contributor/zmh-program/web-chatgpt-qq-bot?column=8)](https://github.com/zmh-program/code-statistic)
45+
[![Web ChatGPT QQ Bot's Contributors](https://stats.deeptrain.net/contributor/zmh-program/web-chatgpt-qq-bot)](https://github.com/zmh-program/code-statistic)
4646

4747

4848
The param `column` is the number of contributors in each row. The minimum is **4** and the default is **6**.
@@ -67,9 +67,9 @@ The issue card is used to show the status of the issue, title, time, communicati
6767
## 🍓 Pull Request Card
6868
The pull request card is used to show the status of the pull request, branches, title, time, migrations, etc.
6969
```markdown
70-
[![TurboWarp's PR #497](https://stats.deeptrain.net/pull/TurboWarp/extensions/497)](https://github.com/zmh-program/code-statistic)
70+
[![Code Statistic's PR #1](https://stats.deeptrain.net/pull/zmh-program/code-statistic/1)](https://github.com/zmh-program/code-statistic)
7171
```
72-
[![TurboWarp's PR #497](https://stats.deeptrain.net/pull/TurboWarp/extensions/497)](https://github.com/zmh-program/code-statistic)
72+
[![Code Statistic's PR #1](https://stats.deeptrain.net/pull/zmh-program/code-statistic/1)](https://github.com/zmh-program/code-statistic)
7373

7474
## 🥝 Dark Theme
7575
Very easy, just add `?theme=dark` after it in any kind of card!

gui/src/App.vue

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,16 @@ const release = reactive({
2222
repo: '',
2323
tag: 'latest'
2424
})
25+
const issue = reactive({
26+
username: '',
27+
repo: '',
28+
id: 1,
29+
})
30+
const pull = reactive({
31+
username: '',
32+
repo: '',
33+
id: 1,
34+
})
2535
2636
function validate(map: Record<string, any>) {
2737
for (const key in map) {
@@ -57,6 +67,14 @@ function generate() {
5767
if (!validate(release)) return;
5868
link.value = join(`/release/${release.username}/${release.repo}/?tag=${release.tag}&theme=${theme.value}`);
5969
break;
70+
case 'issue':
71+
if (!validate(issue)) return;
72+
link.value = join(`/issue/${issue.username}/${issue.repo}/${issue.id}?theme=${theme.value}`);
73+
break;
74+
case 'pull':
75+
if (!validate(pull)) return;
76+
link.value = join(`/pull/${pull.username}/${pull.repo}/${pull.id}?theme=${theme.value}`);
77+
break;
6078
}
6179
}
6280
</script>
@@ -107,6 +125,32 @@ function generate() {
107125
<t-input placeholder="tag" v-model="release.tag" />
108126
</t-form-item>
109127
</t-tab-panel>
128+
<t-tab-panel value="issue" label="Issue"><br>
129+
<t-form-item label="User">
130+
<t-input-adornment prepend="github.com/">
131+
<t-input placeholder="username" v-model="issue.username" />
132+
</t-input-adornment>
133+
</t-form-item>
134+
<t-form-item label="Repo">
135+
<t-input placeholder="repository" v-model="issue.repo" />
136+
</t-form-item>
137+
<t-form-item label="Id">
138+
<t-input placeholder="id" v-model="issue.id" />
139+
</t-form-item>
140+
</t-tab-panel>
141+
<t-tab-panel value="pull" label="Pull Request"><br>
142+
<t-form-item label="User">
143+
<t-input-adornment prepend="github.com/">
144+
<t-input placeholder="username" v-model="pull.username" />
145+
</t-input-adornment>
146+
</t-form-item>
147+
<t-form-item label="Repo">
148+
<t-input placeholder="repository" v-model="pull.repo" />
149+
</t-form-item>
150+
<t-form-item label="Id">
151+
<t-input placeholder="id" v-model="pull.id" />
152+
</t-form-item>
153+
</t-tab-panel>
110154
</t-tabs>
111155
<t-form-item label="Theme" name="theme" initial-data="dark">
112156
<t-select defaultValue="light" class="select" v-model="theme">

0 commit comments

Comments
 (0)