Restructure frontend into templates/ and static/
- Move index.html → templates/index.html (Jinja2, uses url_for) - Extract CSS → static/css/app.css - Split JS into static/js/: utils.js, dashboard.js, shares.js, quotas.js, users.js, main.js - Switch app.py from send_file to render_template Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
822e6b3b87
commit
1118681fd2
10 files changed
+607
-642
No files matched your search
@@ -5,7 +5,7 @@ import subprocess
|
||||
import functools
|
||||
from pathlib import Path
|
||||
|
||||
from flask import Flask, request, jsonify, send_file, Response
|
||||
from flask import Flask, request, jsonify, render_template, Response
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
@@ -130,7 +130,7 @@ def add_nfs_share(path, clients, ro=False):
|
||||
@app.route('/')
|
||||
@require_auth
|
||||
def index():
|
||||
return send_file(os.path.join(os.path.dirname(__file__), 'index.html'))
|
||||
return render_template('index.html')
|
||||
|
||||
|
||||
@app.route('/api/shares', methods=['GET'])
|
||||
|
||||
Reference in new issue
Block a user