Files
AstrBot/dashboard/routes/static_file.py
T
Soulter 5221566335 refactor: dashboard backend, frontend
fix: 仪表盘部分配置不显示
2024-10-04 00:04:34 +08:00

14 lines
487 B
Python

from .. import Route
from quart import Quart
from type.types import Context
class StaticFileRoute(Route):
def __init__(self, context: Context, app: Quart) -> None:
super().__init__(context, app)
index_ = ['/', '/auth/login', '/config', '/logs', '/extension', '/dashboard/default']
for i in index_:
self.app.add_url_rule(i, view_func=self.index)
async def index(self):
return await self.app.send_static_file('index.html')