From a3909860d200ead308c6a629e2061bd9679a8708 Mon Sep 17 00:00:00 2001 From: kirillius Date: Thu, 5 Jun 2025 14:17:51 +0300 Subject: [PATCH] hotfix update custom config --- plugins/custom/Custom.php | 4 ++-- plugins/custom/plugin.js | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/custom/Custom.php b/plugins/custom/Custom.php index a6e2bec..8b7e9da 100755 --- a/plugins/custom/Custom.php +++ b/plugins/custom/Custom.php @@ -14,9 +14,9 @@ class Custom extends Plugin $this->updateConfigFile(); } - private function updateConfigFile() + public function updateConfigFile() { - $path = dirname(__DIR__) . "/networks/custom.json"; + $path = dirname(__DIR__, 2) . "/networks/custom.json"; $current_config = @file_get_contents($path); $new_config = json_encode($this->config); if($current_config !== $new_config) { diff --git a/plugins/custom/plugin.js b/plugins/custom/plugin.js index e69de29..8381818 100644 --- a/plugins/custom/plugin.js +++ b/plugins/custom/plugin.js @@ -0,0 +1,5 @@ +import {App} from "/assets/App.js"; + +(async function(){ + await App.RPC.__invoke("custom::updateConfigFile") +})(); \ No newline at end of file