mirror of
https://hub.gitmirror.com/https://github.com/ExamAware/ExamShowboard-Legacy.git
synced 2025-04-29 03:36:34 +00:00
commit
d1e951d067
@ -86,7 +86,7 @@
|
||||
|
||||
### 开发进度
|
||||
|
||||
- 在`main`分支上保留原作者`0.1.0`版本;
|
||||
- 正在`main`分支上维护`1.1.0`版本。
|
||||
- 正在`dev`分支上开发`1.1-Malkuth`版本。
|
||||
|
||||
### Project Setup
|
||||
|
@ -5,6 +5,7 @@
|
||||
<template #append>
|
||||
<div class="ga-4">
|
||||
<v-btn @click="router.push('/mainWindow')">回到主页</v-btn>
|
||||
<v-btn @click="router.push('/about')">关于</v-btn>
|
||||
<v-icon icon="mdi-window-close" @click="ipcHandleExit"></v-icon>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -73,6 +73,7 @@ const headers = [
|
||||
|
||||
const formatTime = (isoString: string) => {
|
||||
const date = new Date(isoString);
|
||||
date.setSeconds(date.getSeconds() + 1); // 加1秒
|
||||
return `${date.getHours().toString().padStart(2, '0')}:${date.getMinutes().toString().padStart(2, '0')}`;
|
||||
};
|
||||
|
||||
|
@ -11,6 +11,7 @@
|
||||
考试状态: <span :class="statusColor">{{ statusText }}</span>
|
||||
</div>
|
||||
<div v-if="isWarning" class="text-h5 text--warning">考试即将结束</div>
|
||||
<div v-if="showRemainingTime" class="text-h5 text--info">剩余时间: {{ remainingTime }}</div>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
|
||||
@ -69,6 +70,27 @@ const isWarning = computed(() => {
|
||||
return now.value >= fifteenMinutesBeforeEnd && now.value < end;
|
||||
});
|
||||
|
||||
const showRemainingTime = computed(() => {
|
||||
if (!props.exam) return false;
|
||||
|
||||
const start = new Date(props.exam.start);
|
||||
const end = new Date(props.exam.end);
|
||||
const fifteenMinutesBeforeStart = new Date(start.getTime() - 15 * 60 * 1000);
|
||||
|
||||
return now.value >= fifteenMinutesBeforeStart && now.value < end;
|
||||
});
|
||||
|
||||
const remainingTime = computed(() => {
|
||||
if (!props.exam) return '';
|
||||
|
||||
const end = new Date(props.exam.end);
|
||||
const timeDiff = end.getTime() - now.value.getTime();
|
||||
const minutes = Math.floor(timeDiff / (1000 * 60));
|
||||
const seconds = Math.floor((timeDiff % (1000 * 60)) / 1000);
|
||||
|
||||
return `${minutes}分${seconds}秒`;
|
||||
});
|
||||
|
||||
// Update the current time every second
|
||||
const updateNow = () => {
|
||||
now.value = new Date();
|
||||
@ -86,6 +108,10 @@ updateNow();
|
||||
color: #ffc107 !important; /* Vuetify's default warning color */
|
||||
}
|
||||
|
||||
.text--info {
|
||||
color: #17a2b8 !important; /* Info color */
|
||||
}
|
||||
|
||||
.status-before {
|
||||
color: orange;
|
||||
}
|
||||
|
47
src/renderer/src/pages/about.vue
Normal file
47
src/renderer/src/pages/about.vue
Normal file
@ -0,0 +1,47 @@
|
||||
<template>
|
||||
<v-container class="main-container" fill-height>
|
||||
<v-row justify="center" align="center">
|
||||
<v-col cols="12" md="8">
|
||||
<v-card class="pa-4" outlined>
|
||||
<v-card-title class="text-h4">关于考试展板</v-card-title>
|
||||
<v-card-text>
|
||||
<p>
|
||||
欢迎来到考试展板应用程序。这是一个用于展示考试信息的工具,帮助考生更好地了解考试安排和状态。
|
||||
</p>
|
||||
<p>本应用程序旨在为考生提供便捷的考试信息查看体验。</p>
|
||||
<p>版本号: 1.1.0-Malkuth</p>
|
||||
<p>开发者:Hello8963 & Mkstoler4096</p>
|
||||
<v-btn
|
||||
href="https://github.com/MKStoler4096/dsz-exam-showboard-next"
|
||||
target="_blank"
|
||||
color="primary"
|
||||
class="mt-4"
|
||||
>
|
||||
在 GitHub 上查看源代码
|
||||
</v-btn>
|
||||
</v-card-text>
|
||||
</v-card>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</v-container>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.main-container {
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.v-card {
|
||||
width: 100%;
|
||||
max-width: 600px;
|
||||
margin: auto;
|
||||
transition: transform 0.3s ease-in-out;
|
||||
}
|
||||
.v-card:hover {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
.v-btn {
|
||||
height: 48px;
|
||||
}
|
||||
</style>
|
@ -1,19 +0,0 @@
|
||||
<template>
|
||||
<div>
|
||||
<h1>测试页面</h1>
|
||||
<ExamStatus
|
||||
:exam="{
|
||||
name: '语文',
|
||||
start: '2024-07-25T08:54:52.717Z',
|
||||
end: '2024-07-25T08:55:40.428Z'
|
||||
}"
|
||||
/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { useRouter } from 'vue-router';
|
||||
|
||||
const router = useRouter();
|
||||
//
|
||||
</script>
|
@ -4,7 +4,7 @@ import { defineStore } from 'pinia';
|
||||
export const useProfileStore = defineStore('app', {
|
||||
state: () => ({
|
||||
examName: '考试名称',
|
||||
appHeader: 'DSZ考试看板',
|
||||
appHeader: '考试看板',
|
||||
message: '考试提醒信息',
|
||||
examInfos: []
|
||||
}),
|
||||
|
2
src/renderer/src/typed-router.d.ts
vendored
2
src/renderer/src/typed-router.d.ts
vendored
@ -19,8 +19,8 @@ declare module 'vue-router/auto-routes' {
|
||||
*/
|
||||
export interface RouteNamedMap {
|
||||
'/': RouteRecordInfo<'/', '/', Record<never, never>, Record<never, never>>,
|
||||
'/about': RouteRecordInfo<'/about', '/about', Record<never, never>, Record<never, never>>,
|
||||
'/infoPage': RouteRecordInfo<'/infoPage', '/infoPage', Record<never, never>, Record<never, never>>,
|
||||
'/mainWindow': RouteRecordInfo<'/mainWindow', '/mainWindow', Record<never, never>, Record<never, never>>,
|
||||
'/testComponents': RouteRecordInfo<'/testComponents', '/testComponents', Record<never, never>, Record<never, never>>,
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user