Updated Homepage & Styling;

Corrected imports/config settings;
This commit is contained in:
Chris-1010
2025-01-22 13:46:04 +00:00
parent 1ede987914
commit fbe7d2ceb1
20 changed files with 278 additions and 61 deletions

View File

@@ -4,7 +4,7 @@ from backend.blueprints.utils import logged_in_user
from flask_cors import CORS
def create_app():
app = Flask(__name__, template_folder="../ui/templates/", static_folder="../ui/static/")
app = Flask(__name__, static_folder="../ui/static/")
app.config["SECRET_KEY"] = ""
app.config["SESSION_PERMANENT"] = False
app.config["SESSION_TYPE"] = "filesystem"

View File

@@ -3,6 +3,15 @@ from flask import render_template, Blueprint
main_bp = Blueprint("app", __name__)
@main_bp.route('/get_loggedin_status')
def get_loggedin_status():
logged_in = False
"""
Returns whether the user is logged in or not
"""
return {"logged_in": logged_in}
@main_bp.route('/get_streams')
def get_sample_streams():
"""
@@ -14,29 +23,37 @@ def get_sample_streams():
"title": "Gaming Stream",
"streamer": "Gamer123",
"viewers": 1500,
"thumbnail": "assets/images/monkey.png",
"thumbnail": "dance_game.png",
},
{
"id": 2,
"title": "Art Stream",
"streamer": "Artist456",
"viewers": 800,
"thumbnail": "assets/images/surface.jpeg",
"thumbnail": "surface.jpeg",
},
{
"id": 3,
"title": "Music Stream",
"streamer": "Musician789",
"viewers": 2000,
"thumbnail": "assets/images/dance_game.png",
"thumbnail": "monkey.png",
},
{
"id": 4,
"title": "Just Chatting",
"streamer": "Chatty101",
"viewers": 1200,
"thumbnail": "assets/images/elf.webp",
"thumbnail": "elf.webp",
},
{
"id": 5,
"title": "Cooking Stream",
"streamer": "Chef202",
"viewers": 1000,
"thumbnail": "art.jpg",
}
]
return streamers
#TODO Route for saving uploaded thumbnails to database, serving these images to the frontend upon request: →→→ @main_bp.route('/images/<path:filename>') \n def serve_image(filename): ←←←