v1.4.0: fix #43, #31, #29, #49, #33 + shared templating

This commit is contained in:
2026-05-20 20:08:25 +03:00
parent ca4d00c895
commit 64991f0228
63 changed files with 5005 additions and 45 deletions
+168
View File
@@ -0,0 +1,168 @@
@charset "UTF-8";
:root {
--bg-body: #0D1B2A;
--bg-card: #1B2838;
--bg-card-hover: #1e3044;
--bg-sidebar: #0A1628;
--bg-input: #1e2a3e;
--border: #253248;
--border-focus: #00ADEF;
--text-primary: #E8EDF2;
--text-secondary: #A0B4C8;
--text-muted: #6B8299;
--accent: #00ADEF;
--accent-hover: #33c4f5;
--accent-dim: rgba(0, 173, 239, 0.15);
--success: #22c55e;
--warning: #f59e0b;
--danger: #ef4444;
--info: #6366f1;
--font: 'Inter', 'Segoe UI', sans-serif;
--radius: 10px;
--shadow: 0 2px 12px rgba(0,0,0,0.4);
}
[data-theme="light"] {
--bg-body: #F5F7FA;
--bg-card: #FFFFFF;
--bg-card-hover: #f0f4f8;
--bg-sidebar: #FFFFFF;
--bg-input: #FFFFFF;
--border: #e2e8f0;
--border-focus: #00ADEF;
--text-primary: #1a1a2e;
--text-secondary: #5a6a7a;
--text-muted: #8899aa;
--accent: #00ADEF;
--accent-hover: #0095cc;
--accent-dim: rgba(0, 173, 239, 0.1);
--success: #16a34a;
--warning: #d97706;
--danger: #dc2626;
--info: #4f46e5;
--shadow: 0 2px 12px rgba(10, 42, 77, 0.1);
}
[data-theme="dark"] {
--bg-body: #0D1B2A;
--bg-card: #1B2838;
--bg-card-hover: #1e3044;
--bg-sidebar: #0A1628;
--bg-input: #1e2a3e;
--border: #253248;
--border-focus: #00ADEF;
--text-primary: #E8EDF2;
--text-secondary: #A0B4C8;
--text-muted: #6B8299;
--accent: #00ADEF;
--accent-hover: #33c4f5;
--accent-dim: rgba(0, 173, 239, 0.15);
--success: #22c55e;
--warning: #f59e0b;
--danger: #ef4444;
--info: #6366f1;
--shadow: 0 2px 12px rgba(0,0,0,0.4);
}
body {
background: var(--bg-body);
color: var(--text-primary);
transition: background 0.3s, color 0.3s;
}
.theme-switcher {
display: flex;
align-items: center;
gap: 6px;
}
.theme-switcher button {
background: var(--accent-dim);
border: 1px solid var(--border);
border-radius: 6px;
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
font-size: 16px;
color: var(--text-secondary);
transition: all 0.2s;
}
.theme-switcher button:hover {
background: var(--accent);
color: #fff;
border-color: var(--accent);
}
.theme-label {
font-size: 11px;
color: var(--text-muted);
white-space: nowrap;
}
/* EasyMDE dark theme overrides */
[data-theme="dark"] .EasyMDEContainer .editor-toolbar {
background: var(--bg-card);
border-color: var(--border);
}
[data-theme="dark"] .EasyMDEContainer .CodeMirror {
background: var(--bg-input);
color: var(--text-primary);
border-color: var(--border);
}
[data-theme="dark"] .editor-toolbar button {
color: var(--text-secondary);
border-color: transparent;
}
[data-theme="dark"] .editor-toolbar button:hover {
background: var(--accent-dim);
border-color: var(--accent);
color: var(--text-primary);
}
[data-theme="dark"] .editor-toolbar button.active {
background: var(--accent-dim);
border-color: var(--accent);
color: var(--accent);
}
[data-theme="dark"] .CodeMirror-cursor {
border-color: var(--accent) !important;
}
[data-theme="dark"] .CodeMirror-selected {
background: var(--accent-dim) !important;
}
[data-theme="dark"] .editor-preview {
background: var(--bg-card);
color: var(--text-primary);
}
[data-theme="dark"] .editor-preview-side {
background: var(--bg-card);
color: var(--text-primary);
border-color: var(--border);
}
[data-theme="dark"] .editor-statusbar {
color: var(--text-muted);
}
/* Sticky editor toolbar */
.EasyMDEContainer .editor-toolbar {
position: sticky;
top: 0;
z-index: 10;
background: var(--bg-card);
border-radius: var(--radius) var(--radius) 0 0;
}
/* Sticky bottom actions on edit page */
.edit-form-actions {
position: sticky;
bottom: 0;
z-index: 10;
background: var(--bg-card);
padding: 12px 0;
border-top: 1px solid var(--border);
margin-top: 8px;
}
File diff suppressed because it is too large Load Diff
@@ -0,0 +1,3 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 56">
<text font-family="Montserrat,sans-serif" font-weight="800" font-size="36" y="42" fill="#00ADEF">Aegis<text fill="#e8edf5">One</text></text>
</svg>

After

Width:  |  Height:  |  Size: 212 B

+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect width="32" height="32" rx="4" fill="#0A1628"/><text x="16" y="22" font-size="18" font-weight="bold" fill="#00ADEF" text-anchor="middle" font-family="sans-serif">AO</text></svg>

After

Width:  |  Height:  |  Size: 243 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

@@ -0,0 +1 @@
{"name":"AegisOne Service Portal","short_name":"AegisOne","icons":[{"src":"/service/static/img/favicons/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/service/static/img/favicons/apple-touch-icon.png","sizes":"180x180","type":"image/png"},{"src":"/service/static/img/favicons/favicon-16x16.png","sizes":"16x16","type":"image/png"},{"src":"/service/static/img/favicons/favicon-32x32.png","sizes":"32x32","type":"image/png"},{"src":"/service/static/img/favicons/favicon.ico","sizes":"48x48","type":"image/x-icon"}]}
+47
View File
@@ -0,0 +1,47 @@
(function() {
var STORAGE_KEY = 'aegisone_service_theme';
var themes = ['system', 'dark', 'light'];
function getSystemTheme() {
return window.matchMedia('(prefers-color-scheme: light)').matches ? 'light' : 'dark';
}
function applyTheme(theme) {
var resolved = theme === 'system' ? getSystemTheme() : theme;
document.documentElement.setAttribute('data-theme', resolved);
var label = document.getElementById('theme-label');
if (label) {
var names = { system: 'Авто', dark: 'Тёмная', light: 'Светлая' };
label.textContent = names[theme] || 'Авто';
}
var btn = document.getElementById('theme-btn');
if (btn) {
var icons = { system: '🖥', dark: '🌙', light: '☀️' };
btn.textContent = icons[theme] || '🖥';
}
}
function getNextTheme(current) {
var idx = themes.indexOf(current);
return themes[(idx + 1) % themes.length];
}
function toggleTheme() {
var current = localStorage.getItem(STORAGE_KEY) || 'system';
var next = getNextTheme(current);
localStorage.setItem(STORAGE_KEY, next);
applyTheme(next);
}
var saved = localStorage.getItem(STORAGE_KEY) || 'system';
applyTheme(saved);
window.matchMedia('(prefers-color-scheme: light)').addEventListener('change', function() {
var current = localStorage.getItem(STORAGE_KEY) || 'system';
if (current === 'system') {
applyTheme('system');
}
});
window.toggleTheme = toggleTheme;
})();