fix(ags-v3): audit fixes — portable brain path, reactive volume, SCSS dedup
- brain.ts: BRAIN_ROOT résolu via $BRAIN_ROOT env / ~/.config/brain-path / fallback ~/Dev/Brain - Volume.tsx: bindings volume + mute séparés et réactifs - style.scss: importe _bar.scss et _heartbeat.scss via @use, supprime 199 lignes dupliquées
This commit is contained in:
@@ -4,7 +4,10 @@ import { createBinding } from "ags"
|
||||
export default function Volume() {
|
||||
const speaker = AstalWp.get_default()!.defaultSpeaker!
|
||||
|
||||
const text = createBinding(speaker, "volume")((v: number) => {
|
||||
const volume = createBinding(speaker, "volume")
|
||||
const mute = createBinding(speaker, "mute")
|
||||
|
||||
const text = volume((v: number) => {
|
||||
const pct = Math.round(v * 100)
|
||||
const muted = speaker.mute
|
||||
let icon = ""
|
||||
@@ -16,7 +19,7 @@ export default function Volume() {
|
||||
return `${icon} ${pct}%`
|
||||
})
|
||||
|
||||
const cls = createBinding(speaker, "mute")((m: boolean) =>
|
||||
const cls = mute((m: boolean) =>
|
||||
m ? "volume muted" : "volume"
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user