Checkpoint the party/runtime stack before share-program and malicious-mode work.
Ship the TLS mesh, composer, Beaver/Yao/leaf MPC, prep/online paths, apps, and docs so the tree is pushable before elevating share_expr, security_mode, and prep resume. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
695f8e84f7
commit
0d22946a0e
1835 changed files with 170291 additions and 2849 deletions
|
|
@ -1,12 +1,52 @@
|
|||
// Toggle zwischen drei Theme-Zuständen und speichere im localStorage
|
||||
const THEME_CLASSES = ['theme-default', 'theme-round', 'theme-robot'];
|
||||
// Ermögliche das Umschalten per Button/Funktion (z.B. für onclick im HTML)
|
||||
function toggleThemeVariant() {
|
||||
let idx = getCurrentThemeIndex();
|
||||
idx = (idx + 1) % THEME_CLASSES.length;
|
||||
applyThemeClass(idx);
|
||||
}
|
||||
|
||||
let original_theme_active = true;
|
||||
// Funktion global verfügbar machen
|
||||
window.toggleThemeVariant = toggleThemeVariant;
|
||||
|
||||
function toggle_alternative_theme() {
|
||||
if(original_theme_active) {
|
||||
document.documentElement.classList.add("alternative")
|
||||
original_theme_active = false;
|
||||
} else {
|
||||
document.documentElement.classList.remove("alternative")
|
||||
original_theme_active = true;
|
||||
}
|
||||
}
|
||||
function getCurrentThemeIndex() {
|
||||
const stored = localStorage.getItem('theme-variant');
|
||||
if (stored === null) return 0;
|
||||
const idx = THEME_CLASSES.indexOf(stored);
|
||||
return idx === -1 ? 0 : idx;
|
||||
}
|
||||
|
||||
function applyThemeClass(idx) {
|
||||
document.documentElement.classList.remove(...THEME_CLASSES);
|
||||
if (THEME_CLASSES[idx] && THEME_CLASSES[idx] !== 'theme-default') {
|
||||
document.documentElement.classList.add(THEME_CLASSES[idx]);
|
||||
}
|
||||
localStorage.setItem('theme-variant', THEME_CLASSES[idx] || 'theme-default');
|
||||
// Select synchronisieren, falls vorhanden
|
||||
const select = document.getElementById('theme-select');
|
||||
if (select) select.value = THEME_CLASSES[idx];
|
||||
}
|
||||
|
||||
function setThemeByName(themeName) {
|
||||
const idx = THEME_CLASSES.indexOf(themeName);
|
||||
applyThemeClass(idx === -1 ? 0 : idx);
|
||||
}
|
||||
|
||||
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
const select = document.getElementById('theme-select');
|
||||
if (select) {
|
||||
// Initialisiere Auswahl aus localStorage
|
||||
const idx = getCurrentThemeIndex();
|
||||
select.value = THEME_CLASSES[idx];
|
||||
applyThemeClass(idx);
|
||||
// Theme bei Auswahl ändern
|
||||
select.addEventListener('change', e => {
|
||||
setThemeByName(e.target.value);
|
||||
});
|
||||
} else {
|
||||
// Fallback: Theme trotzdem setzen
|
||||
applyThemeClass(getCurrentThemeIndex());
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue