From 4022dcce1a9248414609c9acee4d664fae5cdcd5 Mon Sep 17 00:00:00 2001 From: wzj <244142824@qq.com> Date: Tue, 24 Jun 2025 14:30:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=96=B0=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.py | 3 ++- static/styles.css | 30 ++++++++++++++++++++++++++---- templates/settings.html | 9 +++++++++ 3 files changed, 37 insertions(+), 5 deletions(-) diff --git a/app.py b/app.py index b491513..7fd4973 100644 --- a/app.py +++ b/app.py @@ -5,6 +5,7 @@ import subprocess import json import uuid from math import ceil +from flask import flash app = Flask(__name__) app.secret_key = str(uuid.uuid4()) @@ -137,7 +138,6 @@ def settings(): config = load_config() return render_template('settings.html', config=config) - @app.route('/update_settings', methods=['POST']) @basic_auth_required def update_settings(): @@ -154,6 +154,7 @@ def update_settings(): config['proxy_port'] = proxy_port save_config(config) + flash('设置已成功保存!', 'success') # 添加成功提示 return redirect(url_for('settings')) diff --git a/static/styles.css b/static/styles.css index e5a5b65..f0b557d 100644 --- a/static/styles.css +++ b/static/styles.css @@ -425,12 +425,34 @@ input:checked + .slider:before { background-color: #d33426; } +/* 添加消息提示样式 */ +.alert { + padding: 12px 20px; + border-radius: 6px; + margin-bottom: 20px; + font-size: 14px; +} + +.alert-success { + background-color: #d4edda; + color: #155724; + border: 1px solid #c3e6cb; +} + /* 分页样式 */ .pagination { - display: flex; - justify-content: center; - margin-top: 20px; - gap: 5px; + position: absolute; + bottom: 0; + left: 0; + right: 0; + padding-top: 20px; + background: white; +} + +/* 固定分页区域位置 */ +.table-container { + min-height: 400px; /* 根据你的需要调整这个高度 */ + position: relative; } .pagination a, .pagination span { diff --git a/templates/settings.html b/templates/settings.html index 5af6aff..d64b46e 100644 --- a/templates/settings.html +++ b/templates/settings.html @@ -6,6 +6,15 @@ {% block content %}