feat(credits): solde IA unique (option M), packs Stripe et polish billing
Un pot de crédits global (BASIC 100 / PRO 1 000 / BUSINESS 4 000) remplace les seaux par fonction côté débit. Packs one-shot S/M/L, admin sans seaux legacy, usage multi-features, hints de coût, anti-flash thème et hydratation admin. Inclut aussi le pipeline slides renforcé et la page publique polishée.
This commit is contained in:
@@ -21,18 +21,40 @@
|
||||
blue: 1,
|
||||
};
|
||||
var theme = allowed[raw] ? raw : 'light';
|
||||
root.classList.remove('dark');
|
||||
root.removeAttribute('data-theme');
|
||||
|
||||
// Synchroniser le cookie pour les prochains rendus serveur (anti-flash)
|
||||
try {
|
||||
document.cookie =
|
||||
'memento-theme=' +
|
||||
encodeURIComponent(theme) +
|
||||
'; path=/; max-age=31536000; SameSite=Lax';
|
||||
if (!stored) localStorage.setItem('theme-preference', theme);
|
||||
} catch (e) {
|
||||
/* ignore */
|
||||
}
|
||||
|
||||
// Ne jamais retirer .dark avant de le remettre
|
||||
var wantsDark = false;
|
||||
if (theme === 'auto') {
|
||||
if (window.matchMedia('(prefers-color-scheme: dark)').matches) root.classList.add('dark');
|
||||
} else if (theme === 'dark') {
|
||||
wantsDark = window.matchMedia('(prefers-color-scheme: dark)').matches;
|
||||
} else if (theme === 'dark' || theme === 'midnight') {
|
||||
wantsDark = true;
|
||||
}
|
||||
|
||||
if (wantsDark) {
|
||||
root.classList.add('dark');
|
||||
} else if (theme === 'light') {
|
||||
/* :root papier */
|
||||
} else {
|
||||
root.classList.remove('dark');
|
||||
}
|
||||
|
||||
if (theme === 'auto' || theme === 'dark' || theme === 'light') {
|
||||
root.removeAttribute('data-theme');
|
||||
} else {
|
||||
root.setAttribute('data-theme', theme);
|
||||
if (theme === 'midnight') root.classList.add('dark');
|
||||
}
|
||||
|
||||
root.setAttribute('data-applied-theme', theme);
|
||||
|
||||
var accentStored = localStorage.getItem('accent-color');
|
||||
var effectiveAccent = accentStored || defaultAccent;
|
||||
root.style.setProperty('--color-brand-accent', effectiveAccent);
|
||||
|
||||
Reference in New Issue
Block a user