fixed manifest and added v3 redirect

This commit is contained in:
vabene1111
2025-01-14 19:17:52 +01:00
parent 3a031bbbaf
commit cd8f8bb90c
2 changed files with 21 additions and 17 deletions

View File

@@ -1,7 +1,7 @@
from pydoc import locate
from django.urls import include, path, re_path
from django.views.generic import TemplateView
from django.views.generic import TemplateView, RedirectView
from drf_spectacular.views import SpectacularAPIView
from rest_framework import routers
@@ -133,9 +133,9 @@ urlpatterns = [
path('service-worker.js', (TemplateView.as_view(template_name="sw.js", content_type='application/javascript')), name='service_worker'),
path('manifest.json', views.web_manifest, name='web_manifest'),
re_path(r'^v3/.*', views.vue3, name='vue_3'),
path('', views.index, name='index'),
path('<path:resource>', views.index, name='index'),
path('<path:resource>', views.index, name='tandoor_frontend'),
]
generic_models = (Recipe, RecipeImport, Storage, ConnectorConfig, RecipeBook, SyncLog, Sync, Comment, RecipeBookEntry, InviteLink, UserSpace, Space)

View File

@@ -531,7 +531,7 @@ def web_manifest(request):
"short_name": _("Plan"),
"description": _("View your meal Plan"),
"url": "./mealplan",
icons: [
"icons": [
{
"src": static('logo_color_plan.svg'),
"sizes": "any"
@@ -550,7 +550,7 @@ def web_manifest(request):
"short_name": _("Shopping"),
"description": _("View your shopping lists"),
"url": "./shopping",
icons: [
"icons": [
{
"src": static('logo_color_shopping.svg'),
"sizes": "any"
@@ -667,3 +667,7 @@ def get_orphan_files(delete_orphans=False):
orphans = find_orphans()
return [img[1] for img in orphans]
def vue3(request):
return HttpResponseRedirect(reverse('index'))