Page restyling
This commit is contained in:
@@ -61,6 +61,8 @@ func (a *Agent) knowledgeBaseLookup() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (a *Agent) saveCurrentConversationInMemory() {
|
func (a *Agent) saveCurrentConversationInMemory() {
|
||||||
|
|
||||||
|
|
||||||
if !a.options.enableLongTermMemory && !a.options.enableSummaryMemory {
|
if !a.options.enableLongTermMemory && !a.options.enableSummaryMemory {
|
||||||
xlog.Debug("Long term memory is disabled", "agent", a.Character.Name)
|
xlog.Debug("Long term memory is disabled", "agent", a.Character.Name)
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -5,79 +5,6 @@
|
|||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>Agent List</title>
|
<title>Agent List</title>
|
||||||
{{template "views/partials/header"}}
|
{{template "views/partials/header"}}
|
||||||
<style>
|
|
||||||
.button-container {
|
|
||||||
display: flex;
|
|
||||||
justify-content: flex-end;
|
|
||||||
margin-bottom: 8px;
|
|
||||||
}
|
|
||||||
.section-box {
|
|
||||||
background-color: rgba(30, 41, 59, 0.8);
|
|
||||||
border-radius: 8px;
|
|
||||||
padding: 20px;
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
.alert {
|
|
||||||
padding: 10px 15px;
|
|
||||||
border-radius: 4px;
|
|
||||||
margin: 10px 0;
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
.alert-success {
|
|
||||||
background-color: rgba(16, 185, 129, 0.2);
|
|
||||||
border: 1px solid #10b981;
|
|
||||||
color: #10b981;
|
|
||||||
}
|
|
||||||
.alert-error {
|
|
||||||
background-color: rgba(239, 68, 68, 0.2);
|
|
||||||
border: 1px solid #ef4444;
|
|
||||||
color: #ef4444;
|
|
||||||
}
|
|
||||||
.toast {
|
|
||||||
position: fixed;
|
|
||||||
top: 20px;
|
|
||||||
right: 20px;
|
|
||||||
max-width: 350px;
|
|
||||||
padding: 15px;
|
|
||||||
border-radius: 5px;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
|
|
||||||
z-index: 1000;
|
|
||||||
opacity: 0;
|
|
||||||
transition: opacity 0.3s ease;
|
|
||||||
}
|
|
||||||
.toast-success {
|
|
||||||
background-color: #10b981;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
.toast-error {
|
|
||||||
background-color: #ef4444;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
.toast-visible {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
.action-btn {
|
|
||||||
background-color: #374151;
|
|
||||||
color: white;
|
|
||||||
border: none;
|
|
||||||
padding: 6px 12px;
|
|
||||||
border-radius: 4px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: background-color 0.3s;
|
|
||||||
}
|
|
||||||
.start-btn {
|
|
||||||
background-color: #10b981;
|
|
||||||
}
|
|
||||||
.start-btn:hover {
|
|
||||||
background-color: #059669;
|
|
||||||
}
|
|
||||||
.pause-btn {
|
|
||||||
background-color: #f59e0b;
|
|
||||||
}
|
|
||||||
.pause-btn:hover {
|
|
||||||
background-color: #d97706;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-gray-900 p-4 text-white font-sans">
|
<body class="bg-gray-900 p-4 text-white font-sans">
|
||||||
{{template "views/partials/menu"}}
|
{{template "views/partials/menu"}}
|
||||||
@@ -88,109 +15,30 @@
|
|||||||
|
|
||||||
<div class="max-w-6xl mx-auto">
|
<div class="max-w-6xl mx-auto">
|
||||||
<header class="text-center mb-8">
|
<header class="text-center mb-8">
|
||||||
<h1 class="text-3xl md:text-5xl font-bold">Smart Agent List</h1>
|
<h1 class="text-4xl md:text-6xl font-bold text-primary">Smart Agent List</h1>
|
||||||
</header>
|
</header>
|
||||||
<div class="button-container">
|
<div class="button-container justify-center mb-6">
|
||||||
<a href="/create" class="bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded transition duration-300 ease-in-out">
|
<a href="/create" class="bg-green-500 hover:bg-green-700 text-white font-bold py-2 px-4 rounded transition duration-300 ease-in-out">
|
||||||
Add New Agent
|
Add New Agent
|
||||||
</a>
|
</a>
|
||||||
</div>
|
<button id="toggle-import" class="bg-blue-500 hover:bg-blue-700 text-white font-bold py-2 px-4 rounded transition duration-300 ease-in-out ml-4">
|
||||||
<section class="flex flex-col">
|
Import Agent
|
||||||
<div class="overflow-x-auto">
|
|
||||||
<div class="py-2 align-middle inline-block min-w-full">
|
|
||||||
<div class="shadow overflow-hidden border-b border-gray-700 rounded-lg">
|
|
||||||
<table class="min-w-full divide-y divide-gray-700">
|
|
||||||
<thead class="bg-gray-700">
|
|
||||||
<tr>
|
|
||||||
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider">
|
|
||||||
Name
|
|
||||||
</th>
|
|
||||||
<th scope="col" class="px-6 py-3 text-left text-xs font-medium text-gray-400 uppercase tracking-wider">
|
|
||||||
Status
|
|
||||||
</th>
|
|
||||||
<th scope="col" class="px-6 py-3 text-center">
|
|
||||||
<span class="sr-only">Talk</span>
|
|
||||||
</th>
|
|
||||||
<th scope="col" class="px-6 py-3 text-center">
|
|
||||||
<span class="sr-only">Start</span>
|
|
||||||
</th>
|
|
||||||
<th scope="col" class="px-6 py-3 text-center">
|
|
||||||
<span class="sr-only">Stop</span>
|
|
||||||
</th>
|
|
||||||
<th scope="col" class="px-6 py-3 text-center">
|
|
||||||
<span class="sr-only">Settings</span>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody class="bg-gray-800 divide-y divide-gray-700">
|
|
||||||
<!-- Dynamic agent rows go here -->
|
|
||||||
{{ $status := .Status }}
|
|
||||||
{{ range .Agents }}
|
|
||||||
<tr hx-ext="sse" data-agent-name="{{.}}">
|
|
||||||
<td class="px-6 py-4 whitespace-nowrap text-sm font-medium text-gray-300">{{.}}</td>
|
|
||||||
<td class="px-6 py-4 whitespace-nowrap text-sm text-gray-300">
|
|
||||||
Online: {{ index $status . }}
|
|
||||||
<a href="/status/{{.}}" class="text-indigo-500 hover:text-indigo-400">
|
|
||||||
<i class="fas fa-info"></i> Status
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td class="px-6 py-4 whitespace-nowrap text-center text-sm font-medium">
|
|
||||||
<a href="/talk/{{.}}" class="text-indigo-500 hover:text-indigo-400">
|
|
||||||
<i class="fas fa-comments"></i> Talk
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
<td class="px-6 py-4 whitespace-nowrap text-center text-sm font-medium">
|
|
||||||
<button class="action-btn start-btn"
|
|
||||||
hx-put="/start/{{.}}"
|
|
||||||
hx-swap="none"
|
|
||||||
hx-ext="json-enc"
|
|
||||||
data-action="start"
|
|
||||||
data-agent="{{.}}">
|
|
||||||
Start
|
|
||||||
</button>
|
</button>
|
||||||
</td>
|
|
||||||
<td class="px-6 py-4 whitespace-nowrap text-center text-sm font-medium">
|
|
||||||
<button class="action-btn pause-btn"
|
|
||||||
hx-put="/pause/{{.}}"
|
|
||||||
hx-swap="none"
|
|
||||||
hx-ext="json-enc"
|
|
||||||
data-action="pause"
|
|
||||||
data-agent="{{.}}">
|
|
||||||
Pause
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
<td class="px-6 py-4 whitespace-nowrap text-center text-sm font-medium">
|
|
||||||
<a href="/settings/{{.}}" class="text-indigo-500 hover:text-indigo-400">
|
|
||||||
<i class="fas fa-cog"></i> Settings
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{{ end }}
|
|
||||||
<!-- Repeat for each agent -->
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<section id="import-section" class="hidden mb-8">
|
||||||
</section>
|
|
||||||
<footer class="mt-8 text-center">
|
|
||||||
|
|
||||||
<!-- File Upload Form -->
|
|
||||||
<div class="section-box">
|
<div class="section-box">
|
||||||
<h2 class="text-2xl font-bold mb-4">Import Agent</h2>
|
<h2 class="text-2xl font-bold mb-4">Import Agent</h2>
|
||||||
|
|
||||||
<!-- Response Messages Container -->
|
<!-- Response Messages Container -->
|
||||||
<div id="response-container">
|
<div id="response-container">
|
||||||
<!-- Success Alert -->
|
<!-- Success Alert -->
|
||||||
<div id="success-alert" class="alert alert-success">
|
<div id="success-alert" class="alert alert-success">
|
||||||
Agent imported successfully! The page will refresh in a moment.
|
Agent imported successfully! The page will refresh in a moment.
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Error Alert -->
|
<!-- Error Alert -->
|
||||||
<div id="error-alert" class="alert alert-error">
|
<div id="error-alert" class="alert alert-error">
|
||||||
<span id="error-message">Error importing agent.</span>
|
<span id="error-message">Error importing agent.</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<form id='import-form' hx-encoding='multipart/form-data' hx-post='/settings/import' hx-target="#response-container" hx-swap="none">
|
<form id='import-form' hx-encoding='multipart/form-data' hx-post='/settings/import' hx-target="#response-container" hx-swap="none">
|
||||||
<div class="mb-4">
|
<div class="mb-4">
|
||||||
<label for="file" class="block text-gray-300 mb-2">Select Agent File:</label>
|
<label for="file" class="block text-gray-300 mb-2">Select Agent File:</label>
|
||||||
@@ -204,12 +52,49 @@
|
|||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
|
</section>
|
||||||
|
<section class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8">
|
||||||
|
{{ $status := .Status }}
|
||||||
|
{{ range .Agents }}
|
||||||
|
<div class="card relative flex flex-col items-center text-center p-6 bg-gray-800 rounded-lg shadow-md">
|
||||||
|
<img src="/public/agent_{{.}}.png" alt="{{.}}" class="w-24 h-24 rounded-full mb-4">
|
||||||
|
<h2 class="text-xl font-bold mb-2">{{.}}</h2>
|
||||||
|
<p class="text-gray-400 mb-4">Online: {{ index $status . }}</p>
|
||||||
|
<div class="flex justify-center space-x-4">
|
||||||
|
<a href="/status/{{.}}" class="text-indigo-500 hover:text-indigo-400">
|
||||||
|
<i class="fas fa-info-circle"></i> Status
|
||||||
|
</a>
|
||||||
|
<a href="/talk/{{.}}" class="text-indigo-500 hover:text-indigo-400">
|
||||||
|
<i class="fas fa-comments"></i> Talk
|
||||||
|
</a>
|
||||||
|
<button class="action-btn start-btn" hx-put="/start/{{.}}" hx-swap="none" hx-ext="json-enc" data-action="start" data-agent="{{.}}">
|
||||||
|
Start
|
||||||
|
</button>
|
||||||
|
<button class="action-btn pause-btn" hx-put="/pause/{{.}}" hx-swap="none" hx-ext="json-enc" data-action="pause" data-agent="{{.}}">
|
||||||
|
Pause
|
||||||
|
</button>
|
||||||
|
<a href="/settings/{{.}}" class="text-indigo-500 hover:text-indigo-400">
|
||||||
|
<i class="fas fa-cog"></i> Settings
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{{ end }}
|
||||||
|
</section>
|
||||||
|
<footer class="mt-8 text-center">
|
||||||
|
<p>© 2025 Smart Agent List. All rights reserved.</p>
|
||||||
</footer>
|
</footer>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
const importSection = document.getElementById('import-section');
|
||||||
|
const toggleImport = document.getElementById('toggle-import');
|
||||||
|
|
||||||
|
// Toggle import section visibility
|
||||||
|
toggleImport.addEventListener('click', function() {
|
||||||
|
importSection.classList.toggle('hidden');
|
||||||
|
});
|
||||||
|
|
||||||
// Handle import form submission
|
// Handle import form submission
|
||||||
document.getElementById('import-form').addEventListener('htmx:afterRequest', function(event) {
|
document.getElementById('import-form').addEventListener('htmx:afterRequest', function(event) {
|
||||||
const xhr = event.detail.xhr;
|
const xhr = event.detail.xhr;
|
||||||
@@ -285,20 +170,17 @@
|
|||||||
|
|
||||||
// Function to update agent status in the UI
|
// Function to update agent status in the UI
|
||||||
function updateAgentStatus(agentName, isOnline) {
|
function updateAgentStatus(agentName, isOnline) {
|
||||||
// Find the row for this agent
|
// Find the card for this agent
|
||||||
const rows = document.querySelectorAll('tr[data-agent-name]');
|
const cards = document.querySelectorAll('.card');
|
||||||
rows.forEach(row => {
|
cards.forEach(card => {
|
||||||
if (row.getAttribute('data-agent-name') === agentName) {
|
const agentTitle = card.querySelector('h2').textContent;
|
||||||
// Find status cell (second cell in the row)
|
if (agentTitle === agentName) {
|
||||||
const statusCell = row.querySelector('td:nth-child(2)');
|
|
||||||
if (statusCell) {
|
|
||||||
// Update the "Online:" text
|
// Update the "Online:" text
|
||||||
const statusText = statusCell.firstChild;
|
const statusText = card.querySelector('p');
|
||||||
statusText.textContent = `Online: ${isOnline}`;
|
statusText.textContent = `Online: ${isOnline}`;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
<meta charset="UTF-8">
|
<meta charset="UTF-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
|
<link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
|
||||||
<link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&display=swap" rel="stylesheet">
|
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
|
||||||
|
<link href="https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700&family=Permanent+Marker&display=swap" rel="stylesheet">
|
||||||
<script src="https://unpkg.com/htmx.org"></script>
|
<script src="https://unpkg.com/htmx.org"></script>
|
||||||
<script src="https://unpkg.com/htmx.org/dist/ext/sse.js"></script>
|
<script src="https://unpkg.com/htmx.org/dist/ext/sse.js"></script>
|
||||||
<script src="https://unpkg.com/hyperscript.org@0.9.12"></script>
|
<script src="https://unpkg.com/hyperscript.org@0.9.12"></script>
|
||||||
@@ -10,220 +10,723 @@
|
|||||||
<script defer src="https://unpkg.com/@alpinejs/collapse@3.x.x/dist/cdn.min.js"></script>
|
<script defer src="https://unpkg.com/@alpinejs/collapse@3.x.x/dist/cdn.min.js"></script>
|
||||||
<script src="https://unpkg.com/alpinejs" defer></script>
|
<script src="https://unpkg.com/alpinejs" defer></script>
|
||||||
<style>
|
<style>
|
||||||
body {
|
:root {
|
||||||
font-family: 'Roboto', sans-serif;
|
--primary: #00ff95;
|
||||||
|
--secondary: #ff00b1;
|
||||||
|
--tertiary: #5e00ff;
|
||||||
|
--dark-bg: #111111;
|
||||||
|
--darker-bg: #0a0a0a;
|
||||||
|
--medium-bg: #222222;
|
||||||
|
--light-bg: #333333;
|
||||||
|
--neon-glow: 0 0 8px rgba(0, 255, 149, 0.7);
|
||||||
|
--pink-glow: 0 0 8px rgba(255, 0, 177, 0.7);
|
||||||
|
--purple-glow: 0 0 8px rgba(94, 0, 255, 0.7);
|
||||||
}
|
}
|
||||||
.section-box {
|
|
||||||
background-color: #2a2a2a; /* Darker background for the form */
|
/* Glitch effect animation */
|
||||||
padding: 20px;
|
@keyframes glitch {
|
||||||
margin-bottom: 20px;
|
0% { transform: translate(0); }
|
||||||
border-radius: 10px;
|
20% { transform: translate(-2px, 2px); }
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
40% { transform: translate(-2px, -2px); }
|
||||||
|
60% { transform: translate(2px, 2px); }
|
||||||
|
80% { transform: translate(2px, -2px); }
|
||||||
|
100% { transform: translate(0); }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Neon pulse animation */
|
||||||
|
@keyframes neonPulse {
|
||||||
|
0% { text-shadow: 0 0 7px var(--primary), 0 0 10px var(--primary); }
|
||||||
|
50% { text-shadow: 0 0 15px var(--primary), 0 0 25px var(--primary); }
|
||||||
|
100% { text-shadow: 0 0 7px var(--primary), 0 0 10px var(--primary); }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Scanning line effect */
|
||||||
|
@keyframes scanline {
|
||||||
|
0% { transform: translateY(-100%); }
|
||||||
|
100% { transform: translateY(100%); }
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
background-color: #1a1a1a; /* Lighter overall background */
|
font-family: 'Outfit', sans-serif;
|
||||||
|
background-color: var(--dark-bg);
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
font-family: sans-serif;
|
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
}
|
|
||||||
|
|
||||||
input, button {
|
|
||||||
width: 100%;
|
|
||||||
padding: 10px;
|
|
||||||
margin-top: 5px;
|
|
||||||
border-radius: 5px;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type="text"], input[type="file"] {
|
|
||||||
background-color: #333333;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
background-color: #4a76a8; /* Blue color for buttons */
|
|
||||||
color: white;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
button:hover {
|
|
||||||
background-color: #5a86b8;
|
|
||||||
}
|
|
||||||
textarea {
|
|
||||||
height: 200px; /* Increased height for better JSON visibility */
|
|
||||||
}
|
|
||||||
/* Enhancing select box styles */
|
|
||||||
select {
|
|
||||||
appearance: none; /* Remove default system appearance */
|
|
||||||
background-color: #333; /* Darker background for the dark theme */
|
|
||||||
border: 2px solid #555; /* Slightly lighter border for contrast */
|
|
||||||
color: white; /* Text color */
|
|
||||||
padding: 10px; /* Padding inside the select box */
|
|
||||||
border-radius: 5px; /* Rounded corners */
|
|
||||||
background-image: url('data:image/svg+xml;utf8,<svg fill="%23ffffff" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>'); /* Custom dropdown arrow using SVG */
|
|
||||||
background-repeat: no-repeat;
|
|
||||||
background-position: right 10px center; /* Positioning the arrow nicely */
|
|
||||||
background-size: 12px; /* Size of the arrow */
|
|
||||||
cursor: pointer; /* Cursor indicates it's clickable */
|
|
||||||
}
|
|
||||||
|
|
||||||
select:hover {
|
|
||||||
border-color: #777; /* Lighter border on hover for visibility */
|
|
||||||
}
|
|
||||||
|
|
||||||
select:focus {
|
|
||||||
outline: none; /* Remove default focus outline */
|
|
||||||
border-color: #1e90ff; /* Focus color similar to the hover background of buttons */
|
|
||||||
box-shadow: 0 0 3px #1e90ff; /* Adding a slight glow effect */
|
|
||||||
}
|
|
||||||
|
|
||||||
select {
|
|
||||||
/* Previous styles */
|
|
||||||
overflow-y: auto; /* Ensures that a scrollbar is available when needed */
|
|
||||||
}
|
|
||||||
|
|
||||||
option {
|
|
||||||
background-color: #333; /* Dark background for each option */
|
|
||||||
color: white; /* Light color for the text */
|
|
||||||
padding: 8px 10px; /* Padding for each option */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Adding a hover effect for options is not consistently supported across all browsers */
|
|
||||||
select:hover option {
|
|
||||||
background-color: #444; /* Slightly lighter background on hover */
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Custom Scrollbars for the dropdown */
|
|
||||||
select {
|
|
||||||
scrollbar-width: thin; /* Firefox */
|
|
||||||
scrollbar-color: #666 #333; /* Firefox: thumb and track color */
|
|
||||||
}
|
|
||||||
|
|
||||||
select::-webkit-scrollbar {
|
|
||||||
width: 8px; /* For WebKit browsers */
|
|
||||||
}
|
|
||||||
|
|
||||||
select::-webkit-scrollbar-track {
|
|
||||||
background: #333;
|
|
||||||
}
|
|
||||||
|
|
||||||
select::-webkit-scrollbar-thumb {
|
|
||||||
background-color: #666;
|
|
||||||
border-radius: 10px;
|
|
||||||
border: 2px solid #333;
|
|
||||||
}
|
|
||||||
/* Basic setup for the checkbox */
|
|
||||||
.checkbox-custom {
|
|
||||||
position: relative;
|
position: relative;
|
||||||
display: inline-block;
|
overflow-x: hidden;
|
||||||
width: 20px; /* Width of the checkbox */
|
background-image:
|
||||||
height: 20px; /* Height of the checkbox */
|
radial-gradient(circle at 10% 20%, rgba(0, 255, 149, 0.05) 0%, transparent 20%),
|
||||||
margin: 5px;
|
radial-gradient(circle at 90% 80%, rgba(255, 0, 177, 0.05) 0%, transparent 20%),
|
||||||
cursor: pointer;
|
radial-gradient(circle at 50% 50%, rgba(94, 0, 255, 0.05) 0%, transparent 30%),
|
||||||
vertical-align: middle;
|
linear-gradient(180deg, var(--darker-bg) 0%, var(--dark-bg) 100%);
|
||||||
}
|
background-attachment: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
/* Hide the default checkbox input */
|
body::before {
|
||||||
.checkbox-custom input {
|
content: "";
|
||||||
opacity: 0;
|
position: fixed;
|
||||||
width: 0;
|
top: 0;
|
||||||
height: 0;
|
left: 0;
|
||||||
}
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
background: repeating-linear-gradient(
|
||||||
|
transparent,
|
||||||
|
transparent 2px,
|
||||||
|
rgba(0, 0, 0, 0.1) 2px,
|
||||||
|
rgba(0, 0, 0, 0.1) 4px
|
||||||
|
);
|
||||||
|
pointer-events: none;
|
||||||
|
z-index: 1000;
|
||||||
|
opacity: 0.3;
|
||||||
|
}
|
||||||
|
|
||||||
/* Create a custom box */
|
body::after {
|
||||||
.checkbox-custom .checkmark {
|
content: "";
|
||||||
|
position: fixed;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 4px;
|
||||||
|
background: linear-gradient(90deg, var(--primary), var(--secondary));
|
||||||
|
opacity: 0.7;
|
||||||
|
z-index: 1001;
|
||||||
|
animation: scanline 6s linear infinite;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1, h2, h3, h4, h5, h6 {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-family: 'Permanent Marker', cursive;
|
||||||
|
color: var(--primary);
|
||||||
|
text-shadow: var(--neon-glow);
|
||||||
|
margin-bottom: 1rem;
|
||||||
|
position: relative;
|
||||||
|
animation: neonPulse 2s infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1:hover {
|
||||||
|
animation: glitch 0.3s infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
font-size: 1.5rem;
|
||||||
|
color: var(--secondary);
|
||||||
|
text-shadow: var(--pink-glow);
|
||||||
|
margin-bottom: 0.5rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-box {
|
||||||
|
background-color: rgba(17, 17, 17, 0.85);
|
||||||
|
border: 1px solid var(--primary);
|
||||||
|
padding: 25px;
|
||||||
|
margin-bottom: 20px;
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--primary), inset 0 0 20px rgba(0, 0, 0, 0.3);
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-box::before {
|
||||||
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
height: 20px;
|
right: 0;
|
||||||
width: 20px;
|
height: 2px;
|
||||||
background-color: #444; /* Dark grey box */
|
background: linear-gradient(90deg, var(--primary), var(--secondary), var(--tertiary), var(--primary));
|
||||||
border-radius: 4px; /* Rounded corners for the box */
|
background-size: 200% 100%;
|
||||||
border: 1px solid #777; /* Slightly lighter border */
|
animation: gradientMove 3s linear infinite;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* On mouse-over, add a different border color */
|
@keyframes gradientMove {
|
||||||
.checkbox-custom:hover .checkmark {
|
0% { background-position: 0% 50%; }
|
||||||
border-color: #aaa;
|
100% { background-position: 100% 50%; }
|
||||||
}
|
}
|
||||||
|
|
||||||
/* When the checkbox is checked, change the background and insert a checkmark */
|
input, button, textarea, select {
|
||||||
.checkbox-custom input:checked ~ .checkmark {
|
width: 100%;
|
||||||
background-color: #1e90ff; /* Blue background for checked state */
|
padding: 12px;
|
||||||
border-color: #1e90ff;
|
margin-top: 8px;
|
||||||
}
|
border-radius: 4px;
|
||||||
|
border: 1px solid var(--medium-bg);
|
||||||
|
background-color: var(--light-bg);
|
||||||
|
color: white;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
/* Create the checkmark using a pseudo element */
|
input[type="text"], input[type="file"], textarea {
|
||||||
.checkbox-custom .checkmark:after {
|
background-color: var(--light-bg);
|
||||||
|
border-left: 3px solid var(--primary);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
input:focus, textarea:focus, select:focus {
|
||||||
|
outline: none;
|
||||||
|
border-color: var(--primary);
|
||||||
|
box-shadow: var(--neon-glow);
|
||||||
|
}
|
||||||
|
|
||||||
|
button {
|
||||||
|
background: linear-gradient(135deg, var(--tertiary), var(--secondary));
|
||||||
|
color: white;
|
||||||
|
cursor: pointer;
|
||||||
|
border: none;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
font-weight: 600;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
button::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: -100%;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
|
||||||
|
transition: all 0.5s;
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover {
|
||||||
|
transform: translateY(-3px);
|
||||||
|
box-shadow: 0 7px 14px rgba(0, 0, 0, 0.3), 0 0 10px rgba(94, 0, 255, 0.5);
|
||||||
|
}
|
||||||
|
|
||||||
|
button:hover::before {
|
||||||
|
left: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
textarea {
|
||||||
|
height: 200px;
|
||||||
|
resize: vertical;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Select styling */
|
||||||
|
select {
|
||||||
|
appearance: none;
|
||||||
|
background-color: var(--light-bg);
|
||||||
|
border-left: 3px solid var(--tertiary);
|
||||||
|
color: white;
|
||||||
|
padding: 12px;
|
||||||
|
border-radius: 4px;
|
||||||
|
background-image: url('data:image/svg+xml;utf8,<svg fill="%23ffffff" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M7 10l5 5 5-5z"/></svg>');
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-position: right 10px center;
|
||||||
|
background-size: 12px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
select:hover {
|
||||||
|
border-color: var(--secondary);
|
||||||
|
box-shadow: 0 0 0 1px var(--secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
select:focus {
|
||||||
|
border-color: var(--tertiary);
|
||||||
|
box-shadow: var(--purple-glow);
|
||||||
|
}
|
||||||
|
|
||||||
|
select {
|
||||||
|
overflow-y: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
option {
|
||||||
|
background-color: var(--medium-bg);
|
||||||
|
color: white;
|
||||||
|
padding: 8px 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Custom Scrollbars */
|
||||||
|
::-webkit-scrollbar {
|
||||||
|
width: 8px;
|
||||||
|
height: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-track {
|
||||||
|
background: var(--medium-bg);
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb {
|
||||||
|
background: linear-gradient(var(--primary), var(--secondary));
|
||||||
|
border-radius: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: var(--tertiary);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Checkbox styling */
|
||||||
|
.checkbox-custom {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
width: 22px;
|
||||||
|
height: 22px;
|
||||||
|
margin: 5px;
|
||||||
|
cursor: pointer;
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox-custom input {
|
||||||
|
opacity: 0;
|
||||||
|
width: 0;
|
||||||
|
height: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox-custom .checkmark {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
height: 22px;
|
||||||
|
width: 22px;
|
||||||
|
background-color: var(--light-bg);
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid var(--medium-bg);
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox-custom:hover .checkmark {
|
||||||
|
border-color: var(--primary);
|
||||||
|
box-shadow: var(--neon-glow);
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox-custom input:checked ~ .checkmark {
|
||||||
|
background: linear-gradient(135deg, var(--primary), var(--tertiary));
|
||||||
|
border-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.checkbox-custom .checkmark:after {
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Show the checkmark when checked */
|
.checkbox-custom input:checked ~ .checkmark:after {
|
||||||
.checkbox-custom input:checked ~ .checkmark:after {
|
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Style the checkmark */
|
.checkbox-custom .checkmark:after {
|
||||||
.checkbox-custom .checkmark:after {
|
left: 8px;
|
||||||
left: 7px;
|
top: 4px;
|
||||||
top: 3px;
|
width: 6px;
|
||||||
width: 5px;
|
height: 12px;
|
||||||
height: 10px;
|
|
||||||
border: solid white;
|
border: solid white;
|
||||||
border-width: 0 3px 3px 0;
|
border-width: 0 2px 2px 0;
|
||||||
transform: rotate(45deg);
|
transform: rotate(45deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
.container {
|
/* Card styling */
|
||||||
max-width: 100%;
|
.container {
|
||||||
|
max-width: 1200px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
padding: 20px;
|
padding: 20px;
|
||||||
text-align: center;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.card-link {
|
.card-link {
|
||||||
text-decoration: none; /* Removes underline from links */
|
text-decoration: none;
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
background: rgba(255, 255, 255, 0.1);
|
background: linear-gradient(145deg, rgba(34, 34, 34, 0.9), rgba(17, 17, 17, 0.9));
|
||||||
|
border: 1px solid rgba(94, 0, 255, 0.2);
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
padding: 20px;
|
padding: 25px;
|
||||||
margin: 20px auto;
|
margin: 25px auto;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for hover effects */
|
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||||
display: block; /* Ensures the link fills the card */
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 3px;
|
||||||
|
background: linear-gradient(90deg, var(--primary), var(--secondary), var(--tertiary));
|
||||||
|
transform: scaleX(0);
|
||||||
|
transform-origin: left;
|
||||||
|
transition: transform 0.4s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
.card:hover {
|
.card:hover {
|
||||||
transform: translateY(-5px); /* Slight lift effect */
|
transform: translateY(-8px) scale(1.02);
|
||||||
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2); /* Shadow for depth */
|
box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4), 0 0 15px rgba(94, 0, 255, 0.3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card:hover::before {
|
||||||
|
transform: scaleX(1);
|
||||||
|
}
|
||||||
|
|
||||||
.card h2 {
|
.card h2 {
|
||||||
font-size: 1.5em; /* Larger and more prominent */
|
font-family: 'Outfit', sans-serif;
|
||||||
font-weight: bold; /* Ensures boldness */
|
font-size: 1.5em;
|
||||||
color: white; /* Ensures visibility against the card's background */
|
font-weight: 600;
|
||||||
margin-bottom: 0.5em; /* Space below the heading */
|
color: var(--primary);
|
||||||
|
margin-bottom: 0.8em;
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
}
|
}
|
||||||
.card a,
|
|
||||||
.card p {
|
.card a {
|
||||||
color: white; /* Ensures text color is consistent */
|
color: var(--secondary);
|
||||||
|
transition: color 0.3s;
|
||||||
|
text-decoration: none;
|
||||||
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.card a:hover {
|
||||||
|
color: var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.card a::after {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
bottom: -2px;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 1px;
|
||||||
|
background: var(--primary);
|
||||||
|
transform: scaleX(0);
|
||||||
|
transform-origin: right;
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card a:hover::after {
|
||||||
|
transform: scaleX(1);
|
||||||
|
transform-origin: left;
|
||||||
|
}
|
||||||
|
|
||||||
.card p {
|
.card p {
|
||||||
|
color: #cccccc;
|
||||||
font-size: 1em;
|
font-size: 1em;
|
||||||
|
line-height: 1.6;
|
||||||
}
|
}
|
||||||
.image-container {
|
|
||||||
|
/* Button container */
|
||||||
|
.button-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: flex-end;
|
||||||
margin: 20px 0;
|
gap: 10px;
|
||||||
|
margin-bottom: 12px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Alert and Toast styling */
|
||||||
|
.alert {
|
||||||
|
padding: 12px 15px;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin: 15px 0;
|
||||||
|
display: none;
|
||||||
|
position: relative;
|
||||||
|
border-left: 4px solid;
|
||||||
|
animation: fadeIn 0.3s ease-in;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes fadeIn {
|
||||||
|
from { opacity: 0; transform: translateY(-10px); }
|
||||||
|
to { opacity: 1; transform: translateY(0); }
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert-success {
|
||||||
|
background-color: rgba(0, 255, 149, 0.1);
|
||||||
|
border-color: var(--primary);
|
||||||
|
color: var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.alert-error {
|
||||||
|
background-color: rgba(255, 0, 177, 0.1);
|
||||||
|
border-color: var(--secondary);
|
||||||
|
color: var(--secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.toast {
|
||||||
|
position: fixed;
|
||||||
|
top: 30px;
|
||||||
|
right: 30px;
|
||||||
|
max-width: 350px;
|
||||||
|
padding: 15px 20px;
|
||||||
|
border-radius: 6px;
|
||||||
|
box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
|
||||||
|
z-index: 2000;
|
||||||
|
opacity: 0;
|
||||||
|
transform: translateX(30px);
|
||||||
|
transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toast::before {
|
||||||
|
content: "";
|
||||||
|
width: 20px;
|
||||||
|
height: 20px;
|
||||||
|
margin-right: 15px;
|
||||||
|
background-position: center;
|
||||||
|
background-repeat: no-repeat;
|
||||||
|
background-size: contain;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toast-success {
|
||||||
|
background: linear-gradient(135deg, rgba(0, 255, 149, 0.9), rgba(0, 255, 149, 0.7));
|
||||||
|
color: #111111;
|
||||||
|
border-left: 4px solid var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.toast-success::before {
|
||||||
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23111111'%3E%3Cpath d='M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z'/%3E%3C/svg%3E");
|
||||||
|
}
|
||||||
|
|
||||||
|
.toast-error {
|
||||||
|
background: linear-gradient(135deg, rgba(255, 0, 177, 0.9), rgba(255, 0, 177, 0.7));
|
||||||
|
color: #ffffff;
|
||||||
|
border-left: 4px solid var(--secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.toast-error::before {
|
||||||
|
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z'/%3E%3C/svg%3E");
|
||||||
|
}
|
||||||
|
|
||||||
|
.toast-visible {
|
||||||
|
opacity: 1;
|
||||||
|
transform: translateX(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Action buttons */
|
||||||
|
.action-btn {
|
||||||
|
background: var(--medium-bg);
|
||||||
|
color: white;
|
||||||
|
border: 1px solid rgba(255, 255, 255, 0.1);
|
||||||
|
padding: 8px 15px;
|
||||||
|
border-radius: 4px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: all 0.3s ease;
|
||||||
|
font-weight: 500;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-btn i {
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.action-btn:hover {
|
||||||
|
transform: translateY(-2px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.start-btn {
|
||||||
|
background: linear-gradient(135deg, var(--primary), rgba(0, 255, 149, 0.7));
|
||||||
|
color: #111111;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.start-btn:hover {
|
||||||
|
box-shadow: 0 0 15px rgba(0, 255, 149, 0.5);
|
||||||
|
background: var(--primary);
|
||||||
|
}
|
||||||
|
|
||||||
|
.pause-btn {
|
||||||
|
background: linear-gradient(135deg, var(--tertiary), rgba(94, 0, 255, 0.7));
|
||||||
|
color: white;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pause-btn:hover {
|
||||||
|
box-shadow: 0 0 15px rgba(94, 0, 255, 0.5);
|
||||||
|
background: var(--tertiary);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Badge styling */
|
||||||
|
.badge {
|
||||||
|
display: inline-block;
|
||||||
|
padding: 3px 10px;
|
||||||
|
border-radius: 12px;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
font-weight: 600;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 0.5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-primary {
|
||||||
|
background-color: var(--primary);
|
||||||
|
color: #111111;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-secondary {
|
||||||
|
background-color: var(--secondary);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
.badge-tertiary {
|
||||||
|
background-color: var(--tertiary);
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Data display tables */
|
||||||
|
.data-table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: separate;
|
||||||
|
border-spacing: 0;
|
||||||
|
margin: 20px 0;
|
||||||
|
border-radius: 6px;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table th, .data-table td {
|
||||||
|
text-align: left;
|
||||||
|
padding: 12px 15px;
|
||||||
|
border-bottom: 1px solid var(--medium-bg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table th {
|
||||||
|
background-color: rgba(94, 0, 255, 0.2);
|
||||||
|
color: var(--tertiary);
|
||||||
|
font-weight: 600;
|
||||||
|
text-transform: uppercase;
|
||||||
|
letter-spacing: 1px;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table tr:last-child td {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table tr:nth-child(odd) td {
|
||||||
|
background-color: rgba(17, 17, 17, 0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table tr:nth-child(even) td {
|
||||||
|
background-color: rgba(34, 34, 34, 0.6);
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table tr:hover td {
|
||||||
|
background-color: rgba(94, 0, 255, 0.1);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Terminal-style code display */
|
||||||
|
.code-terminal {
|
||||||
|
background-color: #0a0a0a;
|
||||||
|
border-radius: 6px;
|
||||||
|
padding: 15px;
|
||||||
|
font-family: 'Courier New', monospace;
|
||||||
|
color: #00ff95;
|
||||||
|
margin: 20px 0;
|
||||||
|
position: relative;
|
||||||
|
box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code-terminal::before {
|
||||||
|
content: "";
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 25px;
|
||||||
|
background: #222;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
padding: 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code-terminal::after {
|
||||||
|
content: "• • •";
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 12px;
|
||||||
|
height: 25px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
color: #666;
|
||||||
|
font-size: 20px;
|
||||||
|
letter-spacing: -2px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code-terminal pre {
|
||||||
|
margin-top: 25px;
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-break: break-word;
|
||||||
|
line-height: 1.5;
|
||||||
|
}
|
||||||
|
|
||||||
|
.code-terminal .prompt {
|
||||||
|
color: var(--secondary);
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* User info badge */
|
||||||
|
.user-info {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
background: linear-gradient(135deg, rgba(17, 17, 17, 0.8), rgba(34, 34, 34, 0.8));
|
||||||
|
border: 1px solid var(--tertiary);
|
||||||
|
border-radius: 30px;
|
||||||
|
padding: 6px 15px;
|
||||||
|
margin: 10px 0;
|
||||||
|
font-size: 0.9rem;
|
||||||
|
box-shadow: var(--purple-glow);
|
||||||
|
}
|
||||||
|
|
||||||
|
.user-info::before {
|
||||||
|
content: "";
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
background-color: var(--primary);
|
||||||
|
border-radius: 50%;
|
||||||
|
margin-right: 10px;
|
||||||
|
animation: pulse 2s infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes pulse {
|
||||||
|
0% { box-shadow: 0 0 0 0 rgba(0, 255, 149, 0.7); }
|
||||||
|
70% { box-shadow: 0 0 0 10px rgba(0, 255, 149, 0); }
|
||||||
|
100% { box-shadow: 0 0 0 0 rgba(0, 255, 149, 0); }
|
||||||
|
}
|
||||||
|
|
||||||
|
.timestamp {
|
||||||
|
margin-left: auto;
|
||||||
|
font-family: 'Courier New', monospace;
|
||||||
|
color: var(--secondary);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Responsive design adjustments */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
.container {
|
||||||
|
padding: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.card {
|
||||||
|
width: 100%;
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.section-box {
|
||||||
|
padding: 15px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.button-container {
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
.toast {
|
||||||
|
top: 10px;
|
||||||
|
right: 10px;
|
||||||
|
left: 10px;
|
||||||
|
max-width: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// Function to show toast notifications
|
// Function to show toast notifications with enhanced animation
|
||||||
function showToast(message, type) {
|
function showToast(message, type) {
|
||||||
const toast = document.getElementById('toast');
|
const toast = document.getElementById('toast');
|
||||||
const toastMessage = document.getElementById('toast-message');
|
const toastMessage = document.getElementById('toast-message');
|
||||||
@@ -235,14 +738,36 @@ select::-webkit-scrollbar-thumb {
|
|||||||
toast.className = 'toast';
|
toast.className = 'toast';
|
||||||
toast.classList.add(type === 'success' ? 'toast-success' : 'toast-error');
|
toast.classList.add(type === 'success' ? 'toast-success' : 'toast-error');
|
||||||
|
|
||||||
// Show toast
|
// Show toast with enhanced animation
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
toast.classList.add('toast-visible');
|
toast.classList.add('toast-visible');
|
||||||
}, 100);
|
}, 100);
|
||||||
|
|
||||||
// Hide toast after 3 seconds
|
// Hide toast after 3 seconds with animation
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
toast.classList.remove('toast-visible');
|
toast.classList.remove('toast-visible');
|
||||||
|
|
||||||
|
// Clean up after animation completes
|
||||||
|
setTimeout(() => {
|
||||||
|
toast.className = 'toast';
|
||||||
|
}, 400);
|
||||||
}, 3000);
|
}, 3000);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Function to create the glitch effect on headings
|
||||||
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
|
const headings = document.querySelectorAll('h1');
|
||||||
|
|
||||||
|
headings.forEach(heading => {
|
||||||
|
heading.addEventListener('mouseover', function() {
|
||||||
|
this.style.animation = 'glitch 0.3s infinite';
|
||||||
|
});
|
||||||
|
|
||||||
|
heading.addEventListener('mouseout', function() {
|
||||||
|
this.style.animation = 'neonPulse 2s infinite';
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,22 +1,81 @@
|
|||||||
<nav class="bg-gray-800 w-full">
|
<nav class="relative z-10 w-full" style="background-color: var(--darker-bg); border-bottom: 1px solid var(--medium-bg);">
|
||||||
<div class="px-4 sm:px-6 lg:px-8">
|
<div class="px-6 sm:px-8 lg:px-10">
|
||||||
<div class="flex justify-between h-16">
|
<div class="flex justify-between h-16 items-center">
|
||||||
<div class="flex">
|
<div class="flex items-center">
|
||||||
<!-- Logo container -->
|
<!-- Logo container -->
|
||||||
<div class="flex-shrink-0 flex items-center">
|
<div class="flex-shrink-0">
|
||||||
<!-- Replace 'logo.png' with the actual path to your logo image -->
|
<!-- Logo with glow effect -->
|
||||||
<a href="/" >
|
<a href="/" class="flex items-center group">
|
||||||
<img src="/public/logo_1.png" alt="Logo" class="h-8 w-auto mr-3">
|
<div class="relative">
|
||||||
|
<img src="/public/logo_1.png" alt="Logo" class="h-10 w-auto mr-4 transition-transform duration-300 group-hover:scale-105"
|
||||||
|
style="filter: drop-shadow(0 0 5px var(--primary));">
|
||||||
|
<!-- Animated scan line on hover -->
|
||||||
|
<div class="absolute inset-0 overflow-hidden opacity-0 group-hover:opacity-100 transition-opacity duration-300">
|
||||||
|
<div class="absolute inset-0 bg-gradient-to-b from-transparent via-var(--primary) to-transparent opacity-30"
|
||||||
|
style="height: 10px; animation: scanline 1.5s linear infinite;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<span class="text-xl font-bold transition-colors duration-300"
|
||||||
|
style="color: var(--primary); text-shadow: var(--neon-glow);">LocalAgent</span>
|
||||||
</a>
|
</a>
|
||||||
<a href="/" class="px-3 py-2 rounded-md text-sm font-medium text-white bg-gray-900 focus:outline-none focus:text-white focus:bg-gray-700">
|
</div>
|
||||||
<i class="fas fa-home"></i> LocalAgent
|
<div class="hidden md:block ml-10">
|
||||||
|
<div class="flex space-x-4">
|
||||||
|
<a href="/" class="px-3 py-2 rounded-md text-lg font-medium text-white hover:bg-gray-800 transition duration-300 relative overflow-hidden group">
|
||||||
|
<i class="fas fa-home mr-2"></i> Home
|
||||||
|
<!-- Underline animation -->
|
||||||
|
<span class="absolute bottom-0 left-0 w-0 h-0.5 group-hover:w-full transition-all duration-300"
|
||||||
|
style="background: linear-gradient(90deg, var(--primary), var(--secondary));"></span>
|
||||||
</a>
|
</a>
|
||||||
<a href="/agents" class="px-3 py-2 rounded-md text-sm font-medium text-gray-300 hover:text-white hover:bg-gray-700 focus:outline-none focus:text-white focus:bg-gray-700">
|
<a href="/agents" class="px-3 py-2 rounded-md text-lg font-medium text-gray-400 hover:bg-gray-800 transition duration-300 relative overflow-hidden group">
|
||||||
<i class="fas fa-users"></i> Agent list
|
<i class="fas fa-users mr-2"></i> Agent List
|
||||||
|
<!-- Underline animation -->
|
||||||
|
<span class="absolute bottom-0 left-0 w-0 h-0.5 group-hover:w-full transition-all duration-300"
|
||||||
|
style="background: linear-gradient(90deg, var(--secondary), var(--tertiary));"></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="flex items-center space-x-4">
|
||||||
|
<!-- Status badge -->
|
||||||
|
<div class="hidden md:flex items-center">
|
||||||
|
<span class="flex items-center text-sm">
|
||||||
|
<span class="w-2 h-2 rounded-full mr-2"
|
||||||
|
style="background-color: var(--primary); box-shadow: 0 0 5px var(--primary); animation: pulse 2s infinite;"></span>
|
||||||
|
<span>State: <span style="color: var(--secondary); text-shadow: var(--pink-glow);">active</span></span>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="md:hidden flex items-center">
|
||||||
|
<button class="text-gray-400 hover:text-white focus:outline-none focus:text-white transition duration-300"
|
||||||
|
style="text-shadow: var(--neon-glow);"
|
||||||
|
onclick="toggleMobileMenu()">
|
||||||
|
<i class="fas fa-bars fa-lg"></i>
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<!-- Mobile menu, toggle based on menu state -->
|
||||||
|
<div id="mobile-menu" class="md:hidden hidden"
|
||||||
|
style="background-color: var(--darker-bg); border-top: 1px solid var(--medium-bg);">
|
||||||
|
<div class="px-2 pt-2 pb-3 space-y-1">
|
||||||
|
<a href="/" class="block px-3 py-2 rounded-md text-base font-medium text-white hover:bg-gray-800 transition duration-300"
|
||||||
|
style="border-left: 3px solid var(--primary);">
|
||||||
|
<i class="fas fa-home mr-2"></i> Home
|
||||||
|
</a>
|
||||||
|
<a href="/agents" class="block px-3 py-2 rounded-md text-base font-medium text-gray-400 hover:bg-gray-800 transition duration-300"
|
||||||
|
style="border-left: 3px solid var(--secondary);">
|
||||||
|
<i class="fas fa-users mr-2"></i> Agent List
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
<br>
|
<br>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
function toggleMobileMenu() {
|
||||||
|
const mobileMenu = document.getElementById('mobile-menu');
|
||||||
|
mobileMenu.classList.toggle('hidden');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -3,105 +3,6 @@
|
|||||||
<head>
|
<head>
|
||||||
<title>Agent settings {{.Name}}</title>
|
<title>Agent settings {{.Name}}</title>
|
||||||
{{template "views/partials/header"}}
|
{{template "views/partials/header"}}
|
||||||
<style>
|
|
||||||
.section-box {
|
|
||||||
background-color: #2a2a2a; /* Darker background for the form */
|
|
||||||
padding: 20px;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
border-radius: 10px;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
body {
|
|
||||||
background-color: #1a1a1a; /* Lighter overall background */
|
|
||||||
color: #ffffff;
|
|
||||||
font-family: sans-serif;
|
|
||||||
padding: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
input, button {
|
|
||||||
width: 100%;
|
|
||||||
padding: 10px;
|
|
||||||
margin-top: 5px;
|
|
||||||
border-radius: 5px;
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
input[type="text"], input[type="file"] {
|
|
||||||
background-color: #333333;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
|
|
||||||
button {
|
|
||||||
background-color: #4a76a8; /* Blue color for buttons */
|
|
||||||
color: white;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
|
|
||||||
button:hover {
|
|
||||||
background-color: #5a86b8;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Toast notification styles */
|
|
||||||
.toast {
|
|
||||||
position: fixed;
|
|
||||||
top: 20px;
|
|
||||||
right: 20px;
|
|
||||||
max-width: 350px;
|
|
||||||
padding: 15px;
|
|
||||||
border-radius: 5px;
|
|
||||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
|
|
||||||
z-index: 1000;
|
|
||||||
opacity: 0;
|
|
||||||
transition: opacity 0.3s ease;
|
|
||||||
}
|
|
||||||
.toast-success {
|
|
||||||
background-color: #10b981;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
.toast-error {
|
|
||||||
background-color: #ef4444;
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
.toast-visible {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Action button styles */
|
|
||||||
.action-button {
|
|
||||||
margin-bottom: 10px;
|
|
||||||
display: inline-block;
|
|
||||||
width: auto;
|
|
||||||
margin-right: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.start-button {
|
|
||||||
background-color: #10b981; /* Green */
|
|
||||||
}
|
|
||||||
.start-button:hover {
|
|
||||||
background-color: #059669;
|
|
||||||
}
|
|
||||||
|
|
||||||
.pause-button {
|
|
||||||
background-color: #f59e0b; /* Orange */
|
|
||||||
}
|
|
||||||
.pause-button:hover {
|
|
||||||
background-color: #d97706;
|
|
||||||
}
|
|
||||||
|
|
||||||
.delete-button {
|
|
||||||
background-color: #ef4444; /* Red */
|
|
||||||
color: white;
|
|
||||||
padding: 10px 15px;
|
|
||||||
border-radius: 5px;
|
|
||||||
text-decoration: none;
|
|
||||||
display: inline-block;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.delete-button:hover {
|
|
||||||
background-color: #dc2626;
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
{{template "views/partials/menu"}}
|
{{template "views/partials/menu"}}
|
||||||
@@ -111,39 +12,50 @@
|
|||||||
<span id="toast-message"></span>
|
<span id="toast-message"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
<header class="text-center mb-8">
|
<header class="text-center mb-8">
|
||||||
<h1 class="text-3xl md:text-5xl font-bold">Agent settings - {{.Name}}</h1>
|
<h1 class="text-3xl md:text-5xl font-bold">Agent settings - {{.Name}}</h1>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="max-w-4xl mx-auto">
|
<div class="max-w-4xl mx-auto">
|
||||||
<div class="section-box">
|
<div class="section-box">
|
||||||
<h2 class="mb-4">Agent Control</h2>
|
<h2>Agent Control</h2>
|
||||||
|
<div class="button-container">
|
||||||
<button
|
<button
|
||||||
class="action-button start-button"
|
class="action-btn start-btn"
|
||||||
hx-put="/start/{{.Name}}"
|
hx-put="/start/{{.Name}}"
|
||||||
hx-swap="none"
|
hx-swap="none"
|
||||||
data-action="start"
|
data-action="start"
|
||||||
data-agent="{{.Name}}">
|
data-agent="{{.Name}}">
|
||||||
Start Agent
|
<i class="fas fa-play"></i> Start Agent
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
class="action-button pause-button"
|
class="action-btn pause-btn"
|
||||||
hx-put="/pause/{{.Name}}"
|
hx-put="/pause/{{.Name}}"
|
||||||
hx-swap="none"
|
hx-swap="none"
|
||||||
data-action="pause"
|
data-action="pause"
|
||||||
data-agent="{{.Name}}">
|
data-agent="{{.Name}}">
|
||||||
Pause Agent
|
<i class="fas fa-pause"></i> Pause Agent
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="section-box">
|
||||||
|
<h2>Export Data</h2>
|
||||||
|
<p class="mb-4">Export your agent configuration for backup or transfer.</p>
|
||||||
|
<button
|
||||||
|
class="action-btn"
|
||||||
|
onclick="window.location.href='/settings/export/{{.Name}}'">
|
||||||
|
<i class="fas fa-file-export"></i> Export Configuration
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="section-box">
|
<div class="section-box">
|
||||||
<h2>Export</h2>
|
<h2>Danger Zone</h2>
|
||||||
<a href="/settings/export/{{.Name}}" class="action-button">Export</a>
|
<p class="mb-4">Permanently delete this agent and all associated data. This action cannot be undone.</p>
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="section-box">
|
|
||||||
<h2>Danger section</h2>
|
|
||||||
<button
|
<button
|
||||||
class="delete-button"
|
class="action-btn"
|
||||||
|
style="background: linear-gradient(135deg, #ff4545, var(--secondary)); color: white;"
|
||||||
hx-delete="/delete/{{.Name}}"
|
hx-delete="/delete/{{.Name}}"
|
||||||
hx-swap="none"
|
hx-swap="none"
|
||||||
data-action="delete"
|
data-action="delete"
|
||||||
@@ -152,21 +64,25 @@
|
|||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="user-info">
|
||||||
|
<span>Agent: {{.Name}}</span>
|
||||||
|
<span class="timestamp">Last modified: <span id="current-date"></span></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
document.addEventListener('DOMContentLoaded', function() {
|
document.addEventListener('DOMContentLoaded', function() {
|
||||||
// Add event listeners for action buttons (Start, Pause)
|
// Add event listeners for action buttons (Start, Pause)
|
||||||
document.querySelectorAll('.action-button').forEach(button => {
|
document.querySelectorAll('[data-action]').forEach(button => {
|
||||||
button.addEventListener('htmx:afterRequest', function(event) {
|
button.addEventListener('htmx:afterRequest', function(event) {
|
||||||
handleActionResponse(event, this);
|
handleActionResponse(event, this);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add event listener for delete button
|
// Set current date for timestamp
|
||||||
document.querySelector('.delete-button').addEventListener('htmx:afterRequest', function(event) {
|
const now = new Date();
|
||||||
handleActionResponse(event, this);
|
document.getElementById('current-date').textContent = now.toISOString().split('T')[0];
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Function to handle API responses for all actions
|
// Function to handle API responses for all actions
|
||||||
@@ -192,6 +108,10 @@
|
|||||||
break;
|
break;
|
||||||
case 'delete':
|
case 'delete':
|
||||||
message = `Agent "${agent}" deleted successfully`;
|
message = `Agent "${agent}" deleted successfully`;
|
||||||
|
// Redirect to agent list page after short delay for delete
|
||||||
|
setTimeout(() => {
|
||||||
|
window.location.href = "/agents";
|
||||||
|
}, 2000);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
message = "Operation completed successfully";
|
message = "Operation completed successfully";
|
||||||
@@ -200,11 +120,6 @@
|
|||||||
// Show success message
|
// Show success message
|
||||||
showToast(message, 'success');
|
showToast(message, 'success');
|
||||||
|
|
||||||
// Redirect to agent list page after short delay
|
|
||||||
setTimeout(() => {
|
|
||||||
window.location.href = "/agents";
|
|
||||||
}, 2000);
|
|
||||||
|
|
||||||
} else if (response.error) {
|
} else if (response.error) {
|
||||||
// Show error message
|
// Show error message
|
||||||
showToast(`Error: ${response.error}`, 'error');
|
showToast(`Error: ${response.error}`, 'error');
|
||||||
@@ -218,8 +133,6 @@
|
|||||||
showToast(`Server error: ${xhr.status}`, 'error');
|
showToast(`Server error: ${xhr.status}`, 'error');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
Reference in New Issue
Block a user