Update app/routes.py
This commit is contained in:
parent
385dda36d7
commit
3c456fb295
1 changed files with 5 additions and 3 deletions
|
|
@ -16,7 +16,9 @@ import string
|
||||||
import glob
|
import glob
|
||||||
import time
|
import time
|
||||||
import qrcode
|
import qrcode
|
||||||
from app.change_manager import CHANGES_REQUIRING_RESTART
|
|
||||||
|
CHANGES_REQUIRING_RESTART = ['wifi_password', 'ssid', 'enable_access_point', 'enable_chat', 'enable_delta_chat', 'butterbox_hostname', 'ssh_access_settings', 'root_account_settings']
|
||||||
|
|
||||||
|
|
||||||
def gen_username() -> str:
|
def gen_username() -> str:
|
||||||
words = top_n_list("en", 5000)
|
words = top_n_list("en", 5000)
|
||||||
|
|
@ -205,7 +207,7 @@ def admin():
|
||||||
form.admin_password.errors.append(
|
form.admin_password.errors.append(
|
||||||
_("New admin password same as old password. Not changing."))
|
_("New admin password same as old password. Not changing."))
|
||||||
if app.config['SETTINGS_CHANGED']:
|
if app.config['SETTINGS_CHANGED']:
|
||||||
flash(_("⚠️ Some settings won't fully take effect until the Butter Box restarts. Click 'Apply Changes' to restart."))
|
flash(_("⚠️ Some settings may not fully take effect until the Butter Box restarts. Click 'Apply Changes' to restart."))
|
||||||
else:
|
else:
|
||||||
if non_admin_settings_changed:
|
if non_admin_settings_changed:
|
||||||
flash(
|
flash(
|
||||||
|
|
@ -215,7 +217,7 @@ def admin():
|
||||||
if form.apply_changes.data:
|
if form.apply_changes.data:
|
||||||
set_setting('apply_changes', "true")
|
set_setting('apply_changes', "true")
|
||||||
dump_settings("settings.txt")
|
dump_settings("settings.txt")
|
||||||
flash(_("⚠️ Changes applied! Please wait for the box to restart."))
|
flash(_("⚠️ Changes applied! If needed, the system will restart. This may take up to two minutes."))
|
||||||
|
|
||||||
return render_template('admin.html', raspap_installed=raspap_installed, get_setting=get_setting, form=form)
|
return render_template('admin.html', raspap_installed=raspap_installed, get_setting=get_setting, form=form)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue