The interface's words follow the style guide (#507)

docs/STYLE-GUIDE.md sets the rules: sentence case, "Unable to ..." and
what to do for a failure, podcast not show, address not URL, check not
scan, no dashes or symbols for words, buttons that start with a verb.
The page, admin, sign-in and the app's alert now follow it: the copy
failure, the download and sharing states, the feed's error label, the
DeadAir lines, the search boxes' clear buttons (which said only "Clear"),
the icon picker's Auto and Initials, the r key's "Refresh" (it reloads
the lists), the admin log's Scans tab. "add it in Settings" stays in
lower case: it is a link inside a sentence.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RqkrVCCH8YcP2Y3i8VNYWA
This commit is contained in:
2026-12-02 11:35:17 -05:00
parent 0bb7437541
commit 8261e52484
18 changed files with 219 additions and 37 deletions

View File

@@ -65,6 +65,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changed
- The page's words follow one style (docs/STYLE-GUIDE.md): failures say "Unable to …" and what to do, a podcast is a podcast rather than a show, a feed has an address rather than a URL, and the buttons Auto and Initials in a signal's icon picker read Pick for me and Use initials (#507).
- A title that is only the opening of an item's own text, as ipx now names an untitled item, is not shown again above that text in the reader or a directory preview (#502).
- A folder's triangle in the feed list is at its row's end, before the count, so every feed lines up with the places above at the list's edge, and on a phone Playlists' and Signals' + button sits beside the title rather than on a line of its own (#486, #487).
- On a phone, an episode's title starts at the row's edge: the read and pin buttons are gone from the row, an unread episode has a dot before its title and a pinned one a pin under it, and both are changed from the reader's actions (#484).

View File

@@ -28,7 +28,7 @@
<button id="tbFlag" title="Pin the selected item, so it is never deleted" aria-label="Pin" data-icon="pin" disabled></button>
</div>
<span class="grow"></span>
<span class="clearable" id="epBox"><input type="search" id="epSearch" placeholder="Search" aria-label="Search"><button type="button" class="clearx" title="Clear" aria-label="Clear" data-icon="close"></button></span>
<span class="clearable" id="epBox"><input type="search" id="epSearch" placeholder="Search" aria-label="Search"><button type="button" class="clearx" title="Clear the search" aria-label="Clear the search" data-icon="close"></button></span>
<div class="tgroup" id="admintools">
<button id="prefs" title="Settings" aria-label="Settings" data-icon="settings"></button>
<a id="admin" href="/admin" title="Admin: the server's settings, accounts and the log" aria-label="Admin" data-icon="admin"></a>
@@ -36,7 +36,7 @@
</header>
<div id="shell">
<aside id="sidebar">
<div class="searchwrap"><span class="clearable"><input type="search" id="feedFilter" placeholder="Filter feeds…" aria-label="Filter feeds"><button type="button" class="clearx" title="Clear" aria-label="Clear" data-icon="close"></button></span></div>
<div class="searchwrap"><span class="clearable"><input type="search" id="feedFilter" placeholder="Filter feeds…" aria-label="Filter feeds"><button type="button" class="clearx" title="Clear the filter" aria-label="Clear the filter" data-icon="close"></button></span></div>
<div id="feedlist"></div>
<div class="sidefoot">
<div class="who"><span id="who"></span><button id="signout" title="Sign out" aria-label="Sign out" data-icon="signout"></button></div>

View File

@@ -3,7 +3,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="color-scheme" content="dark light">
<title>Sign in — iPX</title>
<title>Sign in to iPX</title>
<link rel="icon" type="image/png" sizes="128x128" href="/favicon.png" media="(prefers-color-scheme:light)">
<link rel="icon" type="image/png" sizes="128x128" href="/favicon-dark.png" media="(prefers-color-scheme:dark)">
<link rel="apple-touch-icon" href="/apple-touch-icon.png">

View File

@@ -156,7 +156,7 @@ async function drawDirectoryStatus(){
const sh = s.shared;
if(sh){
const when = new Date(sh.at * 1000).toLocaleString();
lines.push(sh.error ? `Sharing failed at ${esc(when)}: ${esc(sh.error)}`
lines.push(sh.error ? `Unable to share at ${esc(when)}: ${esc(sh.error)}`
: `Shared ${plural(sh.accepted, 'feed')} at ${esc(when)}.` +
(sh.refused_private ? ` The directory refused ${plural(sh.refused_private, 'feed')} as private.` : '') +
(sh.refused_blocked ? ` ${plural(sh.refused_blocked, 'feed')} the directory has removed.` : ''));
@@ -272,7 +272,7 @@ function drawLogView(){
<div class="tabs" id="logtabs">
${Object.keys(LOG_TABS).map(t =>
`<button data-t="${t}" class="${logTab === t ? 'on' : ''}" title="${LOG_TAB_SAYS[t]}">${
{all: 'All', daemon: 'Daemon I/O', scan: 'Scans', web: 'HTTP'}[t]}</button>`).join('')}
{all: 'All', daemon: 'Daemon I/O', scan: 'Checks', web: 'HTTP'}[t]}</button>`).join('')}
</div></div>
<div class="logbar">
<select id="loglevel" aria-label="Level">

View File

@@ -35,8 +35,8 @@ $('#modal').onclick=(e: MouseEvent)=>{ if((e.target as Element).id==='modal') cl
$<HTMLButtonElement>('#addFeed').onclick=()=>{
openModal(`<h3>Add a feed</h3>
<div class="field"><label for="nurl">Feed URL</label><input type="text" id="nurl" placeholder="https://example.com/rss">
<span class="hint">A Patreon token on its own adds every show from that creator.</span></div>
<div class="field"><label for="nurl">Feed address</label><input type="text" id="nurl" placeholder="https://example.com/rss">
<span class="hint">A Patreon token on its own adds every podcast from that creator.</span></div>
<div class="field"><label for="nkw">Keywords (optional, comma separated)</label>
<input type="text" id="nkw"><span class="hint">Only items matching a keyword are downloaded.</span></div>
<label class="check"><input type="checkbox" id="nexp"> Allow items marked explicit</label>
@@ -459,7 +459,7 @@ function due(ts: number){
function deadSavedText(me: Me|null){
const s=me&&me.deadair_saved||0;
return s?`It has saved you ${spanText(s)} of dead air, on episodes you heard three quarters of or more.`
:'Turn it on in a show\'s settings, or beside the speed while it plays, to cut the dead air from it.';
:'Turn it on in a podcast\'s settings, or beside the speed while it plays, to cut the dead air from it.';
}
async function prefsModal(){
@@ -474,7 +474,7 @@ async function prefsModal(){
<div class="field" id="smodefield"${THEMES[theme.name].modes?'':' hidden'}><label for="smode">Light or dark</label>
<select id="smode">${Object.entries(MODES).map(([k,t])=>
`<option value="${k}"${theme.mode===k?' selected':''}>${esc(t)}</option>`).join('')}</select>
<span class="hint">Auto follows your system's light/dark setting.</span></div>
<span class="hint">Auto follows your system's light or dark setting.</span></div>
<div class="field"><label for="sfont">Interface font</label>
<select id="sfont">${Object.entries(FONTS).map(([k,t])=>
`<option value="${k}"${font===k?' selected':''}>${esc(t)}</option>`).join('')}</select></div>
@@ -654,7 +654,7 @@ function settingsModal(f: Feed, newUrl?: string){
// Each part named in a column of its own, the controls beside it (#290): the dialog had grown one
// captioned setting at a time into a single column three screens long on a phone.
const sect=(title: string, body: string)=>`<section class="fsec"><h4>${title}</h4><div class="fsecin">${body}</div></section>`;
const these=isGroup?'these shows':'this show';
const these=isGroup?'these podcasts':'this podcast';
// The places in the sidebar this show's items go to, drawn as the sidebar draws them (#288, #289).
const place=(id: string, key: 'hide_from_all'|'hide_from_signals', icon: string, title: string)=>{
const byList=f.group?S.feeds.find(g=>g.id===f.group&&g[key]):undefined;
@@ -712,7 +712,7 @@ function settingsModal(f: Feed, newUrl?: string){
// The download limit, said as what it does. A number in a box hid that it is a window on the
// newest items, not a pace through the back catalogue (#97).
const each=isGroup?' of each show':'';
const each=isGroup?' of each podcast':'';
const older=' Older ones stay listed, to download by hand.';
const caption=()=>mode==='newest'
? `Downloads the newest <input type="number" id="smax" min="1" value="${newest}"
@@ -809,7 +809,7 @@ function downloadLatestModal(f: Feed){
openModal(`<h3>Download latest items</h3>
<div class="field"><label for="dcount">How many of the newest undownloaded items?</label>
<input type="number" id="dcount" min="1" max="100" value="5">
<span class="hint">Queued immediately, ignoring the per-scan limit.</span></div>
<span class="hint">Downloaded now, past the limit on each check.</span></div>
<div class="cardacts"><button class="btn ico" onclick="closeModal()" title="Cancel" aria-label="Cancel">${ICON.close}</button>
<button class="btn ico primary" id="dgo" title="Download" aria-label="Download">${ICON.download}</button></div>`);
$<HTMLButtonElement>('#dgo').onclick=async()=>{

View File

@@ -31,7 +31,7 @@ function connect(){
// every pending bar at once, so adding a feed looked like it was fetching the lot.
const bar=document.querySelector<HTMLElement>(`.dlbar[data-bar="${ev.enclosure}"] i`);
if(bar){ bar.style.width=pct+'%'; bar.parentElement!.classList.add('live'); }
$('#count') && ($('#count').textContent=`downloading ${ev.file} — ${pct.toFixed(0)}%`);
$('#count') && ($('#count').textContent=`Downloading ${ev.file}: ${pct.toFixed(0)}%`);
}
else if(ev.ev==='download_done'){
const bar=document.querySelector(`.dlbar[data-bar="${ev.enclosure}"]`);

View File

@@ -181,11 +181,11 @@ function renderFeeds(){
// The mark sits on the artwork, the thing the eye scans the list by, and the line under
// the name says what is wrong in place of the counts.
`<span class="fart">${mine.length?folderArt(f,mine):artHTML(f.image,f.title||f.id)}`+
(err?`<span class="ferr" role="img" title="${esc(err)}" aria-label="Error: ${esc(err)}">${ICON.alert}</span>`:'')+
(err?`<span class="ferr" role="img" title="${esc(err)}" aria-label="Not updating: ${esc(err)}">${ICON.alert}</span>`:'')+
(f.pinned?`<span class="fpin" role="img" title="Pinned" aria-label="Pinned">${ICON.pinOn}</span>`:'')+`</span>`+
`<div class="txt"><b>${esc(f.title||f.id)}</b><small>`+
(nbad?`${plural(nbad,'feed')} not updating`
:err?esc(f.failing?.reason||'The last check failed')
:err?esc(f.failing?.reason||'Unable to read it at the last check')
:`${mine.length?plural(mine.length,'feed'):plural(eps,'item')} · ${saved} downloaded`)+
`</small></div>`+
(f.orphaned?'<span class="tag" title="No longer listed, kept because it has downloads">Gone</span>':'')+

View File

@@ -266,7 +266,7 @@ function kindIcon(enc: Enclosure){
const k=kindOf(enc);
const i=(<Record<string,string>>{audio:ICON.audio,video:ICON.video,image:ICON.image,pdf:ICON.doc,torrent:ICON.torrent})[k]||ICON.file;
const [cls,label]=enc.path ? [' here',`${k}, downloaded`]
: enc.state==='error' ? [' bad',`${k}, download failed${enc.last_error?': '+enc.last_error:''}`]
: enc.state==='error' ? [' bad',`${k}, unable to download${enc.last_error?': '+enc.last_error:''}`]
: ['',k];
return `<span class="kind${cls}" title="${esc(label)}" aria-label="${esc(label)}">${i}</span>`;
}
@@ -503,7 +503,7 @@ function whereText(x: Enclosure){
if(here) return 'On this device';
if(wanted.has(x.id)) return 'Downloading to iPX, then this device';
if(x.state==='pending') return 'Queued for iPX';
if(x.state==='error') return 'iPX could not download it';
if(x.state==='error') return 'Unable to download to iPX';
return 'Publisher only';
}
return here ? 'On iPX and this device' : busy ? 'On iPX, downloading to this device' : 'On iPX';
@@ -589,7 +589,7 @@ const shareAt=(url: string, secs: number)=>secs>=5 ? `${url}?t=${Math.floor(secs
function noLinkNote(why: string|null, url: string): string{
const notes: string[]=[];
if(why==='private') notes.push('This podcast\'s feed is private to you, so it gets no page anyone can play, and its file is never shared: this is the episode\'s own page.');
else if(why==='failed') notes.push('The page anyone can play could not be made just now, so this is the episode\'s own address. Try again later for a link to it.');
else if(why==='failed') notes.push('Unable to make a page anyone can play just now, so this is the episode\'s own address. Try again later for a link to it.');
if(carriesAccess(url)) notes.push(ACCESS_WARNING);
return notes.map(n=>`<p class="hint">${esc(n)}</p>`).join('');
}

View File

@@ -11,5 +11,5 @@ document.getElementById('f')!.onsubmit = async e => {
}),
});
if (r.ok) location.href = '/';
else msg.textContent = await r.text() || 'Sign in failed';
else msg.textContent = await r.text() || 'Unable to sign in. Check your name and password.';
};

View File

@@ -33,7 +33,7 @@ function setSrc(url: string): Promise<void>|null{
return ready.then(()=>{
// Its playlist and audio requests join the trace of the tap that played them (#192).
hls=new w.Hls({xhrSetup:(xhr: XMLHttpRequest)=>xhr.setRequestHeader('traceparent',traceparent())});
hls.on(w.Hls.Events.ERROR,(_: string,d: {fatal: boolean, type: string, details: string})=>{ if(d.fatal){ toast('Unable to play the DeadAir version. Try again, or turn DeadAir off for this show.',true);
hls.on(w.Hls.Events.ERROR,(_: string,d: {fatal: boolean, type: string, details: string})=>{ if(d.fatal){ toast('Unable to play the DeadAir version. Try again, or turn DeadAir off for this podcast.',true);
report('player_error',{msg:`hls.js: ${d.type} ${d.details}`,feed:player.feed,enclosure:player.enc}); } });
hls.loadSource(url); hls.attachMedia(audio);
});
@@ -247,7 +247,7 @@ function paintDead(){
if(!f||b.hidden) return;
b.setAttribute('aria-pressed',String(!!f.deadair));
b.innerHTML=tile(f.deadair?'deadair-on':'deadair-off');
b.title=f.deadair?'DeadAir is cutting the dead air from this show':'DeadAir: cut the dead air from this show';
b.title=f.deadair?'DeadAir is cutting the dead air from this podcast':'DeadAir: cut the dead air from this podcast';
}
$<HTMLButtonElement>('#pdead').onclick=async()=>{
const f=S.feeds.find(x=>x.id===player.feed); if(!f) return;
@@ -256,8 +256,8 @@ $<HTMLButtonElement>('#pdead').onclick=async()=>{
catch(err){ toast(why(err),true); return; }
f.deadair=on; paintDead();
const switched=await switchVersion();
toast(!on?'DeadAir is off for this show':switched?'DeadAir is cutting the dead air from this show'
:'DeadAir is on for this show. Episodes lose their dead air a few minutes after they download.');
toast(!on?'DeadAir is off for this podcast':switched?'DeadAir is cutting the dead air from this podcast'
:'DeadAir is on for this podcast. Episodes lose their dead air a few minutes after they download.');
renderEntries();
};
/// Carries on at the same place in the other version of what is playing, once DeadAir has been
@@ -352,7 +352,7 @@ function keysModal(){
[g('a'),'All Subscriptions'],[g('d'),'Directory'],
[g('u'),'Up Next'],[g('l'),'Currently Listening'],[g('s'),'Settings'],
[k('Shift')+' '+k('J'),'Next feed'],[k('Shift')+' '+k('K'),'Previous feed'],
[k('/'),'Search items, Currently Listening or the Directory'],[k('r'),'Refresh'],[k('['),'Show or hide the feed list'],
[k('/'),'Search items, Currently Listening or the Directory'],[k('r'),'Reload the lists'],[k('['),'Show or hide the feed list'],
['Items'],
[k('j')+' or '+k('n'),'Next item'],[k('k')+' or '+k('p'),'Previous item'],
[k('Shift')+' '+k('A'),'Mark all read'],

View File

@@ -144,8 +144,8 @@ function signalModal(sg?: Signal){
<input type="text" id="sgname" value="${esc(sg?.name||'')}" placeholder="Formula 1"></div>
<div id="sgpicker" hidden>
<div class="inline">${searchBox('<input type="search" id="sgiconq" placeholder="Search icons: robot, car, music…" autocomplete="off">')}
<button type="button" class="dlink" id="sgjev" title="Pick an icon for me">Auto</button>
<button type="button" class="dlink" id="sgnoicon">Initials</button></div>
<button type="button" class="dlink" id="sgjev" title="Pick an icon for me">Pick for me</button>
<button type="button" class="dlink" id="sgnoicon">Use initials</button></div>
<div class="icongrid" id="sgicons" role="listbox" aria-label="Icons"></div>
</div></div>
<div class="field"><label for="sgkwin">Listen for</label>

View File

@@ -114,7 +114,7 @@ for(const b of $$('[data-icon]')) b.insertAdjacentHTML('afterbegin',ICON[b.datas
/// A search box with an x at its right end that clears it, shown once something is typed (#291).
const searchBox=(input: string, cls='')=>
`<span class="clearable ${cls}">${input}<button type="button" class="clearx" title="Clear" aria-label="Clear">${ICON.close}</button></span>`;
`<span class="clearable ${cls}">${input}<button type="button" class="clearx" title="Clear the search" aria-label="Clear the search">${ICON.close}</button></span>`;
// Every box's x, wherever it is drawn: cleared as if the typing were deleted, so the box's own input
// handler runs and its list comes back whole.
document.addEventListener('click',(e: MouseEvent)=>{
@@ -204,7 +204,7 @@ async function api(url: string, opts?: RequestInit): Promise<any>{
// whole 502 page (#219). A 500's words are the daemon's own workings, which its log already
// has; they are not something to show the person who pressed the button (#304).
const said=!/html/.test(r.headers.get('Content-Type')||'')&&await r.text().catch(()=>'');
throw new Error(r.status===500 ? 'iPX could not do that just now. Try again in a minute.'
throw new Error(r.status===500 ? 'Unable to do that just now. Try again in a minute.'
: said || 'Unable to reach iPX just now. Try again in a minute.');
}
const pb=wireType(r.headers.get('Content-Type'));
@@ -237,7 +237,7 @@ async function copyText(text: string,btn?: HTMLElement){
flash(true);
}catch(e){
flash(false);
toast('Could not copy automatically — select the URL and copy it manually',true);
toast('Unable to copy the link. Select it and copy it yourself.',true);
}
}