diff --git a/app.py b/app.py index d1dff8a..8424108 100644 --- a/app.py +++ b/app.py @@ -1,4 +1,4 @@ -from flask import Flask, render_template, request, redirect, url_for, jsonify, flash, session, g, Response, send_file, abort +from flask import Flask, render_template, request, redirect, url_for, jsonify, flash, session, g, Response, send_file, abort, send_from_directory from flask_migrate import Migrate from models import db, TimeEntry, WorkConfig, User, SystemSettings, Team, Role, Project, Company, CompanyWorkConfig, CompanySettings, UserPreferences, WorkRegion, AccountType, ProjectCategory, Task, SubTask, TaskStatus, TaskPriority, TaskDependency, Sprint, SprintStatus, Announcement, SystemEvent, WidgetType, UserDashboard, DashboardWidget, WidgetTemplate, Comment, CommentVisibility, BrandingSettings, CompanyInvitation, Note, NoteFolder, NoteShare from data_formatting import ( @@ -397,6 +397,47 @@ def sitemap_xml(): return Response(sitemap_xml, mimetype='application/xml') +@app.route('/site.webmanifest') +def serve_webmanifest(): + """Serve web manifest with correct icon paths""" + manifest = { + "name": "TimeTrack", + "short_name": "TimeTrack", + "icons": [ + { + "src": url_for('static', filename='android-chrome-192x192.png'), + "sizes": "192x192", + "type": "image/png" + }, + { + "src": url_for('static', filename='android-chrome-512x512.png'), + "sizes": "512x512", + "type": "image/png" + } + ], + "theme_color": "#667eea", + "background_color": "#ffffff", + "display": "standalone" + } + return jsonify(manifest) + +# Favicon routes for compatibility +@app.route('/favicon.ico') +def favicon(): + return send_from_directory(app.static_folder, 'favicon.ico', mimetype='image/x-icon') + +@app.route('/favicon-32x32.png') +def favicon_32(): + return send_from_directory(app.static_folder, 'favicon-32x32.png', mimetype='image/png') + +@app.route('/favicon-16x16.png') +def favicon_16(): + return send_from_directory(app.static_folder, 'favicon-16x16.png', mimetype='image/png') + +@app.route('/apple-touch-icon.png') +def apple_touch_icon(): + return send_from_directory(app.static_folder, 'apple-touch-icon.png', mimetype='image/png') + @app.route('/') def home(): if g.user: diff --git a/static/android-chrome-192x192.png b/static/android-chrome-192x192.png new file mode 100644 index 0000000..46d658a Binary files /dev/null and b/static/android-chrome-192x192.png differ diff --git a/static/android-chrome-512x512.png b/static/android-chrome-512x512.png new file mode 100644 index 0000000..1f2f14b Binary files /dev/null and b/static/android-chrome-512x512.png differ diff --git a/static/apple-touch-icon.png b/static/apple-touch-icon.png new file mode 100644 index 0000000..2a23eec Binary files /dev/null and b/static/apple-touch-icon.png differ diff --git a/static/favicon-16x16.png b/static/favicon-16x16.png new file mode 100644 index 0000000..26d8dc9 Binary files /dev/null and b/static/favicon-16x16.png differ diff --git a/static/favicon-32x32.png b/static/favicon-32x32.png new file mode 100644 index 0000000..f22d4c0 Binary files /dev/null and b/static/favicon-32x32.png differ diff --git a/static/favicon.ico b/static/favicon.ico new file mode 100644 index 0000000..57c6606 Binary files /dev/null and b/static/favicon.ico differ diff --git a/static/site.webmanifest b/static/site.webmanifest new file mode 100644 index 0000000..45dc8a2 --- /dev/null +++ b/static/site.webmanifest @@ -0,0 +1 @@ +{"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} \ No newline at end of file diff --git a/templates/layout.html b/templates/layout.html index 53aaf4c..9bc8cd1 100644 --- a/templates/layout.html +++ b/templates/layout.html @@ -4,14 +4,14 @@ {% if title == 'Home' %}{{ g.branding.app_name if g.branding else 'TimeTrack' }} - Enterprise Time Tracking & Project Management Software{% else %}{{ title }} - {{ g.branding.app_name if g.branding else 'TimeTrack' }}{% endif %}{% if g.company %} - {{ g.company.name }}{% endif %} - + - + @@ -21,7 +21,7 @@ {% if g.branding and g.branding.logo_filename %} {% endif %} - + @@ -38,7 +38,7 @@ - + @@ -54,6 +54,12 @@ {% endif %} {% if g.branding and g.branding.favicon_filename %} + {% else %} + + + + + {% endif %}