Skip to content

Commit bc66030

Browse files
committed
重构
1 parent bcec195 commit bc66030

File tree

9 files changed

+385
-312
lines changed

9 files changed

+385
-312
lines changed

.editorconfig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,6 @@ trim_trailing_whitespace = false
1616

1717
[*.yml]
1818
indent_size = 2
19+
20+
[package.json]
21+
indent_size = 2

.github/workflows/eslint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
run: echo "::set-output name=dir::$(yarn cache dir)"
2727

2828
- name: Cache node_modules
29-
uses: actions/[email protected].6
29+
uses: actions/[email protected].7
3030
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
3131
with:
3232
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}

.github/workflows/maven-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,15 @@ jobs:
1919
uses: actions/checkout@master
2020

2121
- name: Setting up Java
22-
uses: actions/setup-java@v2.3.1
22+
uses: actions/setup-java@v2.4.0
2323
with:
2424
distribution: 'adopt'
2525
java-version: '16'
2626
java-package: jdk
2727
architecture: x64
2828

2929
- name: Setting up node.js
30-
uses: actions/setup-node@v2.4.1
30+
uses: actions/setup-node@v2.5.0
3131
with:
3232
node-version: '16.13.0'
3333

.github/workflows/nuxt-build.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
uses: actions/checkout@master
2020

2121
- name: Setup node
22-
uses: actions/setup-node@v2.4.1
22+
uses: actions/setup-node@v2.5.0
2323
with:
2424
node-version: '16.13.0'
2525

@@ -28,7 +28,7 @@ jobs:
2828
run: echo "::set-output name=dir::$(yarn cache dir)"
2929

3030
- name: Cache node_modules
31-
uses: actions/[email protected].6
31+
uses: actions/[email protected].7
3232
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
3333
with:
3434
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}

components/GridJs.vue

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<template>
2+
<grid :cols="cols" :rows="data" />
3+
</template>
4+
<script>
5+
import Grid from 'gridjs-vue'
6+
7+
export default {
8+
components: {
9+
Grid
10+
},
11+
props: {
12+
cols: Array,
13+
data: Array
14+
}
15+
}
16+
</script>

nuxt.config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ export default {
44

55
// Global page headers: https://go.nuxtjs.dev/config-head
66
head: {
7-
title: 'ybw0014 的 Maven 构建页面',
7+
title: '鬼斩的 Maven 构建页面',
88
htmlAttrs: {
99
lang: 'zh-CN'
1010
},
1111
meta: [
1212
{ charset: 'utf-8' },
1313
{ name: 'viewport', content: 'width=device-width,initial-scale=1.0,minimum-scale=1.0,shrink-to-fit=no' },
14-
{ hid: 'description', name: 'description', content: 'ybw0014 的 Maven 构建页面' },
14+
{ hid: 'description', name: 'description', content: '鬼斩的 Maven 构建页面' },
1515
{ hid: 'author', name: 'author', content: 'ybw0014' },
1616
{ name: 'format-detection', content: 'telephone=no' }
1717
],

package.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,9 @@
1515
"@nuxtjs/axios": "5.13.6",
1616
"@tailwindcss/forms": "0.3.4",
1717
"autoprefixer": "10.4.0",
18-
"core-js": "3.19.1",
18+
"core-js": "3.19.2",
1919
"cos-nodejs-sdk-v5": "2.10.10",
20+
"gridjs-vue": "4.0.0",
2021
"lodash": "4.17.21",
2122
"marked": "3.0.8",
2223
"maven": "5.0.0",
@@ -28,17 +29,19 @@
2829
"sass": "1.43.4",
2930
"sass-loader": "10.2.0",
3031
"tailwindcss": "2.2.19",
32+
"vue": "2.6.14",
3133
"vue-tailwind": "2.5.0",
3234
"xml-js": "1.6.11"
3335
},
3436
"devDependencies": {
35-
"@babel/eslint-parser": "7.16.0",
37+
"@babel/core": "7.16.0",
38+
"@babel/eslint-parser": "7.16.3",
3639
"@nuxt/types": "2.15.8",
37-
"@nuxtjs/eslint-config": "6.0.1",
40+
"@nuxtjs/eslint-config": "8.0.0",
3841
"@nuxtjs/eslint-module": "3.0.2",
3942
"@nuxtjs/tailwindcss": "4.2.1",
40-
"eslint": "7.32.0",
41-
"eslint-plugin-nuxt": "3.0.0",
42-
"eslint-plugin-vue": "7.20.0"
43+
"eslint": "8.3.0",
44+
"eslint-plugin-nuxt": "3.1.0",
45+
"eslint-plugin-vue": "8.1.1"
4346
}
4447
}

pages/index.vue

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
2-
<div class="grid grid-cols-1 lg:grid-cols-10">
3-
<div class="col-span-3 m-4">
2+
<div class="grid grid-cols-1 lg:grid-cols-10 xl:grid-cols-12">
3+
<div class="col-span-3 xl:col-span-3 m-4">
44
<div class="card">
55
<h3 class="text-xl font-bold mb-4">
66
<fa-icon icon="bell" />
@@ -12,16 +12,22 @@
1212
<div v-else class="announcement" v-html="announcement"></div>
1313
</div>
1414
</div>
15-
<div class="col-span-7 m-4 lg:ml-0">
15+
<div class="col-span-7 xl:col-span-9 m-4 lg:ml-0">
1616
<div class="card">
17-
<ul class="flex items-center mb-4">
18-
<li class="tab-title">
19-
所有仓库
20-
</li>
21-
<li class="tab-title">
22-
所有用户
23-
</li>
24-
</ul>
17+
<div v-if="repos === null" class="flex justify-center items-center">
18+
<div class="animate-spin rounded-full h-32 w-32 border-t-2 border-b-2 border-blue-500" />
19+
</div>
20+
<div v-else>
21+
<ul class="flex items-center mb-4">
22+
<li class="tab-title">
23+
所有仓库
24+
</li>
25+
<li class="tab-title">
26+
所有用户
27+
</li>
28+
</ul>
29+
<!--grid-js :cols="reposCols" :rows="listRepos" /-->
30+
</div>
2531
</div>
2632
</div>
2733
</div>
@@ -52,6 +58,7 @@ export default {
5258
sortable: true
5359
}
5460
],
61+
reposCols: ['项目名称', '用户', '分支', '最新构建状态'],
5562
reposFields: [
5663
{
5764
key: 'repo',
@@ -81,7 +88,7 @@ export default {
8188
const user = repoInfo.split('/')[0]
8289
const repo = repoInfo.split('/')[1].split(':')[0]
8390
const branch = repoInfo.split(':')[1]
84-
lRepos.push({ repo, user, branch })
91+
lRepos.push([repo, user, branch])
8592
}
8693
return lRepos
8794
},

0 commit comments

Comments
 (0)