mirror of
https://github.com/nirvana-7777/script.service.ultimate.git
synced 2026-09-23 01:22:17 +02:00
Add web config
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Ultimate Backend Configuration</title>
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
|
||||
<link rel="stylesheet" href="./config.css">
|
||||
<link rel="stylesheet" href="/config.css">
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
@@ -148,6 +148,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script src="./config.js"></script>
|
||||
<script src="/config.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
+14
@@ -1850,6 +1850,20 @@ class UltimateService:
|
||||
response.content_type = 'text/html; charset=utf-8'
|
||||
return self.config_html
|
||||
|
||||
@app.route('/config.css')
|
||||
def serve_config_css():
|
||||
"""Serve the CSS file"""
|
||||
css_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
|
||||
'resources', 'web', 'config.css')
|
||||
return send_file(css_path, mimetype='text/css')
|
||||
|
||||
@app.route('/config.js')
|
||||
def serve_config_js():
|
||||
"""Serve the JavaScript file"""
|
||||
js_path = os.path.join(os.path.dirname(os.path.abspath(__file__)),
|
||||
'resources', 'web', 'config.js')
|
||||
return send_file(js_path, mimetype='application/javascript')
|
||||
|
||||
@self.app.route('/')
|
||||
def serve_root():
|
||||
"""Redirect root to config page"""
|
||||
|
||||
Reference in New Issue
Block a user