diff --git a/plugin/css/tbk.css b/plugin/css/tbk.css
index e15ed8ce..002ae3f4 100644
--- a/plugin/css/tbk.css
+++ b/plugin/css/tbk.css
@@ -221,6 +221,8 @@
}
.tbk-box {
+ --tbk-red: #D5006C;
+ --tbk-red-2: #C00063;
background: #fff;
border-radius: 10px;
padding: 15px;
@@ -316,20 +318,35 @@
}
.button.tbk-button-primary {
- background: #D5006C;
- border-color: #D5006C;
+ background: var(--tbk-red);
+ border-color: var(--tbk-red);
color: white;
transition: background-color 0.3s ease;
}
.button.tbk-button-primary:hover,
.button.tbk-button-primary:focus {
- background: #C00063;
- border-color: #C00063;
+ background: var(--tbk-red-2);
+ border-color: var(--tbk-red-2);
color: white;
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}
+.button.tbk-button-secondary {
+ background: white;
+ border-color: var(--tbk-red);
+ color: var(--tbk-red);
+ transition: background-color 0.3s ease;
+}
+
+.button.tbk-button-secondary:hover,
+.button.tbk-button-secondary:focus {
+ background: white;
+ border-color: var(--tbk-red-2);
+ color: var(--tbk-red-2);
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
+}
+
.log-container {
width: calc(100vw - 480px);
max-height: 600px;
diff --git a/plugin/js/admin.js b/plugin/js/admin.js
index 14cad5e8..287557d8 100644
--- a/plugin/js/admin.js
+++ b/plugin/js/admin.js
@@ -113,4 +113,63 @@ jQuery(function($) {
notice_id: noticeId
});
});
+
+ function checkPermission(fileToDownload) {
+ return $.ajax({
+ url: ajaxurl,
+ type: 'POST',
+ data: {
+ action: 'check_can_download_file',
+ file: fileToDownload
+ }
+ }).then(function (response) {
+ return response;
+ }).catch(function (error) {
+ return { success: false, data: {
+ error: error.message || "Error en la solicitud de descarga"
+ } };
+ });
+ }
+
+ function showNotice(title, message, type = 'success') {
+ const notice = $('
')
+ .addClass(`is-dismissible notice notice-${type}`)
+ .prepend(`
${title}
${message}
`);
+
+ const dismissButton = $('