From 1ab99daaba2dabdda6e8d94d1962c6fb6f9b4a48 Mon Sep 17 00:00:00 2001 From: Jonathan Miller Date: Sun, 5 Jul 2026 19:04:05 -0500 Subject: [PATCH] feat(ui): SFTP key file upload; msbackup modal padding frame MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Add/Edit Destination modal: SFTP key can now be UPLOADED as a file (read into the key textarea client-side via FileReader) instead of copy/paste; pasting still works. - Give .modal-content a "msbackup" class with a 1rem padding frame — Bootstrap's .modal-content has no padding of its own, which made the modal feel cramped. Styling lives in the WAM stylesheet (media/.../admin.css), scoped to .msbackup. Claude-Session: https://claude.ai/code/session_01WbGBN9VyRK61zczYWcCQ2i --- CHANGELOG.md | 6 ++++ .../com_mokosuitebackup/media/css/admin.css | 30 +++++++++++-------- .../com_mokosuitebackup/tmpl/profile/edit.php | 29 ++++++++++++++++-- 3 files changed, 51 insertions(+), 14 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 54a38afe..2fb9a06f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,12 @@ ## [Unreleased] +### Added +- SFTP destinations: **upload an SSH private key file** in the Add/Edit Destination modal instead of pasting it (reads the file into the key field client-side; pasting still works). + +### Changed +- Add/Edit Destination modal: give `.modal-content` a `msbackup` class with a 1rem padding frame (Bootstrap's `.modal-content` has no padding of its own), styled in the WAM stylesheet. + ### Fixed - Pre-update backup now shows an admin notification on **every** outcome (success / warning / failure) — previously a *successful* pre-update backup fired nothing, so it looked like the notification wasn't working. (#192) diff --git a/source/packages/com_mokosuitebackup/media/css/admin.css b/source/packages/com_mokosuitebackup/media/css/admin.css index 8fcaf02d..2223c485 100644 --- a/source/packages/com_mokosuitebackup/media/css/admin.css +++ b/source/packages/com_mokosuitebackup/media/css/admin.css @@ -2,30 +2,36 @@ * MokoSuiteBackup — admin styles (loaded via the Joomla Web Asset Manager). */ -/* Add/Edit Destination modal — comfortable, consistent spacing */ -#remoteModal .modal-header, -#remoteModal .modal-footer { - padding: 1rem 1.75rem; +/* Add/Edit Destination modal. + * Bootstrap's .modal-content has no padding of its own (its header/body/footer + * children provide it), which made the modal feel cramped against its border. + * Give the container a comfortable 1rem frame via the .msbackup namespace and let + * the inner sections align to it (no double horizontal padding). */ +.modal-content.msbackup { + padding: 1rem; } -#remoteModal .modal-body { - padding: 1.5rem 1.75rem; +.modal-content.msbackup .modal-header, +.modal-content.msbackup .modal-body, +.modal-content.msbackup .modal-footer { + padding-left: 0; + padding-right: 0; } -#remoteModal .modal-body .row + .row, -#remoteModal .remote-type-fields { +.modal-content.msbackup .modal-body .row + .row, +.modal-content.msbackup .remote-type-fields { margin-top: 0.25rem; } -#remoteModal hr { - margin: 1.5rem 0; +.modal-content.msbackup hr { + margin: 1rem 0; opacity: 0.12; } -#remoteModal .form-label { +.modal-content.msbackup .form-label { margin-bottom: 0.35rem; } -#remoteModal .form-check.form-switch { +.modal-content.msbackup .form-check.form-switch { padding-top: 0.15rem; } diff --git a/source/packages/com_mokosuitebackup/tmpl/profile/edit.php b/source/packages/com_mokosuitebackup/tmpl/profile/edit.php index 7dc1e5ce..cd36107e 100644 --- a/source/packages/com_mokosuitebackup/tmpl/profile/edit.php +++ b/source/packages/com_mokosuitebackup/tmpl/profile/edit.php @@ -123,7 +123,7 @@ $token = Session::getFormToken();