mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-22 19:52:14 -08:00
b435f7a485
Relocated athshield files to app/assets/athshield for better organization and maintainability. This change improves the project's folder structure and simplifies file management.
33 lines
815 B
JavaScript
33 lines
815 B
JavaScript
const fs = require('fs')
|
|
const path = require('path')
|
|
|
|
// Chemin vers le fichier de configuration
|
|
const configPath = path.join(__dirname, 'variables.athshield')
|
|
|
|
// Classe pour gérer Athena's Shield
|
|
class AthenaShield {
|
|
constructor() {
|
|
this.config = this.loadConfig()
|
|
}
|
|
|
|
// Charger les variables depuis le fichier
|
|
loadConfig() {
|
|
const rawData = fs.readFileSync(configPath)
|
|
return JSON.parse(rawData.toString())
|
|
}
|
|
|
|
// Récupérer le statut d'Athena's Shield
|
|
get status() {
|
|
return this.config.athenaShieldActivated
|
|
}
|
|
|
|
// Récupérer la visibilité du menu
|
|
get view() {
|
|
return this.config.menuVisibility
|
|
}
|
|
}
|
|
|
|
// Exporter une instance de la classe
|
|
const athenaShieldInstance = new AthenaShield()
|
|
module.exports = athenaShieldInstance
|