Lighten the website and make it more accessible
- Serve the hero images as WebP at their display size: 118 KB and 55 KB instead of 3.5 MB and 1.4 MB. - Add a favicon, an apple-touch icon, a description and a theme colour. - Announce status messages to screen readers and label the move buttons. - Offer "Se souvenir de moi" to keep the password on the device, and keep working when browser storage is unavailable. - Fix typos in the jukebox introduction. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
362c7772ba
commit
d200040691
11 changed files with 66 additions and 14 deletions
|
|
@ -5,6 +5,7 @@ import {
|
|||
getStoredApiKey,
|
||||
getStoredDisplayName,
|
||||
formatBytes,
|
||||
isApiKeyRemembered,
|
||||
formatDate,
|
||||
setStoredApiKey,
|
||||
setStoredDisplayName,
|
||||
|
|
@ -22,6 +23,7 @@ const state = {
|
|||
const elements = {
|
||||
status: document.getElementById("status"),
|
||||
apiKeyInput: document.getElementById("apiKey"),
|
||||
rememberKeyCheckbox: document.getElementById("rememberKey"),
|
||||
displayNameInput: document.getElementById("displayName"),
|
||||
settingsForm: document.getElementById("settingsForm"),
|
||||
uploadForm: document.getElementById("uploadForm"),
|
||||
|
|
@ -171,8 +173,8 @@ function renderQueue() {
|
|||
</div>
|
||||
</div>
|
||||
<div class="media-item__actions">
|
||||
<button class="btn btn--secondary" data-action="up" data-track="${track.id}">▲</button>
|
||||
<button class="btn btn--secondary" data-action="down" data-track="${track.id}">▼</button>
|
||||
<button class="btn btn--secondary" data-action="up" data-track="${track.id}" aria-label="Monter" title="Monter">▲</button>
|
||||
<button class="btn btn--secondary" data-action="down" data-track="${track.id}" aria-label="Descendre" title="Descendre">▼</button>
|
||||
<button class="btn btn--danger" data-action="remove" data-track="${track.id}">Supprimer</button>
|
||||
</div>
|
||||
`;
|
||||
|
|
@ -312,7 +314,9 @@ function bindEvents() {
|
|||
event.preventDefault();
|
||||
state.apiKey = elements.apiKeyInput.value.trim();
|
||||
state.displayName = elements.displayNameInput.value.trim();
|
||||
setStoredApiKey(state.apiKey);
|
||||
setStoredApiKey(state.apiKey, {
|
||||
remember: elements.rememberKeyCheckbox?.checked,
|
||||
});
|
||||
setStoredDisplayName(state.displayName);
|
||||
setStatus("Paramètres sauvegardés", "success");
|
||||
refreshAll({ silent: true });
|
||||
|
|
@ -403,6 +407,9 @@ function bindEvents() {
|
|||
function initialize() {
|
||||
elements.apiKeyInput.value = state.apiKey;
|
||||
elements.displayNameInput.value = state.displayName;
|
||||
if (elements.rememberKeyCheckbox) {
|
||||
elements.rememberKeyCheckbox.checked = isApiKeyRemembered();
|
||||
}
|
||||
bindEvents();
|
||||
updatePauseResumeButton();
|
||||
refreshAll();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue