mirror of
https://github.com/MHSanaei/3x-ui.git
synced 2025-09-09 11:46:18 +00:00
[ui] improve index code
This commit is contained in:
parent
c382420b6e
commit
e06ee26711
2 changed files with 11 additions and 12 deletions
|
@ -104,15 +104,14 @@
|
||||||
<a-col :sm="24" :lg="12">
|
<a-col :sm="24" :lg="12">
|
||||||
<a-card hoverable>
|
<a-card hoverable>
|
||||||
<b>{{ i18n "pages.index.operationHours" }}:</b>
|
<b>{{ i18n "pages.index.operationHours" }}:</b>
|
||||||
<a-tag color="green">Xray [[ formatSecond(status.appStats.uptime) ]]</a-tag>
|
<a-tag :color="status.xray.color">Xray: [[ formatSecond(status.appStats.uptime) ]]</a-tag>
|
||||||
<a-tag color="green">OS [[ formatSecond(status.uptime) ]]</a-tag>
|
<a-tag color="green">OS: [[ formatSecond(status.uptime) ]]</a-tag>
|
||||||
</a-card>
|
</a-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col :sm="24" :lg="12">
|
<a-col :sm="24" :lg="12">
|
||||||
<a-card hoverable>
|
<a-card hoverable>
|
||||||
<b>{{ i18n "pages.index.xrayStatus" }}:</b>
|
<b>{{ i18n "pages.index.xrayStatus" }}:</b>
|
||||||
<a-tag style="text-transform: capitalize;" :color="status.xray.color">[[ status.xray.state ]]
|
<a-tag :color="status.xray.color">[[ status.xray.state ]]</a-tag>
|
||||||
</a-tag>
|
|
||||||
<a-popover v-if="status.xray.state === State.Error"
|
<a-popover v-if="status.xray.state === State.Error"
|
||||||
:overlay-class-name="themeSwitcher.currentTheme">
|
:overlay-class-name="themeSwitcher.currentTheme">
|
||||||
<span slot="title" style="font-size: 12pt">An error occurred while running Xray
|
<span slot="title" style="font-size: 12pt">An error occurred while running Xray
|
||||||
|
@ -153,10 +152,10 @@
|
||||||
<a-card hoverable>
|
<a-card hoverable>
|
||||||
<b>{{ i18n "usage"}}:</b>
|
<b>{{ i18n "usage"}}:</b>
|
||||||
<a-tag color="green">
|
<a-tag color="green">
|
||||||
RAM [[ sizeFormat(status.appStats.mem) ]]
|
RAM: [[ sizeFormat(status.appStats.mem) ]]
|
||||||
</a-tag>
|
</a-tag>
|
||||||
<a-tag color="green">
|
<a-tag color="green">
|
||||||
Threads [[ status.appStats.threads ]]
|
Threads: [[ status.appStats.threads ]]
|
||||||
</a-tag>
|
</a-tag>
|
||||||
</a-card>
|
</a-card>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
@ -357,9 +356,9 @@
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
const State = {
|
const State = {
|
||||||
Running: "running",
|
Running: "Running",
|
||||||
Stop: "stop",
|
Stop: "Stop",
|
||||||
Error: "error",
|
Error: "Error",
|
||||||
}
|
}
|
||||||
Object.freeze(State);
|
Object.freeze(State);
|
||||||
|
|
||||||
|
|
|
@ -34,9 +34,9 @@ import (
|
||||||
type ProcessState string
|
type ProcessState string
|
||||||
|
|
||||||
const (
|
const (
|
||||||
Running ProcessState = "running"
|
Running ProcessState = "Running"
|
||||||
Stop ProcessState = "stop"
|
Stop ProcessState = "Stop"
|
||||||
Error ProcessState = "error"
|
Error ProcessState = "Error"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Status struct {
|
type Status struct {
|
||||||
|
|
Loading…
Reference in a new issue