mirror of
https://github.com/dscalzi/HeliosLauncher.git
synced 2024-12-23 04:02:14 -08:00
fc5a2d4b8d
Renamed the `view` method to `type` in parserAthShield.js to better reflect its purpose. Removed unused `athShield` import from landing.js and added it to settings.js. Added a manageModCategory function in settings.js to manage the display and interaction state of the Mods tab based on the type of `athShield`.
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 type() {
|
|
return this.config.menuVisibility
|
|
}
|
|
}
|
|
|
|
// Exporter une instance de la classe
|
|
const athenaShieldInstance = new AthenaShield()
|
|
module.exports = athenaShieldInstance
|