Beginning the mobile UI

This commit is contained in:
2024-08-26 16:57:29 +02:00
parent da610022b4
commit cc095af0c4
8 changed files with 54 additions and 15 deletions

View File

@@ -1,4 +1,5 @@
import useDatabase from '~/composables/useDatabase';
import { Comment } from '~/types/api';
export default defineEventHandler(async (e) => {
const project = getRouterParam(e, "projectId");

View File

@@ -1,6 +1,8 @@
import useDatabase from '~/composables/useDatabase';
import { Navigation } from '~/types/api';
type NavigatioNExtension = Navigation & { owner: number, navigable: boolean };
export default defineEventHandler(async (e) => {
const project = getRouterParam(e, "projectId");
const { user } = await getUserSession(e);
@@ -13,7 +15,7 @@ export default defineEventHandler(async (e) => {
const db = useDatabase();
const content = db.query(`SELECT "path", "title", "type", "order", "private", "navigable", "owner" FROM explorer_files WHERE project = ?1`).all(project!).sort((a: any, b: any) => a.path.length - b.path.length) as Navigation[];
const content = db.query(`SELECT "path", "title", "type", "order", "private", "navigable", "owner" FROM explorer_files WHERE project = ?1`).all(project!).sort((a: any, b: any) => a.path.length - b.path.length) as NavigatioNExtension[];
if(content.length > 0)
{