fix #77 CHECK CONFIG

This commit is contained in:
cube
2026-05-09 20:19:40 +01:00
parent 4d2d76943a
commit 3f0dc5ac26
5 changed files with 20 additions and 1 deletions

View File

@@ -16,6 +16,7 @@ this is how your config should look at the latest update
```
REGISTRATION = True # Make sure to disable in production
STATIC_FOLDER = 'myriad/static'
ICON_UPLOAD_FOLDER = 'myriad/static/icons' # where member icons will be stored
BLINKIES_UPLOAD_FOLDER = 'myriad/static/blinkies' # where blinkies will be stored
STAMPS_UPLOAD_FOLDER = 'myriad/static/stamps' # where stamps will be stored

View File

@@ -469,6 +469,12 @@ def admin():
db.execute("INSERT INTO pages (title, content) VALUES (?, ?)", (page_title, page_content))
db.commit()
elif "favicon" in request.files:
file = request.files["favicon"]
filename = "favicon.ico"
file.save(os.path.join(current_app.config["STATIC_FOLDER"], filename))
users = db.execute("SELECT * FROM user").fetchall()
front_log = db.execute("SELECT * FROM front_log ORDER BY start_time DESC").fetchall()
pages = db.execute("SELECT * FROM pages").fetchall()

BIN
myriad/static/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,6 +1,7 @@
<!doctype html>
<title>{% block title %}{% endblock %} - {{ get_system_name() }}</title>
<link rel="icon" type="image/x-icon" href="{{ url_for('static', filename='favicon.ico') }}">
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
{% set themes = get_themes() %}

View File

@@ -36,8 +36,19 @@
<p><a href="{{ url_for('home.custom_page', pid=page[0]) }}">{{page[1]}}</a> - <a href="{{ url_for('manage.edit_page', pid=page[0]) }}">Edit Page</a> &#9734 <a href="{{ url_for('manage.delete_page', pid=page[0]) }}">Delete Page</a></p>
{% endfor %}
<div class="heading">Site Favicon</div>
<p>This will replace the old favicon, without the ability to restore it if you change your mind</p>
<p>For best results, use a 32x32 favicon. Icons8 is a good resource, as is <a href="https://realfavicongenerator.net">this png converter</a></p>
<p>Changes will take some time to be reflected - or try a hard/force refresh on the browser</p>
<form method="post" enctype="multipart/form-data">
<input type="file" name="favicon">
<input type="submit" value="Upload Favicon">
</form>
<div class="heading">Backup</div>
<hr>
<div class="heading">Export</div>
<a href="{{ url_for('manage.export_system') }}">Export entire system as JSON</a> (without images)<br>
<a href="{{ url_for('manage.export_system_full') }}">Export entire system as ZIP</a> (with images)