HeliosLauncher/app/assets/athshield/parserAthShield.js
Sandro642 fc5a2d4b8d Rename view method to type and integrate athShield in settings
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`.
2024-10-24 18:00:00 +02:00

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