Skip to content

Commit

Permalink
Merge branch 'f24' into Add-search-interface
Browse files Browse the repository at this point in the history
  • Loading branch information
rmmahmou authored Sep 26, 2024
2 parents 926a3f2 + f164d55 commit 3249956
Show file tree
Hide file tree
Showing 13 changed files with 348 additions and 136 deletions.
Binary file added dump.rdb
Binary file not shown.
11 changes: 10 additions & 1 deletion install/data/navigation.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,5 +65,14 @@
"textClass": "d-lg-none",
"text": "[[global:header.admin]]",
"groups": ["administrators"]
}
},
{
"route": "#",
"title": "Submit Bug/Feedback",
"enabled": true,
"iconClass": "fa-bug",
"textClass": "d-lg-none",
"text": "Submit Bug/Feedback",
"id": "submit-bug-feedback"
}
]
3 changes: 2 additions & 1 deletion node_modules/nodebb-theme-harmony/templates/category.tpl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions node_modules/nodebb-theme-harmony/templates/header.tpl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

128 changes: 127 additions & 1 deletion node_modules/nodebb-theme-harmony/templates/partials/sidebar-left.tpl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions public/scripts/navigation.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// public/scripts/navigation.js
document.addEventListener('DOMContentLoaded', function () {
document.getElementById('submit-bug-feedback').addEventListener('click', function (event) {
event.preventDefault();
openBugFeedbackModal();
});
});

function openBugFeedbackModal() {
// Ensure the modal element exists
const modal = document.getElementById('bug-feedback-modal');
if (modal) {
modal.style.display = 'block';
} else {
console.error('Bug feedback modal not found');
}
}
2 changes: 2 additions & 0 deletions src/api/topics.js
Original file line number Diff line number Diff line change
Expand Up @@ -298,3 +298,5 @@ topicsAPI.bump = async (caller, { tid }) => {
await topics.markAsUnreadForAll(tid);
topics.pushUnreadCount(caller.uid);
};


16 changes: 14 additions & 2 deletions src/batch.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,23 @@ const DEFAULT_BATCH_SIZE = 100;

const sleep = util.promisify(setTimeout);

exports.processSortedSet = async function (setKey, process, options) {
options = options || {};
// I will reduce the complexity of the code by making helper functions outside the main function
// where the errors show

// helper functions:
// fixing error 1:
function processIsFunction(process) {
if (typeof process !== 'function') {
throw new Error('[[error:process-not-a-function]]');
}
}


exports.processSortedSet = async function (setKey, process, options) {
console.log('Hakaabi: Refactored code is running!');
options = options || {};

processIsFunction(process);

// Progress bar handling (upgrade scripts)
if (options.progress) {
Expand Down Expand Up @@ -68,6 +79,7 @@ exports.processSortedSet = async function (setKey, process, options) {
stop = start + options.batch - 1;
}
};
console.log('Hakaabi: Refactored code stopped running!');

exports.processArray = async function (array, process, options) {
options = options || {};
Expand Down
Loading

0 comments on commit 3249956

Please sign in to comment.