Continue row: first line of the content, only on the plain overview
The row now sits below the search, filters and tags, directly above the grid. It hides while a search is typed or a status filter is set (as well as on "Recently read"); tags and collection grouping keep it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1ddefaa7ac
commit
41e7ed063e
3 files changed
+8
-8
No files matched your search
+6
-6
@@ -55,14 +55,12 @@
|
||||
h('option', { value: 'grouped' }, 'Group collections'), h('option', { value: 'expanded' }, 'Expand collections'), h('option', { value: 'individual' }, 'Individual manga'));
|
||||
grouping.value = ['grouped', 'expanded', 'individual'].includes(store.get('grouping')) ? store.get('grouping') : 'grouped';
|
||||
grouping.onchange = render;
|
||||
// Started but unfinished manga, most recently read first. Ignores the filters below on purpose,
|
||||
// and the same manga still appears in the grid.
|
||||
// Started but unfinished manga, most recently read first; the same manga still appear in the grid.
|
||||
const continueItems = data.mangas.filter(m => m.lastRead && m.read < m.chapters)
|
||||
.sort((a, b) => b.lastRead - a.lastRead).slice(0, 5);
|
||||
const continueRow = h('section', { class: 'continue-row', 'aria-label': 'Continue where you left off', hidden: true },
|
||||
h('div', { class: 'continue-banner' }, h('span', { 'aria-hidden': 'true' }, '▶'), 'Continue where you left off'),
|
||||
h('div', { class: 'continue-tiles' }, continueItems.map(m => tile(m))));
|
||||
main.append(continueRow);
|
||||
if (storyAvailable) {
|
||||
const most = data.mangas.find(manga => manga.id === data.reading.mostTimeMangaId);
|
||||
const latest = data.mangas.find(manga => manga.id === data.reading.lastMangaId);
|
||||
@@ -84,7 +82,7 @@
|
||||
h('div', { class: 'filter-heading' }, h('b', {}, 'Tags'), h('span', { class: 'muted small' }, 'Manga must match every selected tag')),
|
||||
tagBar) : null,
|
||||
resultCount),
|
||||
grid);
|
||||
continueRow, grid);
|
||||
|
||||
function syncTags() {
|
||||
store.set('tags', JSON.stringify([...selectedTags]));
|
||||
@@ -117,8 +115,10 @@
|
||||
|
||||
function render() {
|
||||
store.set('filter', filter.value); store.set('sort', sort.value); store.set('status', status.value); store.set('grouping', grouping.value);
|
||||
// "Recently read" already puts these first, so the row would only repeat them.
|
||||
continueRow.hidden = !me.settings.continueRow || sort.value === 'read' || !continueItems.length;
|
||||
// Only on the plain overview: a search or status filter means the reader is looking for something else,
|
||||
// and "Recently read" already puts these first. Tags and grouping keep it.
|
||||
continueRow.hidden = !me.settings.continueRow || !continueItems.length || sort.value === 'read'
|
||||
|| !!filter.value.trim() || !!status.value;
|
||||
const q = filter.value.trim().toLowerCase();
|
||||
const groups = (data.collections || []).filter(c => c.grouped);
|
||||
const membership = new Set(groups.flatMap(c => c.members.map(m => m.id)));
|
||||
|
||||
+1
-1
@@ -93,7 +93,7 @@
|
||||
section('user/reading').append(h('section', { class: 'card' },
|
||||
h('h2', {}, 'Library page'),
|
||||
check('continueRow', 'Show "Continue where you left off" at the top',
|
||||
'One row with the five manga you read most recently and have not finished. It hides itself while the library is sorted by "Recently read".')));
|
||||
'One row with the five manga you read most recently and have not finished. It hides itself while you search, filter by status, or sort by "Recently read".')));
|
||||
|
||||
section('user/reading').append(h('section', { class: 'card' },
|
||||
h('h2', {}, 'Chapter list dates'),
|
||||
|
||||
Reference in new issue
Block a user