auto closing plugin loader
This commit is contained in:
@@ -2,7 +2,7 @@ from textual_window import Window
|
|||||||
from textual.widgets import RichLog
|
from textual.widgets import RichLog
|
||||||
from textual import work
|
from textual import work
|
||||||
|
|
||||||
import os, json
|
import os, json, asyncio
|
||||||
|
|
||||||
|
|
||||||
class PluginLoader(Window):
|
class PluginLoader(Window):
|
||||||
@@ -11,8 +11,8 @@ class PluginLoader(Window):
|
|||||||
id="Plugin Loader",
|
id="Plugin Loader",
|
||||||
mode="permanent",
|
mode="permanent",
|
||||||
icon="⚙️",
|
icon="⚙️",
|
||||||
starting_horizontal="centerright",
|
starting_horizontal="right",
|
||||||
starting_vertical="lowermiddle",
|
starting_vertical="bottom",
|
||||||
start_open=True
|
start_open=True
|
||||||
)
|
)
|
||||||
|
|
||||||
@@ -72,6 +72,8 @@ class PluginLoader(Window):
|
|||||||
log.write(f"[b green]FOUND[/] {plugin_json['name']} ({plugin_json['version']})")
|
log.write(f"[b green]FOUND[/] {plugin_json['name']} ({plugin_json['version']})")
|
||||||
plugin_paths.append(plugin_folder)
|
plugin_paths.append(plugin_folder)
|
||||||
|
|
||||||
|
log.write("\n[d]Window will automatically close in 5 seconds.[/]")
|
||||||
|
await asyncio.sleep(5.0)
|
||||||
self.close_window()
|
self.close_window()
|
||||||
|
|
||||||
async def on_mount(self):
|
async def on_mount(self):
|
||||||
|
|||||||
Reference in New Issue
Block a user