chore: 说法订正

This commit is contained in:
MKStoler 2024-12-02 18:32:53 +08:00
parent 946a8108f1
commit 1b22ff94c6
7 changed files with 49 additions and 43 deletions

View File

@ -1,17 +1,17 @@
on:
push:
branches:
- master
push:
branches:
- master
jobs:
contrib-readme-job:
runs-on: ubuntu-latest
name: A job to automate contrib in readme
permissions:
contents: write
pull-requests: write
steps:
- name: Contribute List
uses: akhilmhdh/contributors-readme-action@v2.3.10
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
contrib-readme-job:
runs-on: ubuntu-latest
name: A job to automate contrib in readme
permissions:
contents: write
pull-requests: write
steps:
- name: Contribute List
uses: akhilmhdh/contributors-readme-action@v2.3.10
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -24,12 +24,11 @@
一款显示当前时间与考试详细信息的看板类软件
| 下载 | [Releases](https://github.com/ProjectCampus-CH/dsz-exam-showboard-next/releases) | [Actions](https://github.com/ProjectCampus-CH/dsz-exam-showboard-next/actions) |
| - | - | - |
| ---- | -------------------------------------------------------------------------------- | ------------------------------------------------------------------------------ |
</div>
> [!tip]
> **本软件使用 `Vue` + `TypeScript` + `JavaScript` 制作,使用 `Node.js` + `Electron` 完善系统级功能并打包。**
> [!tip] > **本软件使用 `Vue` + `TypeScript` + `JavaScript` 制作,使用 `Node.js` + `Electron` 完善系统级功能并打包。**
## 功能
@ -87,9 +86,9 @@
>
> 可以在 `Raw 文件` 前加上镜像源,如
>
>```
>https://github.moeyy.xyz/https://raw.githubusercontent.com/{owner}/{repo}/refs/heads/main/exam_config.json
>```
> ```
> https://github.moeyy.xyz/https://raw.githubusercontent.com/{owner}/{repo}/refs/heads/main/exam_config.json
> ```
- 点击`请求配置`加载配置文件并进入看板(下次可直接点击`直接进入看板`加载上次配置文件)
@ -114,7 +113,6 @@
>
> **必须使用 Yarn 包管理。Node 版本要求为20。**
### 工程构建
#### 配置
@ -202,7 +200,6 @@ $ yarn build:linux
## Stars 历史
<div align="center">
[![Star 历史](https://starchart.cc/ProjectCampus-CH/dsz-exam-showboard-next.svg?variant=adaptive)](https://starchart.cc/ProjectCampus-CH/dsz-exam-showboard-next/stargazers)

View File

@ -14,7 +14,7 @@
<template #item="{ item }">
<tr :style="{ lineHeight: item.name.includes('/') ? '2.5rem' : '2.0rem' }">
<td v-if="item.showDate" class="text-h5 date-column" :rowspan="item.rowspan">
{{ item.date }}<br>{{ item.period }}
{{ item.date }}<br />{{ item.period }}
</td>
<td class="text-h5 subject-column">
<div v-if="item.name.includes('/')">
@ -80,9 +80,10 @@ const groupedExams = computed(() => {
let currentDate = '';
let currentPeriod = '';
sortedExams.value.forEach((exam, index) => {
const examDate = new Date(exam.start)
.toLocaleDateString('zh-CN', { month: 'numeric', day: 'numeric' })
.replace('/', '月') + '日';
const examDate =
new Date(exam.start)
.toLocaleDateString('zh-CN', { month: 'numeric', day: 'numeric' })
.replace('/', '月') + '日';
const period = formatPeriod(exam.start);
const showDate = examDate !== currentDate || period !== currentPeriod;
if (showDate) {
@ -92,8 +93,9 @@ const groupedExams = computed(() => {
(e) =>
new Date(e.start)
.toLocaleDateString('zh-CN', { month: 'numeric', day: 'numeric' })
.replace('/', '月') + '日' === currentDate &&
formatPeriod(e.start) === currentPeriod
.replace('/', '月') +
'日' ===
currentDate && formatPeriod(e.start) === currentPeriod
).length;
grouped.push({ ...exam, date: examDate, period, showDate, rowspan });
} else {

View File

@ -10,9 +10,11 @@
<div class="text-h5 line-item">
考试状态: <span :class="statusColor">{{ statusText }}</span>
</div>
<div v-if="showCountdown" class="text-h5 text--info line-item">开考倒计时: {{ countdown }}</div>
<div v-if="showCountdown" class="text-h5 text--info line-item">
开考倒计时: {{ countdown }}
</div>
<div v-if="showRemainingTime" :class="['text-h5', remainingTimeColorClass, 'line-item']">
考试剩余时间: {{ remainingTime }}
剩余时间: {{ remainingTime }}
</div>
</v-card-text>
</v-card>
@ -53,7 +55,7 @@ const statusColor = computed(() => {
});
const statusText = computed(() => {
if (!props.exam) return '考试已结束';
if (!props.exam) return '全部考试已结束';
const start = new Date(props.exam.start);
const end = new Date(props.exam.end);
@ -110,7 +112,9 @@ const remainingTimeColorClass = computed(() => {
const end = new Date(props.exam.end);
const fifteenMinutesBeforeEnd = new Date(end.getTime() - 15 * 60 * 1000);
return now.value >= fifteenMinutesBeforeEnd && now.value < end ? 'text--warning' : 'text--default';
return now.value >= fifteenMinutesBeforeEnd && now.value < end
? 'text--warning'
: 'text--default';
});
// Update the current time every second

View File

@ -11,9 +11,13 @@
<p class="text-lg">本软件旨在为考生提供便捷的考试信息查看体验</p>
<p class="text-lg developer">
开发者
<a href="https://github.com/hello8693DSZ" target="_blank" class="developer-name">Hello8963</a>
<a href="https://github.com/hello8693DSZ" target="_blank" class="developer-name"
>Hello8963</a
>
<span> </span>
<a href="https://github.com/MKStoler4096" target="_blank" class="developer-name">Mkstoler4096</a>
<a href="https://github.com/MKStoler4096" target="_blank" class="developer-name"
>Mkstoler4096</a
>
</p>
<v-btn
href="https://github.com/ProjectCampus-CH/dsz-exam-showboard-next"

View File

@ -78,7 +78,7 @@ onUnmounted(() => {
}
.medium-title {
font-size: 2.0em;
font-size: 2em;
color: gray;
text-align: left;
}
@ -87,5 +87,4 @@ onUnmounted(() => {
font-size: 3em;
text-align: right;
}
</style>