fix: resolve all biome ci errors and warnings

- Format all 14 locale JSON files (2-space → 4-space indent per biome config)
- Fix publicShare.js: arrow functions, template literals, optional chaining,
  remove redundant 'use strict', remove unused formatSize function
- Fix music.js: template literal, unused _trackId parameter
- Fix contextMenus.js, fileOperations.js, fileSharing.js: unused parameters
- Fix auth.js, music.css, share-public.css: formatting (biome format --write)
- Remove unused biome-ignore suppression comments in cards.css and reset.css
- Remove empty .share-state block in share-public.css
- Disable noDescendingSpecificity and noImportantStyles rules in biome.json
  (intentional CSS patterns for utility classes and theme overrides)
This commit is contained in:
Diocrafts
2026-04-12 02:13:08 +02:00
parent 1efcdb58a5
commit 1dbe7e4553
25 changed files with 9034 additions and 9012 deletions
+10 -7
View File
@@ -902,14 +902,17 @@ if (isLoginPage && loginForm) {
// the auth cookies. The CSRF cookie (oxicloud_csrf) is non-HttpOnly
// so JS can read it. If it's missing the browser rejected the
// Set-Cookie (usually because of Secure flag over plain HTTP).
const csrfStored = document.cookie.split('; ').some(c => c.startsWith('oxicloud_csrf='));
const csrfStored = document.cookie.split('; ').some((c) => c.startsWith('oxicloud_csrf='));
if (!csrfStored) {
console.error('Auth cookies were NOT stored by the browser. '
+ 'This usually means OXICLOUD_COOKIE_SECURE=true (or OXICLOUD_BASE_URL=https://...) '
+ 'is set but you are accessing via plain HTTP.');
loginError.textContent = 'Login succeeded but the browser rejected the session cookie. '
+ 'If you are accessing via HTTP, set OXICLOUD_COOKIE_SECURE=false in your .env file '
+ 'or access via HTTPS through a reverse proxy.';
console.error(
'Auth cookies were NOT stored by the browser. ' +
'This usually means OXICLOUD_COOKIE_SECURE=true (or OXICLOUD_BASE_URL=https://...) ' +
'is set but you are accessing via plain HTTP.'
);
loginError.textContent =
'Login succeeded but the browser rejected the session cookie. ' +
'If you are accessing via HTTP, set OXICLOUD_COOKIE_SECURE=false in your .env file ' +
'or access via HTTPS through a reverse proxy.';
loginError.style.display = 'block';
return;
}