diff --git a/routes/__init__.py b/routes/__init__.py index 1a2087c..1bbbb03 100644 --- a/routes/__init__.py +++ b/routes/__init__.py @@ -26,7 +26,7 @@ def init_app(app: Flask): @app.route('/rooms//trash') @login_required def trash_page(room_id): - return render_template('trash.html') + return render_template('trash/trash.html') return app diff --git a/routes/__pycache__/__init__.cpython-313.pyc b/routes/__pycache__/__init__.cpython-313.pyc index 4bf5c4d..3bc641f 100644 Binary files a/routes/__pycache__/__init__.cpython-313.pyc and b/routes/__pycache__/__init__.cpython-313.pyc differ diff --git a/routes/__pycache__/auth.cpython-313.pyc b/routes/__pycache__/auth.cpython-313.pyc index c50d388..135c1e4 100644 Binary files a/routes/__pycache__/auth.cpython-313.pyc and b/routes/__pycache__/auth.cpython-313.pyc differ diff --git a/routes/__pycache__/contacts.cpython-313.pyc b/routes/__pycache__/contacts.cpython-313.pyc index 6359213..b2f5bb3 100644 Binary files a/routes/__pycache__/contacts.cpython-313.pyc and b/routes/__pycache__/contacts.cpython-313.pyc differ diff --git a/routes/__pycache__/main.cpython-313.pyc b/routes/__pycache__/main.cpython-313.pyc index 3f073ba..6fb936b 100644 Binary files a/routes/__pycache__/main.cpython-313.pyc and b/routes/__pycache__/main.cpython-313.pyc differ diff --git a/routes/__pycache__/rooms.cpython-313.pyc b/routes/__pycache__/rooms.cpython-313.pyc index e9290d2..d5674e9 100644 Binary files a/routes/__pycache__/rooms.cpython-313.pyc and b/routes/__pycache__/rooms.cpython-313.pyc differ diff --git a/routes/auth.py b/routes/auth.py index 5690b5f..f6c96d4 100644 --- a/routes/auth.py +++ b/routes/auth.py @@ -22,7 +22,7 @@ def init_routes(auth_bp): login_user(user, remember=remember) return redirect(url_for('main.dashboard')) - return render_template('login.html') + return render_template('auth/login.html') @auth_bp.route('/register', methods=['GET', 'POST']) def register(): @@ -53,7 +53,7 @@ def init_routes(auth_bp): flash('Registration successful! Please login.', 'success') return redirect(url_for('auth.login')) - return render_template('register.html') + return render_template('auth/register.html') @auth_bp.route('/logout') @login_required diff --git a/routes/main.py b/routes/main.py index 40eae0c..9e00e9a 100644 --- a/routes/main.py +++ b/routes/main.py @@ -237,7 +237,7 @@ def init_routes(main_bp): RoomFile.deleted==True ).group_by('extension').all() - return render_template('dashboard.html', + return render_template('dashboard/dashboard.html', recent_contacts=recent_contacts, active_count=active_count, inactive_count=inactive_count, @@ -279,7 +279,7 @@ def init_routes(main_bp): existing_user = User.query.filter_by(email=new_email).first() if existing_user: flash('A user with this email already exists.', 'error') - return render_template('profile.html') + return render_template('profile/profile.html') # Handle profile picture upload file = request.files.get('profile_picture') if file and file.filename: @@ -301,7 +301,7 @@ def init_routes(main_bp): if new_password: if new_password != confirm_password: flash('Passwords do not match.', 'error') - return render_template('profile.html') + return render_template('profile/profile.html') current_user.set_password(new_password) flash('Password updated successfully.', 'success') try: @@ -311,14 +311,14 @@ def init_routes(main_bp): db.session.rollback() flash('An error occurred while updating your profile.', 'error') return redirect(url_for('main.profile')) - return render_template('profile.html') + return render_template('profile/profile.html') @main_bp.route('/starred') @login_required def starred(): - return render_template('starred.html') + return render_template('starred/starred.html') @main_bp.route('/trash') @login_required def trash(): - return render_template('trash.html') \ No newline at end of file + return render_template('trash/trash.html') \ No newline at end of file diff --git a/routes/rooms.py b/routes/rooms.py index 1f30b20..c60ab42 100644 --- a/routes/rooms.py +++ b/routes/rooms.py @@ -17,7 +17,7 @@ def rooms(): if search: query = query.filter(Room.name.ilike(f'%{search}%')) rooms = query.order_by(Room.created_at.desc()).all() - return render_template('rooms.html', rooms=rooms, search=search) + return render_template('rooms/rooms.html', rooms=rooms, search=search) @rooms_bp.route('/create', methods=['GET', 'POST']) @login_required @@ -46,7 +46,7 @@ def create_room(): flash('Room created successfully!', 'success') return redirect(url_for('rooms.rooms')) - return render_template('create_room.html', form=form) + return render_template('rooms/create_room.html', form=form) @rooms_bp.route('/') @login_required @@ -64,7 +64,7 @@ def room(room_id): can_rename = user_has_permission(room, 'can_rename') can_move = user_has_permission(room, 'can_move') can_share = user_has_permission(room, 'can_share') - return render_template('room.html', room=room, can_download=can_download, can_upload=can_upload, can_delete=can_delete, can_rename=can_rename, can_move=can_move, can_share=can_share) + return render_template('rooms/room.html', room=room, can_download=can_download, can_upload=can_upload, can_delete=can_delete, can_rename=can_rename, can_move=can_move, can_share=can_share) @rooms_bp.route('//members') @login_required @@ -81,7 +81,7 @@ def room_members(room_id): return redirect(url_for('rooms.room', room_id=room_id)) member_permissions = {p.user_id: p for p in room.member_permissions} available_users = User.query.filter(~User.id.in_(member_permissions.keys())).all() - return render_template('room_members.html', room=room, available_users=available_users, member_permissions=member_permissions) + return render_template('rooms/room_members.html', room=room, available_users=available_users, member_permissions=member_permissions) @rooms_bp.route('//members/add', methods=['POST']) @login_required @@ -181,7 +181,7 @@ def edit_room(room_id): form.name.data = room.name form.description.data = room.description - return render_template('edit_room.html', form=form, room=room) + return render_template('rooms/edit_room.html', form=form, room=room) @rooms_bp.route('//delete', methods=['POST']) @login_required diff --git a/templates/login.html b/templates/auth/login.html similarity index 100% rename from templates/login.html rename to templates/auth/login.html diff --git a/templates/register.html b/templates/auth/register.html similarity index 100% rename from templates/register.html rename to templates/auth/register.html diff --git a/templates/base.html b/templates/common/base.html similarity index 100% rename from templates/base.html rename to templates/common/base.html diff --git a/templates/macros.html b/templates/common/macros.html similarity index 100% rename from templates/macros.html rename to templates/common/macros.html diff --git a/templates/components/storage_overview.html b/templates/components/storage_overview.html index f16dc3e..07aabf4 100644 --- a/templates/components/storage_overview.html +++ b/templates/components/storage_overview.html @@ -1,4 +1,4 @@ -{% from 'macros.html' import format_size %} +{% from 'common/macros.html' import format_size %} {% macro storage_overview(room_count, file_count, folder_count, total_size) %}
diff --git a/templates/components/storage_usage.html b/templates/components/storage_usage.html index 6641211..aa3005d 100644 --- a/templates/components/storage_usage.html +++ b/templates/components/storage_usage.html @@ -1,4 +1,4 @@ -{% from 'macros.html' import format_size %} +{% from 'common/macros.html' import format_size %} {% macro storage_usage(storage_by_type) %}
diff --git a/templates/components/trash.html b/templates/components/trash.html index b8faafa..c68fd69 100644 --- a/templates/components/trash.html +++ b/templates/components/trash.html @@ -1,4 +1,4 @@ -{% from 'macros.html' import format_size %} +{% from 'common/macros.html' import format_size %} {% macro trash(trash_count, pending_deletion, oldest_trash_date, trash_size) %}
diff --git a/templates/contacts.html b/templates/contacts/contacts.html similarity index 83% rename from templates/contacts.html rename to templates/contacts/contacts.html index b98334f..1906e2f 100644 --- a/templates/contacts.html +++ b/templates/contacts/contacts.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "common/base.html" %} {% block title %}Contacts - DocuPulse{% endblock %} diff --git a/templates/contacts/form.html b/templates/contacts/form.html index 6814beb..7574a66 100644 --- a/templates/contacts/form.html +++ b/templates/contacts/form.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "common/base.html" %} {% block content %}
diff --git a/templates/contacts/list.html b/templates/contacts/list.html index da32ced..a56122f 100644 --- a/templates/contacts/list.html +++ b/templates/contacts/list.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "common/base.html" %} {% block head %} {{ super() }} diff --git a/templates/dashboard.html b/templates/dashboard/dashboard.html similarity index 99% rename from templates/dashboard.html rename to templates/dashboard/dashboard.html index f1b4e85..2e3976f 100644 --- a/templates/dashboard.html +++ b/templates/dashboard/dashboard.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "common/base.html" %} {% block title %}Dashboard - DocuPulse{% endblock %} diff --git a/templates/profile.html b/templates/profile/profile.html similarity index 99% rename from templates/profile.html rename to templates/profile/profile.html index 6bc28f9..45840af 100644 --- a/templates/profile.html +++ b/templates/profile/profile.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "common/base.html" %} {% block title %}Profile - DocuPulse{% endblock %} diff --git a/templates/create_room.html b/templates/rooms/create_room.html similarity index 98% rename from templates/create_room.html rename to templates/rooms/create_room.html index 211c909..7dce929 100644 --- a/templates/create_room.html +++ b/templates/rooms/create_room.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "common/base.html" %} {% block title %}Create Room - DocuPulse{% endblock %} diff --git a/templates/edit_room.html b/templates/rooms/edit_room.html similarity index 98% rename from templates/edit_room.html rename to templates/rooms/edit_room.html index 2d6a65c..1b89ca6 100644 --- a/templates/edit_room.html +++ b/templates/rooms/edit_room.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "common/base.html" %} {% block title %}Edit Room - {{ room.name }}{% endblock %} diff --git a/templates/room.html b/templates/rooms/room.html similarity index 99% rename from templates/room.html rename to templates/rooms/room.html index c893d00..4f3cfa8 100644 --- a/templates/room.html +++ b/templates/rooms/room.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "common/base.html" %} {% block title %}Room - DocuPulse{% endblock %} diff --git a/templates/room_members.html b/templates/rooms/room_members.html similarity index 99% rename from templates/room_members.html rename to templates/rooms/room_members.html index a9e96e5..550691c 100644 --- a/templates/room_members.html +++ b/templates/rooms/room_members.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "common/base.html" %} {% block title %}Room Members - {{ room.name }}{% endblock %} diff --git a/templates/rooms.html b/templates/rooms/rooms.html similarity index 99% rename from templates/rooms.html rename to templates/rooms/rooms.html index 76b016c..b7abe35 100644 --- a/templates/rooms.html +++ b/templates/rooms/rooms.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "common/base.html" %} {% block title %}Rooms - DocuPulse{% endblock %} diff --git a/templates/starred.html b/templates/starred/starred.html similarity index 96% rename from templates/starred.html rename to templates/starred/starred.html index 528cd54..db0a838 100644 --- a/templates/starred.html +++ b/templates/starred/starred.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "common/base.html" %} {% block title %}Starred - DocuPulse{% endblock %} diff --git a/templates/trash.html b/templates/trash/trash.html similarity index 96% rename from templates/trash.html rename to templates/trash/trash.html index 2c8faae..a1f8841 100644 --- a/templates/trash.html +++ b/templates/trash/trash.html @@ -1,4 +1,4 @@ -{% extends "base.html" %} +{% extends "common/base.html" %} {% block title %}Trash - DocuPulse{% endblock %}