Skip to content

Commit 00d8347

Browse files
committed
machine-setup: use components
1 parent 311515a commit 00d8347

File tree

3 files changed

+47
-116
lines changed

3 files changed

+47
-116
lines changed
Lines changed: 27 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -1,80 +1,28 @@
11
<template>
2-
<n-config-provider :theme="osTheme === 'dark' ? darkTheme : undefined">
3-
<n-grid x-gap="12" :cols="2">
4-
<n-gi>
5-
<n-card bordered shadow="always" title="@Hydro/XCPC-TOOLS Setup Tool">
6-
<n-statistic title="座位号" value="未配置" style="text-align: center; font-size: 8em;" />
7-
</n-card>
8-
<n-card bordered shadow="always">
9-
<n-input placeholder="请输入座位号" type="text" size="large" style="width: 100%; margin-bottom: .5em;" />
10-
<n-space style="width: 100%;">
11-
<n-button type="primary" style="width: 100%;">保存</n-button>
12-
<n-button type="info" style="width: 100%;">放大显示</n-button>
13-
</n-space>
14-
</n-card>
15-
<n-card bordered shadow="always" title="Stream Info">
16-
<p>摄像头服务: 未配置</p>
17-
<n-space style="width: 100%;">
18-
<n-button type="primary" style="width: 100%;">启动</n-button>
19-
<n-button type="info" style="width: 100%;">测试</n-button>
20-
</n-space>
21-
<p>麦克风服务: 未配置</p>
22-
<n-space style="width: 100%;">
23-
<n-button type="primary" style="width: 100%;">启动</n-button>
24-
<n-button type="info" style="width: 100%;">测试</n-button>
25-
</n-space>
26-
</n-card>
27-
</n-gi>
28-
<n-gi>
29-
<n-card bordered title="Machine Info" shadow="always">
30-
<n-grid x-gap="12" :cols="2">
31-
<n-gi>
32-
<p>CPU: Unknown</p>
33-
<p>Mem: Unknown</p>
34-
<p>OS: Unknown</p>
35-
<p>Image Version: Unknown</p>
36-
<p>Displays: Unknown</p>
37-
</n-gi>
38-
<n-gi>
39-
<p>gcc: Unknown</p>
40-
<p>g++: Unknown</p>
41-
<p>java: Unknown</p>
42-
<p>kotlin: Unknown</p>
43-
<p>python3: Unknown</p>
44-
<p>pypy3: Unknown</p>
45-
</n-gi>
46-
</n-grid>
47-
</n-card>
48-
<n-card bordered title="Network Info" shadow="always">
49-
<p>IP: Unknown</p>
50-
<p>Mac: Unknown</p>
51-
<p>Interface: Unknown</p>
52-
</n-card>
53-
</n-gi>
54-
</n-grid>
55-
</n-config-provider>
56-
</template>
57-
58-
<script setup lang="ts">
59-
import {
60-
NGrid, NGi, darkTheme, NConfigProvider, useOsTheme, NButton, NCard, NStatistic,
61-
} from 'naive-ui';
62-
63-
const osTheme = useOsTheme();
64-
</script>
65-
66-
<style scoped>
67-
68-
.logo {
69-
height: 6em;
70-
padding: 1.5em;
71-
will-change: filter;
72-
transition: filter 300ms;
73-
}
74-
.logo:hover {
75-
filter: drop-shadow(0 0 2em #646cffaa);
76-
}
77-
.logo.vue:hover {
78-
filter: drop-shadow(0 0 2em #42b883aa);
79-
}
80-
</style>
2+
<n-config-provider :theme="osTheme === 'dark' ? darkTheme : undefined">
3+
<n-grid x-gap="12" :cols="2">
4+
<n-gi>
5+
<basic-info />
6+
<connect-server />
7+
<video-info />
8+
</n-gi>
9+
<n-gi>
10+
<system-info />
11+
<network-info />
12+
</n-gi>
13+
</n-grid>
14+
</n-config-provider>
15+
</template>
16+
17+
<script setup lang="ts">
18+
import {
19+
NGrid, NGi, darkTheme, NConfigProvider, useOsTheme,
20+
} from 'naive-ui';
21+
import BasicInfo from './components/BasicInfo.vue';
22+
import ConnectServer from './components/HeartbeatInfo.vue';
23+
import SystemInfo from './components/SystemInfo.vue';
24+
import NetworkInfo from './components/NetworkInfo.vue';
25+
import VideoInfo from './components/VideoInfo.vue';
26+
27+
const osTheme = useOsTheme();
28+
</script>
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<template>
2+
<n-card bordered shadow="always" title="@Hydro/XCPC-TOOLS Setup Tool">
3+
<n-statistic title="座位号" value="未配置" style="text-align: center; font-size: 8em;" />
4+
</n-card>
5+
<n-card bordered shadow="always">
6+
<n-input placeholder="请输入座位号" type="text" size="large" style="width: 100%; margin-bottom: .5em;" />
7+
<n-space style="width: 100%;">
8+
<n-button type="primary" style="width: 100%;">保存</n-button>
9+
<n-button type="info" style="width: 100%;">放大显示</n-button>
10+
</n-space>
11+
</n-card>
12+
</template>
13+
14+
<script setup lang="ts">
15+
import { NCard, NButton, NInput } from 'naive-ui';
16+
</script>

packages/machine-setup/neutralino.config.json

Lines changed: 4 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://raw.githubusercontent.com/neutralinojs/neutralinojs/main/schemas/neutralino.config.schema.json",
3-
"applicationId": "org.hydro.xcpctools.setupapp",
3+
"applicationId": "org.hydro.xcpctools.machinesetup",
44
"version": "1.0.0",
55
"defaultMode": "window",
66
"port": 0,
@@ -16,20 +16,10 @@
1616
"nativeAllowList": [
1717
"app.*",
1818
"os.*",
19+
"computer.*",
20+
"filesystem.*",
1921
"debug.log"
2022
],
21-
"globalVariables": {
22-
"TEST1": "Hello",
23-
"TEST2": [
24-
2,
25-
4,
26-
5
27-
],
28-
"TEST3": {
29-
"value1": 10,
30-
"value2": {}
31-
}
32-
},
3323
"modes": {
3424
"window": {
3525
"title": "@hydro/xcpc-tools/machine-setup",
@@ -47,33 +37,10 @@
4737
"hidden": false,
4838
"resizable": true,
4939
"exitProcessOnClose": false
50-
},
51-
"browser": {
52-
"globalVariables": {
53-
"TEST": "Test value browser"
54-
},
55-
"nativeBlockList": [
56-
"filesystem.*"
57-
]
58-
},
59-
"cloud": {
60-
"url": "/resources/#cloud",
61-
"nativeAllowList": [
62-
"app.*"
63-
]
64-
},
65-
"chrome": {
66-
"width": 1280,
67-
"height": 720,
68-
"args": "--user-agent=\"Neutralinojs chrome mode\"",
69-
"nativeBlockList": [
70-
"filesystem.*",
71-
"os.*"
72-
]
7340
}
7441
},
7542
"cli": {
76-
"binaryName": "myapp",
43+
"binaryName": "hydro-xcpctools-machine-setup",
7744
"resourcesPath": "/frontend/",
7845
"extensionsPath": "/extensions/",
7946
"binaryVersion": "5.0.0",

0 commit comments

Comments
 (0)