feat: Vue SPA as default interface at root URL
All checks were successful
Deploy / deploy (push) Successful in 3m32s
All checks were successful
Deploy / deploy (push) Successful in 3m32s
- Route `/` now serves the Vue SPA directly (catch-all `/{req}`)
- Legacy Twig interface moved to `/legacy`
- Vue Router base changed from `/vue/` to `/`
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d299e0b9ae
commit
c085c3453a
@@ -168,6 +168,6 @@ const routes = [
|
||||
];
|
||||
|
||||
export const router = createRouter({
|
||||
history: createWebHistory('/vue/'),
|
||||
history: createWebHistory('/'),
|
||||
routes
|
||||
});
|
||||
|
||||
@@ -5,7 +5,7 @@ controllers:
|
||||
type: attribute
|
||||
|
||||
vue_app:
|
||||
path: /vue/{req}
|
||||
path: /{req}
|
||||
controller: Symfony\Bundle\FrameworkBundle\Controller\TemplateController
|
||||
defaults:
|
||||
template: 'vue/index.html.twig'
|
||||
|
||||
@@ -53,7 +53,7 @@ class MangaController extends AbstractController
|
||||
$this->imageManager = new ImageManager(new Driver());
|
||||
}
|
||||
|
||||
#[Route('/', name: 'app_manga')]
|
||||
#[Route('/legacy', name: 'app_legacy')]
|
||||
public function index(Request $request): Response
|
||||
{
|
||||
$sort = $request->query->get('sort', 'title');
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
<!-- Header -->
|
||||
<header class="bg-green-600 h-16 flex items-center fixed w-full z-50">
|
||||
<div class="flex justify-center ml-4">
|
||||
<a class="flex flex-row justify-start" href="{{ path('app_manga') }}">
|
||||
<a class="flex flex-row justify-start" href="{{ path('app_legacy') }}">
|
||||
{# <div class="flex items-center"> #}
|
||||
{# <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" #}
|
||||
{# x="0px" y="0px" width="50" height="50" viewBox="-40 -90 500 500"> #}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<nav>
|
||||
<ul>
|
||||
<li class="{{ app.request.get('_route') starts with 'app_manga' ? 'border-l-4 border-green-600' : '' }}">
|
||||
<a href="{{ path('app_manga') }}" class="block pl-4 py-2 flex items-center {{ app.request.get('_route') starts with 'app_manga' ? 'text-green-600 bg-gray-800' : 'hover:bg-gray-700' }}">
|
||||
<a href="{{ path('app_legacy') }}" class="block pl-4 py-2 flex items-center {{ app.request.get('_route') starts with 'app_manga' ? 'text-green-600 bg-gray-800' : 'hover:bg-gray-700' }}">
|
||||
<i class="fas fa-book mr-2"></i>
|
||||
<span>Mangas</span>
|
||||
</a>
|
||||
|
||||
Reference in New Issue
Block a user