feat: use unread icon in mobile

isekai-main
Barış Soner Uşaklı 3 years ago
parent d30c316be9
commit 27e53b42f3

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

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

Loading…
Cancel
Save