fix status
This commit is contained in:
@@ -8,15 +8,24 @@
|
||||
|
||||
<div class="min-h-screen bg-gray-900 text-white">
|
||||
<header class="bg-gray-800 shadow-md">
|
||||
<div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-4 flex justify-between items-center">
|
||||
<div class="mx-auto flex max-w-7xl items-center justify-between px-4 py-4 sm:px-6 lg:px-8">
|
||||
<h1 class="text-2xl font-bold">ACC Server Manager</h1>
|
||||
<div class="flex items-center space-x-4">
|
||||
<a href="/logout">
|
||||
<button
|
||||
class="text-gray-300 hover:text-white flex items-center"
|
||||
<button class="flex items-center text-gray-300 hover:text-white">
|
||||
<svg
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
class="h-6 w-6"
|
||||
fill="none"
|
||||
viewBox="0 0 24 24"
|
||||
stroke="currentColor"
|
||||
>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="h-6 w-6" fill="none" viewBox="0 0 24 24" stroke="currentColor">
|
||||
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1" />
|
||||
<path
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
stroke-width="2"
|
||||
d="M17 16l4-4m0 0l-4-4m4 4H7m6 4v1a3 3 0 01-3 3H6a3 3 0 01-3-3V7a3 3 0 013-3h4a3 3 0 013 3v1"
|
||||
/>
|
||||
</svg>
|
||||
<span class="ml-1 hidden sm:inline">Logout</span>
|
||||
</button>
|
||||
@@ -25,17 +34,22 @@
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-8">
|
||||
<div class="flex justify-between items-center mb-6">
|
||||
<main class="mx-auto max-w-7xl px-4 py-8 sm:px-6 lg:px-8">
|
||||
<div class="mb-6 flex items-center justify-between">
|
||||
<h2 class="text-xl font-semibold">Your Servers</h2>
|
||||
<div class="flex space-x-2">
|
||||
<a href="/dashboard" class="px-3 py-1 bg-gray-700 hover:bg-gray-600 rounded-md text-sm">
|
||||
<button
|
||||
onclick={() => {
|
||||
window.location.reload();
|
||||
}}
|
||||
class="rounded-md bg-gray-700 px-3 py-1 text-sm hover:bg-gray-600"
|
||||
>
|
||||
Refresh
|
||||
</a>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
|
||||
<div class="grid grid-cols-1 gap-6 md:grid-cols-2 lg:grid-cols-3">
|
||||
{#each servers as server}
|
||||
<ServerCard {server} />
|
||||
{/each}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
import EditorEvent from '$components/EditorEvent.svelte';
|
||||
import EditorEventRules from '$components/EditorEventRules.svelte';
|
||||
import EditorSettings from '$components/EditorSettings.svelte';
|
||||
import { getStatusColor } from '$lib/types/serviceStatus.js';
|
||||
import { getStatusColor, serviceStatusToString } from '$lib/types/serviceStatus.js';
|
||||
import { configFile } from '$models/config.js';
|
||||
|
||||
let { data } = $props();
|
||||
@@ -28,9 +28,8 @@
|
||||
<h2 class="truncate text-lg font-semibold">{server.name}</h2>
|
||||
</a>
|
||||
<div class="mt-1 flex items-center">
|
||||
<span class={`inline-block h-2 w-2 rounded-full ${getStatusColor(server.status)} mr-2`}
|
||||
></span>
|
||||
<span class="text-sm capitalize">{server.status}</span>
|
||||
<span class={`inline-block h-2 w-2 rounded-full ${getStatusColor(server.status)} mr-2`} />
|
||||
<span class="text-sm capitalize">{serviceStatusToString(server.status)}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user