themes properly implemented #1 - requires db init

This commit is contained in:
cube
2026-03-20 23:13:52 +00:00
parent fb95c4b9f4
commit 7125dd7cfe
19 changed files with 167 additions and 202 deletions

View File

@@ -44,8 +44,9 @@ def edit(mid):
name = request.form['name']
bio = request.form['bio']
subtitle = request.form['subtitle']
theme = request.form["theme"]
privacy = request.form["privacy"]
db.execute("UPDATE member SET member_name=(?), bio=(?), subtitle=(?), public=(?) WHERE id=(?)",(name, bio, subtitle, privacy, mid))
db.execute("UPDATE member SET member_name=(?), bio=(?), subtitle=(?), public=(?), theme=(?) WHERE id=(?)",(name, bio, subtitle, privacy, theme, mid))
db.commit()
if "file" in request.files:
@@ -106,7 +107,9 @@ def edit(mid):
else:
unjoined_groups.append(group)
return render_template("manage/edit.html", member=member, icons=icons, unjoined_groups=unjoined_groups, joined_groups=joined_groups)
themes = os.listdir(current_app.config["THEMES_FOLDER"])
return render_template("manage/edit.html", member=member, icons=icons, unjoined_groups=unjoined_groups, joined_groups=joined_groups, themes=themes)
@bp.route("/set_main_icon/<mid>/<icon_id>")
@login_required