Say nothing in an empty list or an empty reader

Asked for: "Nothing here yet — try Scan now." and "Pick an item to read it." are gone. A search
that finds nothing still says so, as the words typed are the reason.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-10-09 12:50:22 +00:00
parent e3f0267814
commit cb92d5e355
3 changed files with 5 additions and 3 deletions

View File

@@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed ### Changed
- An empty list and the reader with nothing picked say nothing, instead of "Nothing here yet — try Scan now." and "Pick an item to read it."; a search that finds nothing still says so.
- In Settings, the API tokens sit in a box of their own. - In Settings, the API tokens sit in a box of their own.
- A feed's settings are redesigned: downloading on its own is a switch with what depends on it beneath, how many is Default, Newest or All shown on a strip of the show's own episodes, words to pick or hide are chips, the feed's address is at the top with a copy button, and Save is always in reach. Its folder and Directory category are no longer in it. - A feed's settings are redesigned: downloading on its own is a switch with what depends on it beneath, how many is Default, Newest or All shown on a strip of the show's own episodes, words to pick or hide are chips, the feed's address is at the top with a copy button, and Save is always in reach. Its folder and Directory category are no longer in it.
- The feed list's traces show each of its database queries, so it can be told where its time goes. - The feed list's traces show each of its database queries, so it can be told where its time goes.

View File

@@ -157,7 +157,7 @@ test('the three panes are there and the item text lands in the bottom one', asyn
await page.locator('.feed', { hasText: 'Test Show' }).click(); await page.locator('.feed', { hasText: 'Test Show' }).click();
await expect(page.locator('#list')).toBeVisible(); await expect(page.locator('#list')).toBeVisible();
await expect(page.locator('#grab')).toBeVisible(); // the draggable divider await expect(page.locator('#grab')).toBeVisible(); // the draggable divider
await expect(page.locator('#detail')).toContainText('Pick an item'); await expect(page.locator('#detail .dt')).toHaveCount(0); // nothing picked, nothing said
await page.locator('.ep', { hasText: 'First Episode' }).click(); await page.locator('.ep', { hasText: 'First Episode' }).click();
await expect(page.locator('#detail .dt')).toHaveText('First Episode'); await expect(page.locator('#detail .dt')).toHaveText('First Episode');

View File

@@ -39,7 +39,8 @@ function renderEntries(){
const pane=$('#list'), top=pane?pane.scrollTop:0; const pane=$('#list'), top=pane?pane.scrollTop:0;
box.innerHTML=''; box.innerHTML='';
if(!S.entries.length){ if(!S.entries.length){
box.innerHTML=`<p class="empty">${S.q?'Nothing matches that search.':'Nothing here yet — try Scan now.'}</p>`; // Said only for a search, where the words typed are why; an empty feed or tab speaks for itself.
if(S.q) box.innerHTML='<p class="empty">Nothing matches that search.</p>';
return; return;
} }
for(const e of S.entries) box.appendChild(epEl(e)); for(const e of S.entries) box.appendChild(epEl(e));
@@ -265,7 +266,7 @@ function showDetail(e){
syncTools(e); syncTools(e);
if(!e){ if(!e){
dropTurned(S.sel); dropTurned(S.sel);
box.innerHTML='<p class="empty">Pick an item to read it.</p>'; box.innerHTML='';
if(files) files.innerHTML='<p class="empty">No files</p>'; if(files) files.innerHTML='<p class="empty">No files</p>';
return; return;
} }