feat: Telegram fleet alerts, forge sigil scramble, UI polish, agent ops
- Calibrate: per-event Telegram/SMTP toggles, test notification, chat ID help - Notify on agent connect/reconnect, offline/hashrate/rejection, forge complete - Sigil scramble post-forge uniquification and Dispense Reveal ceremony - Full system check, desktop push, BITS/host-binary persistence, Path Tracer - Dashboard/Crucible visual polish, haptics, sacred geometry, mobile nav - README documents alerts, sigil scramble, and pack-usb workflow - USB bundle repacked via pack-usb.bat (AetherForge.exe + synced agent source)
This commit is contained in:
53
server/web/src/context/VisualEffectsContext.tsx
Normal file
53
server/web/src/context/VisualEffectsContext.tsx
Normal file
@@ -0,0 +1,53 @@
|
||||
import React, { createContext, useCallback, useContext, useEffect, useMemo, useState } from 'react';
|
||||
import {
|
||||
dispatchVisualPrefsChange,
|
||||
loadGlowParticlesEnabled,
|
||||
saveGlowParticlesEnabled,
|
||||
VISUAL_PREFS_EVENT,
|
||||
} from '../visual/visualPrefs';
|
||||
|
||||
type VisualEffectsContextValue = {
|
||||
glowParticles: boolean;
|
||||
setGlowParticles: (v: boolean) => void;
|
||||
};
|
||||
|
||||
const VisualEffectsContext = createContext<VisualEffectsContextValue | null>(null);
|
||||
|
||||
export function VisualEffectsProvider({ children }: { children: React.ReactNode }) {
|
||||
const [glowParticles, setGlowState] = useState(loadGlowParticlesEnabled);
|
||||
|
||||
const setGlowParticles = useCallback((v: boolean) => {
|
||||
saveGlowParticlesEnabled(v);
|
||||
setGlowState(v);
|
||||
dispatchVisualPrefsChange();
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
const sync = () => setGlowState(loadGlowParticlesEnabled());
|
||||
window.addEventListener(VISUAL_PREFS_EVENT, sync);
|
||||
return () => window.removeEventListener(VISUAL_PREFS_EVENT, sync);
|
||||
}, []);
|
||||
|
||||
const value = useMemo(
|
||||
() => ({ glowParticles, setGlowParticles }),
|
||||
[glowParticles, setGlowParticles]
|
||||
);
|
||||
|
||||
return (
|
||||
<VisualEffectsContext.Provider value={value}>{children}</VisualEffectsContext.Provider>
|
||||
);
|
||||
}
|
||||
|
||||
export function useVisualEffects(): VisualEffectsContextValue {
|
||||
const ctx = useContext(VisualEffectsContext);
|
||||
if (!ctx) {
|
||||
return {
|
||||
glowParticles: loadGlowParticlesEnabled(),
|
||||
setGlowParticles: (v) => {
|
||||
saveGlowParticlesEnabled(v);
|
||||
dispatchVisualPrefsChange();
|
||||
},
|
||||
};
|
||||
}
|
||||
return ctx;
|
||||
}
|
||||
Reference in New Issue
Block a user