fix sidebar loading issues and navbar on mobile (#7991)

* Refactor MobileSidebar to manage script and category selection based on current pathname. Introduced temporary state for non-scripts pages and updated logic for last viewed script handling. Improved accessibility by ensuring proper aria attributes and class management.

* Update API endpoint paths in data.ts to include ProxmoxVE prefix for category and version fetching functions.

* Refactor Navbar component layout for improved structure and responsiveness. Adjusted flex properties to ensure proper alignment of elements, enhancing the mobile and desktop user experience. Updated accessibility features and ensured consistent use of TailwindCSS classes.
This commit is contained in:
Bram Suurd
2025-09-29 21:56:07 +02:00
committed by GitHub
parent be5ac7153e
commit b52c252553
3 changed files with 52 additions and 33 deletions

View File

@ -1,7 +1,7 @@
import type { Category } from "./types";
export async function fetchCategories() {
const response = await fetch("api/categories");
const response = await fetch(`/ProxmoxVE/api/categories`);
if (!response.ok) {
throw new Error(`Failed to fetch categories: ${response.statusText}`);
}
@ -10,7 +10,7 @@ export async function fetchCategories() {
}
export async function fetchVersions() {
const response = await fetch(`api/versions`);
const response = await fetch(`/ProxmoxVE/api/versions`);
if (!response.ok) {
throw new Error(`Failed to fetch versions: ${response.statusText}`);
}