mirror of
https://github.com/hamster1963/nezha-dash.git
synced 2025-04-24 21:10:45 +08:00
feat: loading text
This commit is contained in:
parent
2a44cc7afb
commit
4c7ffb509c
@ -4,6 +4,7 @@ import { useServerData } from "@/app/lib/server-data-context"
|
||||
import ServerCard from "@/components/ServerCard"
|
||||
import ServerCardInline from "@/components/ServerCardInline"
|
||||
import Switch from "@/components/Switch"
|
||||
import { Loader } from "@/components/loading/Loader"
|
||||
import getEnv from "@/lib/env-entry"
|
||||
import { useFilter } from "@/lib/network-filter-context"
|
||||
import { useStatus } from "@/lib/status-context"
|
||||
@ -79,7 +80,15 @@ export default function ServerListClient() {
|
||||
</div>
|
||||
)
|
||||
|
||||
if (!data?.result) return null
|
||||
if (!data?.result)
|
||||
return (
|
||||
<div className="flex flex-col items-center min-h-96 justify-center ">
|
||||
<div className="font-semibold flex items-center gap-2 text-sm">
|
||||
<Loader visible={true} />
|
||||
{t("connecting")}...
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
const { result } = data
|
||||
const sortedServers = result.sort((a, b) => {
|
||||
|
@ -11,7 +11,8 @@
|
||||
},
|
||||
"ServerListClient": {
|
||||
"error_message": "Please check your environment variables and review the server console",
|
||||
"defaultTag": "All"
|
||||
"defaultTag": "All",
|
||||
"connecting": "Connecting"
|
||||
},
|
||||
"ServerCard": {
|
||||
"System": "System",
|
||||
|
@ -11,7 +11,8 @@
|
||||
},
|
||||
"ServerListClient": {
|
||||
"error_message": "環境変数を確認し、サーバーコンソールを確認してください",
|
||||
"defaultTag": "すべて"
|
||||
"defaultTag": "すべて",
|
||||
"connecting": "接続中"
|
||||
},
|
||||
"ServerCard": {
|
||||
"System": "システム",
|
||||
|
@ -11,7 +11,8 @@
|
||||
},
|
||||
"ServerListClient": {
|
||||
"error_message": "請檢查您的環境變數並檢查伺服器控制台",
|
||||
"defaultTag": "全部"
|
||||
"defaultTag": "全部",
|
||||
"connecting": "連接中"
|
||||
},
|
||||
"ServerCard": {
|
||||
"System": "系統",
|
||||
|
@ -11,7 +11,8 @@
|
||||
},
|
||||
"ServerListClient": {
|
||||
"error_message": "请检查您的环境变量并检查服务器控制台",
|
||||
"defaultTag": "全部"
|
||||
"defaultTag": "全部",
|
||||
"connecting": "连接中"
|
||||
},
|
||||
"ServerCard": {
|
||||
"System": "系统",
|
||||
|
Loading…
Reference in New Issue
Block a user