Профиль — это отдельный сервер: свой мир, .ini, песочница, набор модов и лимит памяти JVM. Project Zomboid различает их по -servername, поэтому файлы профилей не пересекаются. Работает всегда один профиль: серверные файлы, игровые порты и файл запуска JVM общие, так что переключение разрешено только на остановленном сервере. - config: список профилей вместо одиночных server_name/admin_password/ java_memory; старые поля переносятся в первый профиль при загрузке; - supervisor: запускает активный профиль и выставляет его -Xmx на каждом старте, потому что файл запуска общий; - бэкапы: архив снимается с одного профиля (мир + его конфиги), имя профиля попадает в имя файла, ротация считается по профилям; - API профилей: список, создание с копированием настроек из другого профиля, правка, удаление и переключение активного; - панель: селектор профиля в шапке и вкладка со списком профилей. Удаление профиля убирает его только из панели: мир и конфиги остаются на диске, чтобы случайное нажатие не стоило сохранений. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
419 lines
11 KiB
CSS
419 lines
11 KiB
CSS
/* Палитра панели: тёмная, с зелёным акцентом «в тему» Project Zomboid. */
|
|
:root {
|
|
--bg: #14171c;
|
|
--bg-soft: #1b1f26;
|
|
--bg-card: #20252e;
|
|
--border: #2c333f;
|
|
--text: #e6e9ef;
|
|
--muted: #98a2b3;
|
|
--accent: #6bbf59;
|
|
--accent-dark: #4f9440;
|
|
--danger: #e05c5c;
|
|
--warn: #e0a95c;
|
|
--info: #5c9ce0;
|
|
--radius: 10px;
|
|
--font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
--mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
|
|
}
|
|
|
|
* { box-sizing: border-box; }
|
|
|
|
body {
|
|
margin: 0;
|
|
background: var(--bg);
|
|
color: var(--text);
|
|
font: 14px/1.5 var(--font);
|
|
}
|
|
|
|
.hidden { display: none !important; }
|
|
/* Атрибут hidden обязан побеждать display из правил ниже: иначе элементы с
|
|
display: flex/block остаются на экране. */
|
|
[hidden] { display: none !important; }
|
|
.muted { color: var(--muted); }
|
|
.small { font-size: 12px; }
|
|
.error { color: var(--danger); }
|
|
.spacer { flex: 1; }
|
|
|
|
h1, h2, h3 { margin: 0 0 12px; font-weight: 600; }
|
|
h2 { font-size: 17px; }
|
|
h3 { font-size: 14px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
|
|
|
|
code {
|
|
font-family: var(--mono);
|
|
background: var(--bg-soft);
|
|
padding: 1px 5px;
|
|
border-radius: 4px;
|
|
font-size: 12px;
|
|
}
|
|
|
|
/* ---------- Экран входа ---------- */
|
|
|
|
.auth-screen {
|
|
min-height: 100vh;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
padding: 20px;
|
|
}
|
|
|
|
.auth-card {
|
|
width: 100%;
|
|
max-width: 380px;
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 28px;
|
|
}
|
|
|
|
.auth-title { font-size: 22px; text-align: center; }
|
|
.auth-subtitle { text-align: center; color: var(--muted); margin: 0 0 22px; }
|
|
|
|
/* ---------- Каркас ---------- */
|
|
|
|
.app { min-height: 100vh; display: flex; flex-direction: column; }
|
|
|
|
/* Кнопки управления и статус сервера должны оставаться под рукой на длинных
|
|
вкладках — конфиг и моды прокручиваются далеко вниз. */
|
|
.topbar {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 20;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
padding: 12px 20px;
|
|
background: var(--bg-soft);
|
|
border-bottom: 1px solid var(--border);
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.brand { font-weight: 600; font-size: 16px; }
|
|
.user { color: var(--muted); font-size: 13px; }
|
|
|
|
.status-pill {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
border-radius: 999px;
|
|
padding: 5px 14px;
|
|
font-size: 13px;
|
|
}
|
|
|
|
.dot {
|
|
width: 9px;
|
|
height: 9px;
|
|
border-radius: 50%;
|
|
background: var(--muted);
|
|
}
|
|
.dot.running { background: var(--accent); box-shadow: 0 0 8px var(--accent); }
|
|
.dot.starting, .dot.stopping { background: var(--warn); animation: pulse 1.2s infinite; }
|
|
.dot.stopped { background: #5b636f; }
|
|
|
|
@keyframes pulse { 50% { opacity: .35; } }
|
|
|
|
.controls { display: flex; gap: 8px; }
|
|
|
|
.tabs {
|
|
position: sticky;
|
|
top: 53px;
|
|
z-index: 19;
|
|
display: flex;
|
|
gap: 2px;
|
|
padding: 0 20px;
|
|
background: var(--bg-soft);
|
|
border-bottom: 1px solid var(--border);
|
|
overflow-x: auto;
|
|
}
|
|
|
|
.tab {
|
|
background: none;
|
|
border: none;
|
|
border-bottom: 2px solid transparent;
|
|
color: var(--muted);
|
|
padding: 11px 14px;
|
|
cursor: pointer;
|
|
font: inherit;
|
|
white-space: nowrap;
|
|
}
|
|
.tab:hover { color: var(--text); }
|
|
.tab.active { color: var(--text); border-bottom-color: var(--accent); }
|
|
|
|
.content { padding: 20px; max-width: 1100px; width: 100%; margin: 0 auto; flex: 1; }
|
|
|
|
.panel { display: none; }
|
|
.panel.active { display: block; }
|
|
|
|
.panel-head {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: flex-start;
|
|
gap: 12px;
|
|
margin-bottom: 16px;
|
|
flex-wrap: wrap;
|
|
}
|
|
.panel-head > div:last-child { display: flex; gap: 8px; align-items: center; }
|
|
|
|
/* ---------- Кнопки и поля ---------- */
|
|
|
|
.btn {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
color: var(--text);
|
|
padding: 8px 14px;
|
|
border-radius: 8px;
|
|
cursor: pointer;
|
|
font: inherit;
|
|
transition: background .15s, border-color .15s;
|
|
}
|
|
.btn:hover:not(:disabled) { background: #2a303a; }
|
|
.btn:disabled { opacity: .45; cursor: not-allowed; }
|
|
|
|
.btn-primary { background: var(--accent-dark); border-color: var(--accent-dark); }
|
|
.btn-primary:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); }
|
|
.btn-start { border-color: var(--accent-dark); color: var(--accent); }
|
|
.btn-stop { border-color: #6a3c3c; color: var(--danger); }
|
|
.btn-danger { border-color: #6a3c3c; color: var(--danger); }
|
|
.btn-ghost { background: transparent; }
|
|
.btn-sm { padding: 5px 10px; font-size: 13px; }
|
|
.btn-block { width: 100%; margin-top: 8px; }
|
|
|
|
input[type=text], input[type=password], input[type=search], input[type=number], textarea, select {
|
|
background: var(--bg);
|
|
border: 1px solid var(--border);
|
|
color: var(--text);
|
|
padding: 8px 10px;
|
|
border-radius: 8px;
|
|
font: inherit;
|
|
width: 100%;
|
|
}
|
|
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent-dark); }
|
|
/* Селектор с тегом нужен, чтобы перебить width из правила input[type=...]
|
|
выше: у него специфичность выше, чем у одного класса. */
|
|
input.input-sm, .input-sm { width: auto; padding: 6px 10px; font-size: 13px; }
|
|
|
|
.field { display: block; margin-bottom: 14px; }
|
|
.field > span { display: block; margin-bottom: 5px; font-size: 13px; color: var(--muted); }
|
|
.field small { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }
|
|
|
|
.checkbox { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
|
|
.checkbox input { width: auto; }
|
|
|
|
/* ---------- Карточки обзора ---------- */
|
|
|
|
.cards {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
|
gap: 14px;
|
|
margin-bottom: 18px;
|
|
}
|
|
|
|
.card {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 16px;
|
|
}
|
|
|
|
.stat { font-size: 24px; font-weight: 600; margin-bottom: 4px; }
|
|
|
|
.metric {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
padding: 4px 0;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.metric:last-child { border-bottom: none; }
|
|
.metric span { color: var(--muted); }
|
|
|
|
.player-list { list-style: none; margin: 6px 0 0; padding: 0; max-height: 120px; overflow-y: auto; }
|
|
.player-list li { padding: 3px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
|
|
|
|
/* ---------- Консоль ---------- */
|
|
|
|
.console-toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; flex-wrap: wrap; }
|
|
.console-toolbar #console-filter { flex: 1 1 200px; max-width: 320px; }
|
|
|
|
.console {
|
|
background: #0f1216;
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 12px;
|
|
height: 60vh;
|
|
min-height: 320px;
|
|
overflow-y: auto;
|
|
font-family: var(--mono);
|
|
font-size: 12.5px;
|
|
line-height: 1.55;
|
|
margin: 0;
|
|
white-space: pre-wrap;
|
|
word-break: break-word;
|
|
}
|
|
|
|
.console .line-manager { color: var(--info); }
|
|
.console .line-task { color: var(--warn); }
|
|
.console .line-console { color: var(--accent); }
|
|
.console .line-stderr { color: #e08c8c; }
|
|
|
|
.console-input { display: flex; gap: 8px; margin-top: 10px; }
|
|
.console-input input { font-family: var(--mono); }
|
|
|
|
/* ---------- Формы конфигов ---------- */
|
|
|
|
.fields {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
|
|
gap: 12px;
|
|
}
|
|
|
|
.cfg-field {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
padding: 12px;
|
|
}
|
|
.cfg-field.changed { border-color: var(--accent-dark); }
|
|
.cfg-field label { display: block; font-size: 13px; margin-bottom: 6px; }
|
|
.cfg-field .hint { color: var(--muted); font-size: 12px; margin-top: 5px; }
|
|
.cfg-field .key { color: var(--muted); font-family: var(--mono); font-size: 11px; }
|
|
|
|
/* ---------- Моды ---------- */
|
|
|
|
.mod-add { display: flex; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
|
|
.mod-add input { flex: 1; min-width: 180px; }
|
|
|
|
.mod-list { list-style: none; padding: 0; margin: 0 0 18px; }
|
|
|
|
.mod-list li {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
padding: 9px 12px;
|
|
margin-bottom: 6px;
|
|
}
|
|
.mod-list .mod-title { flex: 1; min-width: 0; }
|
|
.mod-list .mod-title b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
.mod-list .mod-title small { color: var(--muted); font-family: var(--mono); font-size: 11px; }
|
|
.mod-list img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; background: var(--bg); }
|
|
|
|
/* ---------- Таблицы ---------- */
|
|
|
|
.table { width: 100%; border-collapse: collapse; }
|
|
.table th {
|
|
text-align: left;
|
|
color: var(--muted);
|
|
font-weight: 500;
|
|
font-size: 12px;
|
|
text-transform: uppercase;
|
|
padding: 8px;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.table td { padding: 10px 8px; border-bottom: 1px solid var(--border); }
|
|
.table td:last-child { text-align: right; white-space: nowrap; }
|
|
|
|
.user-list { list-style: none; padding: 0; margin: 0 0 12px; }
|
|
.user-list li {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 9px 12px;
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
border-radius: 8px;
|
|
margin-bottom: 6px;
|
|
}
|
|
.user-list li span { flex: 1; }
|
|
|
|
/* ---------- Задача и уведомления ---------- */
|
|
|
|
.task-banner {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
padding: 9px 20px;
|
|
background: #2a2618;
|
|
border-bottom: 1px solid #4a4020;
|
|
color: var(--warn);
|
|
font-size: 13px;
|
|
}
|
|
|
|
.spinner {
|
|
width: 13px;
|
|
height: 13px;
|
|
border: 2px solid rgba(224, 169, 92, .3);
|
|
border-top-color: var(--warn);
|
|
border-radius: 50%;
|
|
animation: spin .8s linear infinite;
|
|
}
|
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
|
|
.toasts {
|
|
position: fixed;
|
|
right: 16px;
|
|
bottom: 16px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
z-index: 50;
|
|
max-width: 380px;
|
|
}
|
|
|
|
.toast {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
border-left: 3px solid var(--info);
|
|
border-radius: 8px;
|
|
padding: 11px 14px;
|
|
font-size: 13px;
|
|
animation: slide-in .2s ease-out;
|
|
}
|
|
.toast.ok { border-left-color: var(--accent); }
|
|
.toast.err { border-left-color: var(--danger); }
|
|
|
|
@keyframes slide-in { from { opacity: 0; transform: translateX(16px); } }
|
|
|
|
@media (max-width: 640px) {
|
|
.topbar { gap: 8px; }
|
|
.controls { width: 100%; }
|
|
.controls .btn { flex: 1; }
|
|
.content { padding: 14px; }
|
|
}
|
|
|
|
/* ---------- Профили ---------- */
|
|
|
|
.profile-picker {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
font-size: 13px;
|
|
color: var(--muted);
|
|
}
|
|
.profile-picker select {
|
|
width: auto;
|
|
padding: 5px 10px;
|
|
font-size: 13px;
|
|
}
|
|
.profile-picker select:disabled { opacity: .55; cursor: not-allowed; }
|
|
|
|
.profile-card .field { margin-bottom: 10px; }
|
|
.profile-card .key { margin-bottom: 8px; }
|
|
|
|
.profile-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 12px; }
|
|
|
|
.badge {
|
|
display: inline-block;
|
|
vertical-align: middle;
|
|
margin-left: 6px;
|
|
padding: 2px 8px;
|
|
border-radius: 999px;
|
|
background: var(--accent-dark);
|
|
color: #fff;
|
|
font-size: 11px;
|
|
text-transform: none;
|
|
letter-spacing: 0;
|
|
}
|