Skip to content

Commit

Permalink
Merge pull request #35 from USB-CI3715/internalizacion-btn
Browse files Browse the repository at this point in the history
agregar internalizacion para bot'on de importnte y arreglo de scss
  • Loading branch information
Jhonaiker2309 authored Nov 14, 2024
2 parents 4860009 + 24894f9 commit 9ed5f4c
Show file tree
Hide file tree
Showing 14 changed files with 17 additions and 19 deletions.
8 changes: 4 additions & 4 deletions nodebb-theme-quantum-devs/scss/topic.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down
2 changes: 1 addition & 1 deletion nodebb-theme-quantum-devs/templates/partials/post_bar.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

<!-- Nuevo Botón de Importancia -->
<button component="topic/mark-important" class="btn-ghost-sm ff-secondary d-flex gap-2 align-items-center">
<i class="fa fa-fw fa-star text-primary"></i>
<i class="fa fa-fw fa-star"></i>
<span class="d-none d-md-inline fw-semibold">[[topic:mark-important]]</span>
</button>

Expand Down
1 change: 1 addition & 0 deletions public/language/bn/topic.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"login-to-subscribe": "এই টপিকে সাবস্ক্রাইব করতে চাইলে অনুগ্রহ করে নিবন্ধণ করুন অথবা প্রবেশ করুন।",
"markAsUnreadForAll.success": "টপিকটি সবার জন্য অপঠিত হিসাবে মার্ক করুন।",
"mark-unread": "Mark unread",
"mark-important": "গুরুত্বপূর্ণ হিসাবে মার্ক করুন",
"mark-unread.success": "Topic marked as unread.",
"watch": "দেখা",
"unwatch": "অদেখা",
Expand Down
1 change: 1 addition & 0 deletions public/language/el/topic.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@
"login-to-subscribe": "Παρακαλώ εγγράψου ή συνδέσου για για γραφτείς σε αυτό το θέμα.",
"markAsUnreadForAll.success": "Το θέμα σημειώθηκε ως μη αναγνωσμένο για όλους.",
"mark-unread": "Mark unread",
"mark-important": "Σημειώστε σημαντικό",
"mark-unread.success": "Topic marked as unread.",
"watch": "Παρακολούθηση",
"unwatch": "Ξεπαρακολούθηση",
Expand Down
1 change: 1 addition & 0 deletions public/language/en-GB/topic.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions public/language/en-US/topic.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions public/language/en-x-pirate/topic.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions public/language/id/topic.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions public/language/lt/topic.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions public/language/ms/topic.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions public/language/ro/topic.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
1 change: 1 addition & 0 deletions public/language/sc/topic.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
14 changes: 2 additions & 12 deletions public/src/client/topic/threadTools.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, () => {
Expand Down
2 changes: 0 additions & 2 deletions src/api/posts.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ postsAPI.get = async function (caller, data) {
if (post.deleted && !(userPrivilege.isAdminOrMod || selfPost)) {
post.content = '[[topic:post-is-deleted]]';
}


return post;
};

Expand Down

0 comments on commit 9ed5f4c

Please sign in to comment.