From 99bf8d9c96e097ef7e5866c8ad70511dd1aa85b4 Mon Sep 17 00:00:00 2001 From: Master3395 Date: Sat, 13 Sep 2025 17:36:50 +0200 Subject: [PATCH 1/4] Update backup controller to include backup frequency and retention data https://www.facebook.com/groups/cyberpanel/permalink/3977223309255954/ --- backup/static/backup/backup.js | 2 ++ static/backup/backup.js | 2 ++ 2 files changed, 4 insertions(+) diff --git a/backup/static/backup/backup.js b/backup/static/backup/backup.js index 1760c54fc..7323e8e49 100644 --- a/backup/static/backup/backup.js +++ b/backup/static/backup/backup.js @@ -2074,6 +2074,8 @@ app.controller('scheduleBackup', function ($scope, $http, $window) { $scope.allSites = response.data.allSites; $scope.lastRun = response.data.lastRun; $scope.currentStatus = response.data.currentStatus; + $scope.backupFrequency = response.data.currently; + $scope.backupRetention = response.data.retention; } else { new PNotify({ diff --git a/static/backup/backup.js b/static/backup/backup.js index e24218342..ca23cdf34 100644 --- a/static/backup/backup.js +++ b/static/backup/backup.js @@ -1729,6 +1729,8 @@ app.controller('scheduleBackup', function ($scope, $http, $window) { $scope.allSites = response.data.allSites; $scope.lastRun = response.data.lastRun; $scope.currentStatus = response.data.currentStatus; + $scope.backupFrequency = response.data.currently; + $scope.backupRetention = response.data.retention; } else { new PNotify({ From 0773d8d9a4641d88ff3ad107817cc468749457fe Mon Sep 17 00:00:00 2001 From: Master3395 Date: Sat, 13 Sep 2025 18:38:57 +0200 Subject: [PATCH 2/4] Add cosmetic context processor and update templates for custom CSS - Introduced a new `cosmetic_context` processor to provide custom CSS data to templates. - Updated `settings.py` to include the new context processor. - Modified multiple HTML templates to utilize the `cosmetic` variable for dynamic CSS styling. - Enhanced user interface elements with improved styling and accessibility features, including ARIA labels for form controls. --- CyberCP/settings.py | 1 + baseTemplate/context_processors.py | 18 ++++- .../templates/baseTemplate/index.html | 5 ++ .../mailServer/changeEmailPassword.html | 20 ++++-- .../mailServer/createEmailAccount.html | 21 ++++-- .../mailServer/deleteEmailAccount.html | 4 +- .../templates/mailServer/dkimManager.html | 70 +++++++++++++++---- .../templates/mailServer/emailForwarding.html | 64 +++++++++++++---- .../templates/mailServer/listEmails.html | 50 +++++++++---- .../templates/packages/createPackage.html | 1 + .../templates/packages/deletePackage.html | 2 +- packages/templates/packages/listPackages.html | 21 +++--- .../templates/packages/modifyPackage.html | 15 ++-- .../serverStatus/packageManager.html | 53 ++++++++------ 14 files changed, 253 insertions(+), 92 deletions(-) diff --git a/CyberCP/settings.py b/CyberCP/settings.py index ac1579490..687b6268b 100644 --- a/CyberCP/settings.py +++ b/CyberCP/settings.py @@ -96,6 +96,7 @@ TEMPLATES = [ 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', 'baseTemplate.context_processors.version_context', + 'baseTemplate.context_processors.cosmetic_context', ], }, }, diff --git a/baseTemplate/context_processors.py b/baseTemplate/context_processors.py index c63e23902..13d871c10 100644 --- a/baseTemplate/context_processors.py +++ b/baseTemplate/context_processors.py @@ -7,4 +7,20 @@ def version_context(request): 'CYBERPANEL_VERSION': VERSION, 'CYBERPANEL_BUILD': BUILD, 'CYBERPANEL_FULL_VERSION': f"{VERSION}.{BUILD}" - } \ No newline at end of file + } + +def cosmetic_context(request): + """Add cosmetic data (custom CSS) to all templates""" + try: + from .models import CyberPanelCosmetic + cosmetic = CyberPanelCosmetic.objects.get(pk=1) + return { + 'cosmetic': cosmetic + } + except: + from .models import CyberPanelCosmetic + cosmetic = CyberPanelCosmetic() + cosmetic.save() + return { + 'cosmetic': cosmetic + } \ No newline at end of file diff --git a/baseTemplate/templates/baseTemplate/index.html b/baseTemplate/templates/baseTemplate/index.html index 82a55f350..3a6986ddd 100644 --- a/baseTemplate/templates/baseTemplate/index.html +++ b/baseTemplate/templates/baseTemplate/index.html @@ -15,6 +15,11 @@ + + + diff --git a/mailServer/templates/mailServer/changeEmailPassword.html b/mailServer/templates/mailServer/changeEmailPassword.html index a0e79c185..363f7e93d 100644 --- a/mailServer/templates/mailServer/changeEmailPassword.html +++ b/mailServer/templates/mailServer/changeEmailPassword.html @@ -242,6 +242,16 @@ margin-right: 0.5rem; } + .password-hint { + color: var(--text-secondary, #64748b); + margin-top: 0.5rem; + display: block; + } + + .action-section { + margin-top: 2rem; + } + @keyframes spin { to { transform: rotate(360deg); } } @@ -324,7 +334,7 @@
- {% for items in websiteList %} @@ -345,7 +355,7 @@
- @@ -374,19 +384,19 @@
+ ng-model="emailPassword" readonly aria-label="{% trans 'Generated Password' %}">
- + {% trans "Make sure to save this password in a secure location" %}
-
+
- + {% trans "Make sure to save this password in a secure location" %}
-
+