Release 1.2: bulk upload, S3/SFTP/FTP, SMTP, password reset, user groups, git deploy
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -966,3 +966,82 @@ body {
|
||||
.admin-panel--danger {
|
||||
border-color: rgba(239, 68, 68, 0.25);
|
||||
}
|
||||
|
||||
.form-inline-input {
|
||||
padding: 6px 10px;
|
||||
border-radius: var(--radius-sm);
|
||||
border: 1px solid var(--border);
|
||||
background: rgba(0, 0, 0, 0.3);
|
||||
color: var(--text);
|
||||
font-family: var(--font);
|
||||
font-size: 0.85rem;
|
||||
margin-right: 6px;
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.form-inline-input--sm {
|
||||
width: 90px;
|
||||
}
|
||||
|
||||
.form-select--sm {
|
||||
padding: 6px 10px;
|
||||
font-size: 0.8rem;
|
||||
min-width: 120px;
|
||||
}
|
||||
|
||||
.group-edit-form,
|
||||
.group-assign-form {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.quota-bar-wrap {
|
||||
margin-top: 20px;
|
||||
max-width: 520px;
|
||||
}
|
||||
|
||||
.quota-bar {
|
||||
background: var(--bg-card);
|
||||
border: 1px solid var(--border);
|
||||
border-radius: var(--radius-sm);
|
||||
padding: 14px 16px;
|
||||
}
|
||||
|
||||
.quota-bar__header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
font-size: 0.85rem;
|
||||
color: var(--text-muted);
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.quota-bar__track {
|
||||
height: 8px;
|
||||
background: rgba(255, 255, 255, 0.08);
|
||||
border-radius: 999px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.quota-bar__fill {
|
||||
height: 100%;
|
||||
background: linear-gradient(90deg, var(--accent), var(--accent-light));
|
||||
border-radius: 999px;
|
||||
transition: width 0.3s;
|
||||
}
|
||||
|
||||
.quota-bar__fill--warn {
|
||||
background: linear-gradient(90deg, #ef4444, #f97316);
|
||||
}
|
||||
|
||||
.settings-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
|
||||
gap: 16px;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.settings-form .admin-panel {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
+25
-10
@@ -8,6 +8,8 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
|
||||
if (!dropzone || !photoInput) return;
|
||||
|
||||
const maxFiles = parseInt(photoInput.dataset.max || "100", 10);
|
||||
|
||||
dropzone.addEventListener("click", (e) => {
|
||||
if (e.target.closest("button")) return;
|
||||
photoInput.click();
|
||||
@@ -28,30 +30,43 @@ document.addEventListener("DOMContentLoaded", () => {
|
||||
});
|
||||
|
||||
dropzone.addEventListener("drop", (e) => {
|
||||
const files = e.dataTransfer.files;
|
||||
if (files.length > 0) {
|
||||
photoInput.files = files;
|
||||
showPreview(files[0]);
|
||||
}
|
||||
e.preventDefault();
|
||||
assignFiles(e.dataTransfer.files);
|
||||
});
|
||||
|
||||
photoInput.addEventListener("change", () => {
|
||||
if (photoInput.files.length > 0) {
|
||||
showPreview(photoInput.files[0]);
|
||||
showPreview(photoInput.files);
|
||||
}
|
||||
});
|
||||
|
||||
function showPreview(file) {
|
||||
if (!file.type.startsWith("image/")) return;
|
||||
function assignFiles(fileList) {
|
||||
const dt = new DataTransfer();
|
||||
const limit = Math.min(fileList.length, maxFiles);
|
||||
for (let i = 0; i < limit; i++) {
|
||||
if (fileList[i].type.startsWith("image/")) {
|
||||
dt.items.add(fileList[i]);
|
||||
}
|
||||
}
|
||||
photoInput.files = dt.files;
|
||||
showPreview(photoInput.files);
|
||||
}
|
||||
|
||||
function showPreview(files) {
|
||||
if (!files || files.length === 0) return;
|
||||
|
||||
const first = files[0];
|
||||
const reader = new FileReader();
|
||||
reader.onload = (e) => {
|
||||
previewImg.src = e.target.result;
|
||||
previewName.textContent = file.name;
|
||||
previewName.textContent =
|
||||
files.length === 1
|
||||
? first.name
|
||||
: `${files.length} файлов (первый: ${first.name})`;
|
||||
preview.hidden = false;
|
||||
submitBtn.disabled = false;
|
||||
};
|
||||
reader.readAsDataURL(file);
|
||||
reader.readAsDataURL(first);
|
||||
}
|
||||
|
||||
document.querySelectorAll(".copy-btn").forEach((btn) => {
|
||||
|
||||
Reference in New Issue
Block a user