style: auto-fix linting issues

This commit is contained in:
edideaur 2026-03-06 08:57:13 +00:00 committed by github-actions[bot]
parent c986921505
commit f6bc60bd5e
5 changed files with 25 additions and 28 deletions

View file

@ -2332,7 +2332,7 @@
</div> </div>
</div> </div>
<div id="home-view-explore" class="home-view" style="display: none;"> <div id="home-view-explore" class="home-view" style="display: none">
<div id="explore-content"> <div id="explore-content">
<div class="card-grid" id="explore-grid"></div> <div class="card-grid" id="explore-grid"></div>
</div> </div>

View file

@ -84,10 +84,7 @@ export class AuthManager {
async sendPasswordReset(email) { async sendPasswordReset(email) {
try { try {
await auth.createRecovery( await auth.createRecovery(email, window.location.origin + '/reset-password.html');
email,
window.location.origin + '/reset-password.html'
);
alert(`Password reset email sent to ${email}`); alert(`Password reset email sent to ${email}`);
} catch (error) { } catch (error) {
console.error('Password reset failed:', error); console.error('Password reset failed:', error);
@ -115,9 +112,9 @@ export class AuthManager {
} }
updateUI(user) { updateUI(user) {
const connectBtn = document.getElementById('firebase-connect-btn'); const connectBtn = document.getElementById('firebase-connect-btn');
const clearDataBtn = document.getElementById('firebase-clear-cloud-btn'); const clearDataBtn = document.getElementById('firebase-clear-cloud-btn');
const statusText = document.getElementById('firebase-status'); const statusText = document.getElementById('firebase-status');
const emailContainer = document.getElementById('email-auth-container'); const emailContainer = document.getElementById('email-auth-container');
const emailToggleBtn = document.getElementById('toggle-email-auth-btn'); const emailToggleBtn = document.getElementById('toggle-email-auth-btn');
@ -128,10 +125,10 @@ export class AuthManager {
connectBtn.textContent = 'Sign Out'; connectBtn.textContent = 'Sign Out';
connectBtn.classList.add('danger'); connectBtn.classList.add('danger');
connectBtn.onclick = () => this.signOut(); connectBtn.onclick = () => this.signOut();
if (clearDataBtn) clearDataBtn.style.display = 'none'; if (clearDataBtn) clearDataBtn.style.display = 'none';
if (emailContainer) emailContainer.style.display = 'none'; if (emailContainer) emailContainer.style.display = 'none';
if (emailToggleBtn) emailToggleBtn.style.display = 'none'; if (emailToggleBtn) emailToggleBtn.style.display = 'none';
if (statusText) statusText.textContent = user ? `Signed in as ${user.email}` : 'Signed in'; if (statusText) statusText.textContent = user ? `Signed in as ${user.email}` : 'Signed in';
const accountPage = document.getElementById('page-account'); const accountPage = document.getElementById('page-account');
if (accountPage) { if (accountPage) {
@ -161,20 +158,20 @@ export class AuthManager {
connectBtn.classList.add('danger'); connectBtn.classList.add('danger');
connectBtn.onclick = () => this.signOut(); connectBtn.onclick = () => this.signOut();
if (clearDataBtn) clearDataBtn.style.display = 'block'; if (clearDataBtn) clearDataBtn.style.display = 'block';
if (emailContainer) emailContainer.style.display = 'none'; if (emailContainer) emailContainer.style.display = 'none';
if (emailToggleBtn) emailToggleBtn.style.display = 'none'; if (emailToggleBtn) emailToggleBtn.style.display = 'none';
if (statusText) statusText.textContent = `Signed in as ${user.email}`; if (statusText) statusText.textContent = `Signed in as ${user.email}`;
} else { } else {
connectBtn.textContent = 'Connect with Google'; connectBtn.textContent = 'Connect with Google';
connectBtn.classList.remove('danger'); connectBtn.classList.remove('danger');
connectBtn.onclick = () => this.signInWithGoogle(); connectBtn.onclick = () => this.signInWithGoogle();
if (clearDataBtn) clearDataBtn.style.display = 'none'; if (clearDataBtn) clearDataBtn.style.display = 'none';
if (emailToggleBtn) emailToggleBtn.style.display = 'inline-block'; if (emailToggleBtn) emailToggleBtn.style.display = 'inline-block';
if (statusText) statusText.textContent = 'Sync your library across devices'; if (statusText) statusText.textContent = 'Sync your library across devices';
} }
} }
} }
export const authManager = new AuthManager(); export const authManager = new AuthManager();

View file

@ -1,12 +1,14 @@
// js/accounts/config.js // js/accounts/config.js
import { Client, Account } from 'appwrite'; import { Client, Account } from 'appwrite';
const client = new Client() const client = new Client().setEndpoint('https://auth.samidy.xyz/v1').setProject('auth-for-monochrome');
.setEndpoint('https://auth.samidy.xyz/v1')
.setProject('auth-for-monochrome');
const account = new Account(client); const account = new Account(client);
export { client, account as auth }; export { client, account as auth };
export const saveFirebaseConfig = () => { console.log("ill fix this tomorrow"); }; export const saveFirebaseConfig = () => {
export const clearFirebaseConfig = () => { console.log("ill fix this tomorrow"); }; console.log('ill fix this tomorrow');
};
export const clearFirebaseConfig = () => {
console.log('ill fix this tomorrow');
};

View file

@ -1768,15 +1768,13 @@ export class UIRenderer {
const genresGrid = document.createElement('div'); const genresGrid = document.createElement('div');
genresGrid.className = 'card-grid'; genresGrid.className = 'card-grid';
genresGrid.innerHTML = GENRES genresGrid.innerHTML = GENRES.map(
.map( (genre) => `
(genre) => `
<div class="card genre-card" data-genre-id="${genre.id}" data-genre-name="${escapeHtml(genre.name)}" style="cursor: pointer; background: var(--secondary); padding: 1.5rem; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 100px; border-radius: var(--radius); border: 1px solid var(--border);"> <div class="card genre-card" data-genre-id="${genre.id}" data-genre-name="${escapeHtml(genre.name)}" style="cursor: pointer; background: var(--secondary); padding: 1.5rem; display: flex; align-items: center; justify-content: center; text-align: center; min-height: 100px; border-radius: var(--radius); border: 1px solid var(--border);">
<h3 style="margin: 0; font-size: 1.1rem; font-weight: 600;">${escapeHtml(genre.name)}</h3> <h3 style="margin: 0; font-size: 1.1rem; font-weight: 600;">${escapeHtml(genre.name)}</h3>
</div> </div>
` `
) ).join('');
.join('');
genresSection.appendChild(genresGrid); genresSection.appendChild(genresGrid);
container.appendChild(genresSection); container.appendChild(genresSection);

View file

@ -114,9 +114,9 @@ export class KawarpPreset {
// Cache buster forces a fresh CORS request, bypassing the browser's // Cache buster forces a fresh CORS request, bypassing the browser's
// cached non-CORS response from the <img> tag (same pattern as ui.js) // cached non-CORS response from the <img> tag (same pattern as ui.js)
const sep = url.includes('?') ? '&' : '?'; const sep = url.includes('?') ? '&' : '?';
this.kawarp.loadImage(`${url}${sep}not-from-cache-please`).catch((err) => this.kawarp
console.warn('[Kawarp] Failed to load cover:', err), .loadImage(`${url}${sep}not-from-cache-please`)
); .catch((err) => console.warn('[Kawarp] Failed to load cover:', err));
} }
resize(_w, _h) { resize(_w, _h) {