diff --git a/install/package.json b/install/package.json index cbbe4c714b..5c2e7fcb86 100644 --- a/install/package.json +++ b/install/package.json @@ -90,9 +90,9 @@ "nodebb-plugin-spam-be-gone": "0.7.1", "nodebb-rewards-essentials": "0.1.3", "nodebb-theme-lavender": "5.0.11", - "nodebb-theme-persona": "10.1.52", + "nodebb-theme-persona": "10.1.53", "nodebb-theme-slick": "1.2.29", - "nodebb-theme-vanilla": "11.1.27", + "nodebb-theme-vanilla": "11.1.28", "nodebb-widget-essentials": "4.1.0", "nodemailer": "^6.4.6", "passport": "^0.4.1", diff --git a/public/language/bg/flags.json b/public/language/bg/flags.json index 6bab4143b4..1e10757d15 100644 --- a/public/language/bg/flags.json +++ b/public/language/bg/flags.json @@ -32,7 +32,7 @@ "view-profile": "Преглед на профила", "start-new-chat": "Започване на нов разговор", "go-to-target": "Преглед на целта на доклада", - "assign-to-me": "Assign To Me", + "assign-to-me": "Назначаване на мен", "delete-post": "Изтриване на публикацията", "purge-post": "Изчистване на публикацията", "restore-post": "Възстановяване на публикацията", diff --git a/public/language/bg/topic.json b/public/language/bg/topic.json index 095221a9a6..e2bea635a2 100644 --- a/public/language/bg/topic.json +++ b/public/language/bg/topic.json @@ -134,13 +134,13 @@ "stale.reply_anyway": "Отговаряне в тази тема въпреки това", "link_back": "Отговор: [%1](%2)", "diffs.title": "История на редакциите", - "diffs.description": "Тази публикация има %1 варианта. Щракнете върху някоя от версиите по-долу, за да видите съдържанието ѝ в съответния момент.", - "diffs.no-revisions-description": "Тази публикация има %1 варианта.", + "diffs.description": "Тази публикация има %1 версии. Щракнете върху някоя от версиите по-долу, за да видите съдържанието ѝ в съответния момент.", + "diffs.no-revisions-description": "Тази публикация има %1 версии.", "diffs.current-revision": "текуща версия", "diffs.original-revision": "оригинална версия", - "diffs.restore": "Restore this revision", - "diffs.restore-description": "A new revision will be appended to this post's edit history.", - "diffs.post-restored": "Post successfully restored to earlier revision", + "diffs.restore": "Възстановяване на тази версия", + "diffs.restore-description": "Към историята на редакциите на тази публикация ще бъде добавена нова версия.", + "diffs.post-restored": "Публикацията е възстановена успешно до по-ранна версия", "timeago_later": "%1 по-късно", "timeago_earlier": "%1 по-рано" } \ No newline at end of file diff --git a/public/language/en-GB/flags.json b/public/language/en-GB/flags.json index b3561f9e38..fb8708fc16 100644 --- a/public/language/en-GB/flags.json +++ b/public/language/en-GB/flags.json @@ -45,7 +45,6 @@ "no-notes": "No shared notes.", "history": "Account & Flag History", - "back": "Back to Flags List", "no-history": "No flag history.", "state-all": "All states", diff --git a/public/openapi/read.yaml b/public/openapi/read.yaml index afab3af4d3..87c4ce5bb4 100644 --- a/public/openapi/read.yaml +++ b/public/openapi/read.yaml @@ -4751,6 +4751,7 @@ paths: title: type: string - $ref: components/schemas/Pagination.yaml#/Pagination + - $ref: components/schemas/Breadcrumbs.yaml#/Breadcrumbs - $ref: components/schemas/CommonProps.yaml#/CommonProps "/api/flags/{flagId}": get: @@ -4963,6 +4964,7 @@ paths: additionalProperties: description: "A list of global and admin privileges, and whether the calling user has (or has inherited) them" type: boolean + - $ref: components/schemas/Breadcrumbs.yaml#/Breadcrumbs - $ref: components/schemas/CommonProps.yaml#/CommonProps /api/post-queue: get: @@ -5114,6 +5116,7 @@ paths: type: string - $ref: components/schemas/CategoryObject.yaml#/CategoryObject - $ref: components/schemas/Pagination.yaml#/Pagination + - $ref: components/schemas/Breadcrumbs.yaml#/Breadcrumbs - $ref: components/schemas/CommonProps.yaml#/CommonProps /api/ip-blacklist: get: diff --git a/public/src/app.js b/public/src/app.js index 25154c282a..a302e36873 100644 --- a/public/src/app.js +++ b/public/src/app.js @@ -498,7 +498,11 @@ app.cacheBuster = null; return resultEl.addClass('hidden').find('.quick-search-results-container').html(''); } data.posts.forEach(function (p) { - p.snippet = utils.escapeHTML($('
' + p.content + '
').text().slice(0, 80) + '...'); + var text = $('
' + p.content + '
').text(); + var start = Math.max(0, text.toLowerCase().indexOf(inputEl.val().toLowerCase()) - 40); + p.snippet = utils.escapeHTML((start > 0 ? '...' : '') + + text.slice(start, start + 80) + + (text.length - start > 80 ? '...' : '')); }); app.parseAndTranslate('partials/quick-search-results', data, function (html) { if (html.length) { diff --git a/src/controllers/globalmods.js b/src/controllers/globalmods.js index d2f0ae6656..71a1be2cc8 100644 --- a/src/controllers/globalmods.js +++ b/src/controllers/globalmods.js @@ -4,6 +4,7 @@ const user = require('../user'); const meta = require('../meta'); const analytics = require('../analytics'); const usersController = require('./admin/users'); +const helpers = require('./helpers'); const globalModsController = module.exports; @@ -21,6 +22,7 @@ globalModsController.ipBlacklist = async function (req, res, next) { title: '[[pages:ip-blacklist]]', rules: rules, analytics: analyticsData, + breadcrumbs: helpers.buildBreadcrumbs([{ text: '[[pages:ip-blacklist]]' }]), }); }; diff --git a/src/controllers/mods.js b/src/controllers/mods.js index b5b83d0f20..9c35a87800 100644 --- a/src/controllers/mods.js +++ b/src/controllers/mods.js @@ -12,6 +12,7 @@ const plugins = require('../plugins'); const pagination = require('../pagination'); const privileges = require('../privileges'); const utils = require('../utils'); +const helpers = require('./helpers'); const modsController = module.exports; modsController.flags = {}; @@ -94,6 +95,7 @@ modsController.flags.list = async function (req, res, next) { filters: filters, title: '[[pages:flags]]', pagination: pagination.create(flagsData.page, flagsData.pageCount, req.query), + breadcrumbs: helpers.buildBreadcrumbs([{ text: '[[pages:flags]]' }]), }); }; @@ -141,6 +143,10 @@ modsController.flags.detail = async function (req, res, next) { categories: results.categories, filters: req.session.flags_filters || [], privileges: results.privileges, + breadcrumbs: helpers.buildBreadcrumbs([ + { text: '[[pages:flags]]', url: '/flags' }, + { text: '[[pages:flag-details, ' + req.params.flagId + ']]' }, + ]), })); }; @@ -193,6 +199,7 @@ modsController.postQueue = async function (req, res, next) { title: '[[pages:post-queue]]', posts: postData, pagination: pagination.create(page, pageCount), + breadcrumbs: helpers.buildBreadcrumbs([{ text: '[[pages:post-queue]]' }]), }); }; diff --git a/src/topics/data.js b/src/topics/data.js index 2e1931e823..6b73163b4c 100644 --- a/src/topics/data.js +++ b/src/topics/data.js @@ -6,6 +6,7 @@ var db = require('../database'); var categories = require('../categories'); var utils = require('../utils'); var translator = require('../translator'); +const plugins = require('../plugins'); const intFields = [ 'tid', 'cid', 'uid', 'mainPid', 'postcount', @@ -21,8 +22,14 @@ module.exports = function (Topics) { } const keys = tids.map(tid => 'topic:' + tid); const topics = await (fields.length ? db.getObjectsFields(keys, fields) : db.getObjects(keys)); - topics.forEach(topic => modifyTopic(topic, fields)); - return topics; + const result = await plugins.fireHook('filter:topic.getFields', { + tids: tids, + topics: topics, + fields: fields, + keys: keys, + }); + result.topics.forEach(topic => modifyTopic(topic, fields)); + return result.topics; }; Topics.getTopicField = async function (tid, field) { diff --git a/src/views/admin/manage/ip-blacklist.tpl b/src/views/admin/manage/ip-blacklist.tpl index 62d0446ec4..da3fea162b 100644 --- a/src/views/admin/manage/ip-blacklist.tpl +++ b/src/views/admin/manage/ip-blacklist.tpl @@ -1,3 +1,5 @@ + +

@@ -40,7 +42,7 @@

- +
diff --git a/src/views/admin/manage/post-queue.tpl b/src/views/admin/manage/post-queue.tpl index 52e02fb9ee..decf23b657 100644 --- a/src/views/admin/manage/post-queue.tpl +++ b/src/views/admin/manage/post-queue.tpl @@ -1,3 +1,5 @@ + +