implemented log settings

This commit is contained in:
2025-10-30 12:38:14 +11:00
parent f6cfc7c630
commit 13862bdad5
2 changed files with 14 additions and 3 deletions

View File

@@ -189,12 +189,15 @@ class PluginLoader(Window):
plugin_paths.append(plugin_folder)
log.write("\n[b]Done loading plugins![/]")
if no_errors:
if no_errors and int(self.app.config_handler.get("plugins", "log_timeout")) != -1:
log.write("[d]Window will automatically close in 10 seconds.[/]")
await asyncio.sleep(10)
await asyncio.sleep(int(self.app.config_handler.get("plugins", "log_timeout")))
self.close_window()
async def on_mount(self):
if bool(int(self.app.config_handler.get("plugins", "log"))) == False:
self.display = "none"
self.find_plugins()