restructure file system

This commit is contained in:
2025-05-25 12:20:02 +02:00
parent b4ac92af79
commit e853bb6a86
28 changed files with 29 additions and 29 deletions

View File

@@ -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')
return render_template('trash/trash.html')