feat: use unread icon in mobile

This commit is contained in:
Barış Soner Uşaklı
2021-10-06 12:58:34 -04:00
parent d30c316be9
commit 27e53b42f3
2 changed files with 4 additions and 3 deletions

View File

@@ -30,7 +30,7 @@ define('categorySelector', [
selector.selectCategory(categoryEl.attr('data-cid'));
onSelect(selector.selectedCategory);
});
const defaultSelectHtml = selector.el.find('[component="category-selector-selected"]').html();
selector.selectCategory = function (cid) {
var categoryEl = selector.el.find('[data-cid="' + cid + '"]');
selector.selectedCategory = {
@@ -43,8 +43,8 @@ define('categorySelector', [
categoryEl.find('[component="category-markup"]').html()
);
} else {
selector.el.find('[component="category-selector-selected"]').translateHtml(
options.selectCategoryLabel || '[[topic:thread_tools.select_category]]'
selector.el.find('[component="category-selector-selected"]').html(
defaultSelectHtml
);
}
};

View File

@@ -49,6 +49,7 @@ unreadController.get = async function (req, res) {
data.selectedCategory = categoryData.selectedCategory;
data.selectedCids = categoryData.selectedCids;
data.selectCategoryLabel = '[[unread:mark_as_read]]';
data.selectCategoryIcon = 'fa-inbox';
if (req.originalUrl.startsWith(`${nconf.get('relative_path')}/api/unread`) || req.originalUrl.startsWith(`${nconf.get('relative_path')}/unread`)) {
data.title = '[[pages:unread]]';
data.breadcrumbs = helpers.buildBreadcrumbs([{ text: '[[unread:title]]' }]);