feat: integrate system config

This commit is contained in:
2023-12-23 00:34:40 +01:00
parent f082d6eb65
commit 044e96eda4
140 changed files with 638 additions and 229 deletions

View File

@@ -0,0 +1,30 @@
const { App, Service, Utils } = ags;
const { execAsync, CONFIG_DIR } = Utils;
async function setupScss() {
try {
await execAsync(['sassc', `${CONFIG_DIR}/scss/main.scss`, `${CONFIG_DIR}/style.css`]);
App.resetCss();
App.applyCss(`${CONFIG_DIR}/style.css`);
} catch (error) {
print(error);
}
}
class ThemeService extends Service {
static { Service.register(this); }
constructor() {
super();
this.setup();
}
setup() {
setupScss();
}
}
var Theme = class Theme {
static { globalThis['Theme'] = this; }
static instance = new ThemeService();
};