|
|
@@ -1,21 +1,21 @@
|
|
|
{% extends "admin/base.html" %}
|
|
|
|
|
|
{% block content %}
|
|
|
-<div x-data="{ activeTab: 'squid', editing: false }" class="bg-white rounded-lg shadow-lg p-6">
|
|
|
+<div x-data="{ activeTab: 'env', editing: false }" class="bg-white rounded-lg shadow-lg p-6">
|
|
|
<h2 class="text-2xl font-bold text-gray-800 mb-6">Configuración</h2>
|
|
|
|
|
|
<!-- Tabs -->
|
|
|
<div class="flex border-b border-gray-200">
|
|
|
- <button @click="activeTab = 'squid'" :class="activeTab === 'squid' ? 'border-blue-500 text-blue-600' : 'border-transparent text-gray-500'" class="py-2 px-4 border-b-2 font-medium text-sm">
|
|
|
+ <!-- <button @click="activeTab = 'squid'" :class="activeTab === 'squid' ? 'border-blue-500 text-blue-600' : 'border-transparent text-gray-500'" class="py-2 px-4 border-b-2 font-medium text-sm">
|
|
|
Squid Config
|
|
|
- </button>
|
|
|
+ </button> -->
|
|
|
<button @click="activeTab = 'env'" :class="activeTab === 'env' ? 'border-blue-500 text-blue-600' : 'border-transparent text-gray-500'" class="py-2 px-4 border-b-2 font-medium text-sm">
|
|
|
Variables de Entorno
|
|
|
</button>
|
|
|
</div>
|
|
|
|
|
|
<!-- Squid Tab -->
|
|
|
- <div x-show="activeTab === 'squid'" class="mt-6">
|
|
|
+ <!-- <div x-show="activeTab === 'squid'" class="mt-6">
|
|
|
<div class="flex justify-between items-center mb-6">
|
|
|
<h3 class="text-xl font-bold text-gray-800">Configuración de Squid</h3>
|
|
|
<a href="{{ url_for('admin.edit_config') }}" class="bg-blue-500 hover:bg-blue-600 text-white px-4 py-2 rounded-lg transition-colors">
|
|
|
@@ -26,7 +26,7 @@
|
|
|
<div class="bg-gray-900 rounded-lg p-4 overflow-x-auto">
|
|
|
<pre class="text-green-400 text-sm font-mono whitespace-pre-wrap">{{ config_content }}</pre>
|
|
|
</div>
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
|
|
|
<!-- Env Tab -->
|
|
|
<div x-show="activeTab === 'env'" class="mt-6">
|
|
|
@@ -37,17 +37,19 @@
|
|
|
</button>
|
|
|
</div>
|
|
|
|
|
|
- <form method="POST" action="{{ url_for('admin.save_env') }}" x-show="editing" class="space-y-4">
|
|
|
+ <form method="POST" action="{{ url_for('admin.save_env') }}" x-show="editing" class="grid grid-cols-1 md:grid-cols-2 gap-6">
|
|
|
<input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
|
|
|
{% for key, value in env_vars.items() %}
|
|
|
- <div>
|
|
|
- <label class="block text-sm font-medium text-gray-700 mb-2">{{ key }}</label>
|
|
|
- <input type="text" name="{{ key }}" value="{{ value }}" class="w-full p-2 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent">
|
|
|
+ <div class="bg-gray-50 p-4 rounded-lg border border-gray-200">
|
|
|
+ <label class="block text-sm font-semibold text-gray-700 mb-2">{{ key }}</label>
|
|
|
+ <input type="text" name="{{ key }}" value="{{ value }}" class="w-full p-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-blue-500 focus:border-transparent transition-colors">
|
|
|
</div>
|
|
|
{% endfor %}
|
|
|
- <button type="submit" class="bg-green-500 hover:bg-green-600 text-white px-6 py-2 rounded-lg transition-colors">
|
|
|
- <i class="fas fa-save mr-2"></i>Guardar Cambios
|
|
|
- </button>
|
|
|
+ <div class="md:col-span-2 flex justify-center mt-4">
|
|
|
+ <button type="submit" class="bg-green-500 hover:bg-green-600 text-white px-6 py-3 rounded-lg transition-colors shadow-md">
|
|
|
+ <i class="fas fa-save mr-2"></i>Guardar Cambios
|
|
|
+ </button>
|
|
|
+ </div>
|
|
|
</form>
|
|
|
|
|
|
<div x-show="!editing" class="bg-gray-900 rounded-lg p-4 overflow-x-auto">
|