Compare commits
5
Commits
v0.9.5
..
68aabbb361
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
68aabbb361 | ||
|
|
6e841b12f5 | ||
|
|
7f227fcf05 | ||
|
|
a34a646c71 | ||
|
|
4a0ce08338 |
+3
-2
@@ -1,12 +1,13 @@
|
||||
{
|
||||
"name": "frontend",
|
||||
"version": "0.9.5",
|
||||
"version": "0.9.6",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview"
|
||||
"preview": "vite preview",
|
||||
"postbuild": "scp -r dist/. root@uvpn.shop:/opt/uvpn.shop/frontend"
|
||||
},
|
||||
"dependencies": {
|
||||
"@lucide/vue": "^1.16.0",
|
||||
|
||||
@@ -1,17 +1,19 @@
|
||||
<template>
|
||||
<section class="px-6 py-20 md:px-12 max-w-7xl mx-auto">
|
||||
<div class="flex items-center justify-between mb-10 flex-wrap gap-4">
|
||||
<h2 class="text-3xl md:text-4xl font-bold">
|
||||
<div class="mb-10">
|
||||
<h2 class="text-3xl md:text-4xl font-bold text-center mb-14">
|
||||
Статус серверов
|
||||
</h2>
|
||||
<button
|
||||
@click="refreshData"
|
||||
:disabled="loading"
|
||||
class="px-5 py-2.5 bg-blue-600 hover:bg-blue-700 text-white rounded-xl text-sm font-medium transition disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2"
|
||||
>
|
||||
<RefreshCw :size="16" :class="{ 'animate-spin': loading }" />
|
||||
{{ loading ? 'Обновление...' : 'Обновить пинг' }}
|
||||
</button>
|
||||
<div class="flex justify-center mt-6">
|
||||
<button
|
||||
@click="refreshData"
|
||||
:disabled="loading"
|
||||
class="px-5 py-2.5 bg-blue-600 hover:bg-blue-700 text-white rounded-xl text-sm font-medium transition disabled:opacity-50 disabled:cursor-not-allowed flex items-center gap-2 cursor-pointer"
|
||||
>
|
||||
<RefreshCw :size="16" :class="{ 'animate-spin': loading }" />
|
||||
{{ loading ? 'Обновление...' : 'Обновить пинг' }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div v-if="loading && !hosts.length" class="flex justify-center py-12">
|
||||
@@ -24,7 +26,7 @@
|
||||
<div
|
||||
v-for="host in sortedHosts"
|
||||
:key="host.address"
|
||||
class="flex items-center justify-between bg-white dark:bg-gray-900 rounded-xl px-4 py-2.5 border transition hover:shadow-md"
|
||||
class="flex items-center justify-between bg-white dark:bg-gray-900 rounded-xl px-4 py-2.5 border"
|
||||
:class="host.isOnline ? 'border-green-500/30' : 'border-red-500/30 opacity-60'"
|
||||
>
|
||||
<div class="flex items-center gap-3">
|
||||
@@ -36,13 +38,13 @@
|
||||
<span class="font-semibold text-gray-800 dark:text-white">{{ host.name }}</span>
|
||||
|
||||
<!-- Индикатор состояния (вместо online/offline) -->
|
||||
<span class="relative flex h-3 w-3">
|
||||
<span class="relative flex h-2 w-2">
|
||||
<span
|
||||
class="animate-ping absolute inline-flex h-full w-full rounded-full opacity-75"
|
||||
:class="host.isOnline ? 'bg-green-500' : 'bg-red-500'"
|
||||
></span>
|
||||
<span
|
||||
class="relative inline-flex rounded-full h-3 w-3"
|
||||
class="relative inline-flex rounded-full h-2 w-2"
|
||||
:class="host.isOnline ? 'bg-green-600' : 'bg-red-600'"
|
||||
></span>
|
||||
</span>
|
||||
@@ -59,7 +61,7 @@
|
||||
}"
|
||||
>
|
||||
<Wifi :size="14" />
|
||||
{{ host.ping }}ms
|
||||
{{ host.ping }} ms
|
||||
</span>
|
||||
<span v-else class="text-gray-300 font-mono">—</span>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user