From 24894f91f6abaa797da7f823d1d9249b558118fc Mon Sep 17 00:00:00 2001 From: EliezerMCR Date: Wed, 13 Nov 2024 11:50:09 -0400 Subject: [PATCH] agregar internalizacion para bot'on de importnte y arreglo de scss --- nodebb-theme-quantum-devs/scss/topic.scss | 8 ++++---- .../templates/partials/post_bar.tpl | 2 +- public/language/bn/topic.json | 1 + public/language/el/topic.json | 1 + public/language/en-GB/topic.json | 1 + public/language/en-US/topic.json | 1 + public/language/en-x-pirate/topic.json | 1 + public/language/id/topic.json | 1 + public/language/lt/topic.json | 1 + public/language/ms/topic.json | 1 + public/language/ro/topic.json | 1 + public/language/sc/topic.json | 1 + public/src/client/topic/threadTools.js | 14 ++------------ src/api/posts.js | 2 -- 14 files changed, 17 insertions(+), 19 deletions(-) diff --git a/nodebb-theme-quantum-devs/scss/topic.scss b/nodebb-theme-quantum-devs/scss/topic.scss index 33e136fc56..7b85086bb4 100644 --- a/nodebb-theme-quantum-devs/scss/topic.scss +++ b/nodebb-theme-quantum-devs/scss/topic.scss @@ -9,13 +9,13 @@ body.template-topic { } // Estilo para el icono de estrella en estado normal - // .fa-star { - // color: $text-primary; // Color inicial, similar al timbre en la imagen - // } + .fa-star { + color: $primary; + } // Estilo para el icono cuando está activo (después de ser clickeado) &.active .fa-star { - color: $warning; // Color para el estado activo, puedes ajustar el color aquí + color: $warning; } } diff --git a/nodebb-theme-quantum-devs/templates/partials/post_bar.tpl b/nodebb-theme-quantum-devs/templates/partials/post_bar.tpl index e1cabae39a..b177825a36 100644 --- a/nodebb-theme-quantum-devs/templates/partials/post_bar.tpl +++ b/nodebb-theme-quantum-devs/templates/partials/post_bar.tpl @@ -10,7 +10,7 @@ diff --git a/public/language/bn/topic.json b/public/language/bn/topic.json index 3239dba068..9cb90bd81e 100644 --- a/public/language/bn/topic.json +++ b/public/language/bn/topic.json @@ -81,6 +81,7 @@ "login-to-subscribe": "এই টপিকে সাবস্ক্রাইব করতে চাইলে অনুগ্রহ করে নিবন্ধণ করুন অথবা প্রবেশ করুন।", "markAsUnreadForAll.success": "টপিকটি সবার জন্য অপঠিত হিসাবে মার্ক করুন।", "mark-unread": "Mark unread", + "mark-important": "গুরুত্বপূর্ণ হিসাবে মার্ক করুন", "mark-unread.success": "Topic marked as unread.", "watch": "দেখা", "unwatch": "অদেখা", diff --git a/public/language/el/topic.json b/public/language/el/topic.json index 259332bb1e..a03ba122f8 100644 --- a/public/language/el/topic.json +++ b/public/language/el/topic.json @@ -81,6 +81,7 @@ "login-to-subscribe": "Παρακαλώ εγγράψου ή συνδέσου για για γραφτείς σε αυτό το θέμα.", "markAsUnreadForAll.success": "Το θέμα σημειώθηκε ως μη αναγνωσμένο για όλους.", "mark-unread": "Mark unread", + "mark-important": "Σημειώστε σημαντικό", "mark-unread.success": "Topic marked as unread.", "watch": "Παρακολούθηση", "unwatch": "Ξεπαρακολούθηση", diff --git a/public/language/en-GB/topic.json b/public/language/en-GB/topic.json index 9027774603..b0baebdc57 100644 --- a/public/language/en-GB/topic.json +++ b/public/language/en-GB/topic.json @@ -92,6 +92,7 @@ "markAsUnreadForAll.success" : "Topic marked as unread for all.", "mark-unread": "Mark unread", + "mark-important": "Mark important", "mark-unread.success": "Topic marked as unread.", "watch": "Watch", diff --git a/public/language/en-US/topic.json b/public/language/en-US/topic.json index bf9c68ef85..7b5634ae4f 100644 --- a/public/language/en-US/topic.json +++ b/public/language/en-US/topic.json @@ -81,6 +81,7 @@ "login-to-subscribe": "Please register or log in in order to subscribe to this topic.", "markAsUnreadForAll.success": "Topic marked as unread for all.", "mark-unread": "Mark unread", + "mark-important": "Mark important", "mark-unread.success": "Topic marked as unread.", "watch": "Watch", "unwatch": "Unwatch", diff --git a/public/language/en-x-pirate/topic.json b/public/language/en-x-pirate/topic.json index bf9c68ef85..7b5634ae4f 100644 --- a/public/language/en-x-pirate/topic.json +++ b/public/language/en-x-pirate/topic.json @@ -81,6 +81,7 @@ "login-to-subscribe": "Please register or log in in order to subscribe to this topic.", "markAsUnreadForAll.success": "Topic marked as unread for all.", "mark-unread": "Mark unread", + "mark-important": "Mark important", "mark-unread.success": "Topic marked as unread.", "watch": "Watch", "unwatch": "Unwatch", diff --git a/public/language/id/topic.json b/public/language/id/topic.json index d0993adf2c..64deebf38f 100644 --- a/public/language/id/topic.json +++ b/public/language/id/topic.json @@ -81,6 +81,7 @@ "login-to-subscribe": "Daftar atau login untuk berlangganan topik ini.", "markAsUnreadForAll.success": "Topik ditandai Belum Dibaca seluruhnya", "mark-unread": "Mark unread", + "mark-important": "tandai penting", "mark-unread.success": "Topic marked as unread.", "watch": "Pantau", "unwatch": "Batalkan Pantau", diff --git a/public/language/lt/topic.json b/public/language/lt/topic.json index 16534631c1..dc8ee4a8dd 100644 --- a/public/language/lt/topic.json +++ b/public/language/lt/topic.json @@ -81,6 +81,7 @@ "login-to-subscribe": "Norėdami prenumeruoti šią temą, prašome prisiregistruoti arba prisijungti.", "markAsUnreadForAll.success": "Tema visiems vartotojams pažymėta kaip neskaityta.", "mark-unread": "Mark unread", + "mark-important": "Svarbus ženklas", "mark-unread.success": "Tema pažymėta kaip neskaityta.", "watch": "Žiūrėti", "unwatch": "Nebesekti", diff --git a/public/language/ms/topic.json b/public/language/ms/topic.json index 6c00d3eca9..33bffe039d 100644 --- a/public/language/ms/topic.json +++ b/public/language/ms/topic.json @@ -81,6 +81,7 @@ "login-to-subscribe": "Sila daftar atau log masuk untuk melanggani topik ini", "markAsUnreadForAll.success": "Topik ditanda sebagai belum dibaca untuk semua", "mark-unread": "Mark unread", + "mark-important": "Wichtig markieren", "mark-unread.success": "Topic marked as unread.", "watch": "Lihat", "unwatch": "Batal lihat", diff --git a/public/language/ro/topic.json b/public/language/ro/topic.json index c27e166051..53d94156cb 100644 --- a/public/language/ro/topic.json +++ b/public/language/ro/topic.json @@ -81,6 +81,7 @@ "login-to-subscribe": "Te rugăm să te înregistrezi sau să te autentifici ca să te poți abona la acest subiect.", "markAsUnreadForAll.success": "Subiect marcat ca citit pentru toți.", "mark-unread": "Mark unread", + "mark-important": "Marcați important", "mark-unread.success": "Topic marked as unread.", "watch": "Urmărește", "unwatch": "Oprire urmărire", diff --git a/public/language/sc/topic.json b/public/language/sc/topic.json index 0c7da34603..913a1cad89 100644 --- a/public/language/sc/topic.json +++ b/public/language/sc/topic.json @@ -81,6 +81,7 @@ "login-to-subscribe": "Pro praghere registra·ti o intra pro sutascrìere custa arresonada.", "markAsUnreadForAll.success": "Arresonada marcada comente de lèghere pro totus.", "mark-unread": "Mark unread", + "mark-important": "Mark important", "mark-unread.success": "Topic marked as unread.", "watch": "Càstia", "unwatch": "Unwatch", diff --git a/public/src/client/topic/threadTools.js b/public/src/client/topic/threadTools.js index 3ed4d07666..d55ae8c7ab 100644 --- a/public/src/client/topic/threadTools.js +++ b/public/src/client/topic/threadTools.js @@ -63,21 +63,11 @@ define('forum/topic/threadTools', [ topicContainer.on('click', '[component="topic/mark-important"]', function () { const btn = $(this); - + // Alterna la clase 'active' para cambiar el estilo del botón btn.toggleClass('active'); console.log('Marcado como importante'); - - // Realiza la acción de marcar como importante (puedes ajustar el endpoint si es necesario) - // topicCommand('put', '/important', undefined, () => { - // Muestra un mensaje de éxito, se debe colocar en el idioma que corresponda - // Por ejemplo: - // "mark-important": { - // "success": "Topic marked as important successfully!" - // } - // alerts.success('[[topic:mark-important.success]]'); - // }); - }); + }); topicContainer.on('click', '[component="topic/mark-unread"]', function () { topicCommand('del', '/read', undefined, () => { diff --git a/src/api/posts.js b/src/api/posts.js index 3a3b343873..ea4e92a23b 100644 --- a/src/api/posts.js +++ b/src/api/posts.js @@ -39,8 +39,6 @@ postsAPI.get = async function (caller, data) { if (post.deleted && !(userPrivilege.isAdminOrMod || selfPost)) { post.content = '[[topic:post-is-deleted]]'; } - - return post; };