mirror of
https://github.com/community-scripts/ProxmoxVE.git
synced 2025-12-18 05:03:30 +01:00
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:
@ -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}`);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user