Publish Vulpes Preview 15 sources for desktop, Android and Tundra

Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
This commit is contained in:
OverSu 2026-09-30 23:13:03 +02:00
commit b38dea0597
25901 changed files with 9982925 additions and 369 deletions

28
services/screen-power.mjs Normal file
View file

@ -0,0 +1,28 @@
// Preserve power transitions; coalesce brightness steps while hardware is busy.
export class ScreenPower {
constructor(state, apply) {
this.state = state;
this.apply = apply;
this.pending = Promise.resolve();
this.tail = null;
}
set(name, value) {
if (name === 'screenBrightness' && this.tail?.name === name && !this.tail.started) {
this.tail.value = value;
return this.tail.promise;
}
const queued = {name, value, started:false};
const operation = this.pending.then(async () => {
queued.started = true;
if (this.tail === queued) this.tail = null;
const next = {...this.state, [name]:queued.value};
await this.apply(next, name);
Object.assign(this.state, next);
return {...this.state};
});
queued.promise = operation;
this.tail = queued;
this.pending = operation.catch(() => {});
return operation;
}
}