Skip to content

Commit 58b53d3

Browse files
committed
machine-setup: move check all to basic info
1 parent 7a25c2b commit 58b53d3

File tree

4 files changed

+37
-32
lines changed

4 files changed

+37
-32
lines changed
Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,25 @@
11
<template>
2-
<n-config-provider :theme="osTheme === 'dark' ? darkTheme : undefined">
3-
<n-notification-provider>
4-
<provider />
5-
<n-grid x-gap="12" :cols="2">
6-
<n-gi>
7-
<basic-info />
8-
<heartbeat-info />
9-
<video-info />
10-
</n-gi>
11-
<n-gi>
12-
<system-info />
13-
<network-info />
14-
<n-card bordered shadow="always">
15-
<n-button type="primary" @click="checkAll" style="width: 100%;">完成设备检查</n-button>
16-
</n-card>
17-
</n-gi>
18-
</n-grid>
19-
</n-notification-provider>
20-
</n-config-provider>
2+
<n-config-provider :theme="osTheme === 'dark' ? darkTheme : undefined">
3+
<n-notification-provider>
4+
<provider />
5+
<n-grid x-gap="12" :cols="2">
6+
<n-gi>
7+
<basic-info />
8+
<heartbeat-info />
9+
<video-info />
10+
</n-gi>
11+
<n-gi>
12+
<system-info />
13+
<network-info />
14+
</n-gi>
15+
</n-grid>
16+
</n-notification-provider>
17+
</n-config-provider>
2118
</template>
2219

2320
<script setup lang="ts">
2421
import {
25-
NGrid, NGi, darkTheme, NConfigProvider, useOsTheme, NButton, NCard, NNotificationProvider,
22+
NGrid, NGi, darkTheme, NConfigProvider, useOsTheme, NNotificationProvider,
2623
} from 'naive-ui';
2724
import BasicInfo from './components/BasicInfo.vue';
2825
import HeartbeatInfo from './components/HeartbeatInfo.vue';
@@ -33,7 +30,4 @@ import Provider from './components/Provider.vue';
3330
3431
const osTheme = useOsTheme();
3532
36-
const checkAll = () => {
37-
console.log('check all');
38-
};
3933
</script>

packages/machine-setup/frontend/src/components/BasicInfo.vue

Lines changed: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<n-gi>
44
<n-card bordered shadow="always" style="margin-bottom: .25em;" class="text-center">
55
<h2 style="margin: .5em 0;">@Hydro/XCPC-TOOLS</h2>
6-
<h2 style="margin: .5em 0;">Setup Tool</h2>
6+
<h1 style="margin: .25em 0;">Setup Tool</h1>
77
</n-card>
88
<n-card bordered shadow="always">
99
<n-input placeholder="请输入座位号" v-model:value="editSeat" type="text" size="large" style="width: 100%; margin-bottom: .5em;" />
@@ -16,19 +16,27 @@
1616
</n-gi>
1717
</n-grid>
1818
</n-card>
19-
</n-gi>
20-
<n-gi>
19+
</n-gi>
20+
<n-gi>
21+
<n-card bordered shadow="always">
22+
<n-popconfirm @positive-click="checkAll">
23+
<template #trigger>
24+
<n-button type="primary" style="width: 100%;">完成设备检查</n-button>
25+
</template>
26+
确认完成设备检查?
27+
</n-popconfirm>
28+
</n-card>
2129
<n-card bordered shadow="always" class="text-center">
2230
<h1 style="margin: 0;">座位号</h1>
23-
<h1 style="font-size: 8em; margin: 0;">{{ nowSeat || '未配置' }}</h1>
31+
<h1 style="font-size: 5em; margin: 0;">{{ nowSeat || 'XX-XX' }}</h1>
2432
</n-card>
2533
</n-gi>
2634
</n-grid>
2735
</template>
2836

2937
<script setup lang="ts">
3038
import { filesystem, os } from '@neutralinojs/lib';
31-
import { NCard, NGrid, NGi, NButton, NInput } from 'naive-ui';
39+
import { NCard, NGrid, NGi, NButton, NInput, NPopconfirm } from 'naive-ui';
3240
import { onMounted, ref } from 'vue';
3341
3442
const nowSeat = ref('');
@@ -60,6 +68,9 @@ const showSeat = async () => {
6068
}
6169
};
6270
71+
const checkAll = () => {
72+
console.log('check all');
73+
};
6374
6475
onMounted(async () => {
6576
try {

packages/machine-setup/frontend/src/components/VideoInfo.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<n-card bordered shadow="always">
33
<n-tabs default-value="video" justify-content="space-evenly" type="line" animated>
4-
<n-tab-pane name="video" label="摄像头">
4+
<n-tab-pane name="video" tab="摄像头">
55
<n-grid x-gap="12" :cols="2">
66
<n-gi>
77
<p>摄像头服务:未启动</p>
@@ -21,7 +21,7 @@
2121
</n-gi>
2222
</n-grid>
2323
</n-tab-pane>
24-
<n-tab-pane name="desktop" label="桌面">
24+
<n-tab-pane name="desktop" tab="桌面">
2525
<n-grid x-gap="12" :cols="2">
2626
<n-gi>
2727
<p>屏幕捕获服务:未启动</p>

packages/machine-setup/frontend/src/main.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ import './style.css';
33
import { app, events, init } from '@neutralinojs/lib';
44
import {
55
create, NButton, NCard, NConfigProvider, NGi, NGrid, NNotificationProvider,
6-
NSpace, NStatistic, NTab, NTabPane, NTag,
6+
NPopconfirm, NSpace, NStatistic, NTab, NTabPane, NTag,
77
} from 'naive-ui';
88
import { createApp } from 'vue';
99
import App from './App.vue';
1010

1111
const naive = create({
12-
components: [NButton, NGrid, NGi, NCard, NStatistic, NSpace, NConfigProvider, NTab, NTabPane, NTag, NNotificationProvider],
12+
components: [NButton, NGrid, NGi, NCard, NStatistic, NSpace, NConfigProvider, NTab, NTabPane, NTag, NNotificationProvider, NPopconfirm],
1313
});
1414

1515
createApp(App).use(naive).mount('#app');

0 commit comments

Comments
 (0)