- xs
- sm
- md
- lg
- xl
- 2xl
+
+
+
+ xs
+ sm
+ md
+ lg
+ xl
+ 2xl
diff --git a/apps/web/src/lib/config/nav.ts b/apps/web/src/lib/config/nav.ts
index 773c9f9..04d1472 100644
--- a/apps/web/src/lib/config/nav.ts
+++ b/apps/web/src/lib/config/nav.ts
@@ -17,21 +17,6 @@ export const navConfig: NavConfig = {
href: '/dashboard',
auth: true
},
- // {
- // title: 'Settings',
- // href: '/settings',
- // auth: true
- // },
- // {
- // title: 'Login',
- // href: '/login',
- // auth: false,
- // },
- // {
- // title: 'Register',
- // href: '/register',
- // auth: false,
- // },
],
sidebarNav: []
};
diff --git a/apps/web/src/lib/pocketbase.ts b/apps/web/src/lib/pocketbase.ts
index 89a0427..a916695 100644
--- a/apps/web/src/lib/pocketbase.ts
+++ b/apps/web/src/lib/pocketbase.ts
@@ -12,3 +12,18 @@ export const pb = writable(undefined, (set) => {
set(pocketbaseInstance);
});
+
+// export function isAdmin(model: RecordModel | AdminModel | null): model is AdminModel {
+// return !!model && !(model as RecordModel)?.collectionId;
+// }
+
+// export function getAvatarUrl(
+// pocketbase: Pocketbase,
+// model: RecordModel | AdminModel | null
+// ) {
+// if (!model) return undefined;
+// if (isAdmin(model)) return undefined;
+// if (typeof model.avatar !== 'string' || !model.avatar) return undefined;
+
+// return pocketbase.getFileUrl(model, model.avatar);
+// }
\ No newline at end of file
diff --git a/apps/web/src/lib/utils.ts b/apps/web/src/lib/utils.ts
index 680ffb9..eba19d8 100644
--- a/apps/web/src/lib/utils.ts
+++ b/apps/web/src/lib/utils.ts
@@ -54,7 +54,3 @@ export const flyAndScale = (
easing: cubicOut
};
};
-
-export const serializeNonPOJOs = (obj: unknown) => {
- return structuredClone(obj);
-};
diff --git a/apps/web/src/routes/(auth)/(dashboard)/+layout.server.ts b/apps/web/src/routes/(dashboard)/+layout.server.ts
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/+layout.server.ts
rename to apps/web/src/routes/(dashboard)/+layout.server.ts
diff --git a/apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/data-table-checkbox.svelte b/apps/web/src/routes/(dashboard)/dashboard/(components)/data-table-checkbox.svelte
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/data-table-checkbox.svelte
rename to apps/web/src/routes/(dashboard)/dashboard/(components)/data-table-checkbox.svelte
diff --git a/apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/data-table-column-header.svelte b/apps/web/src/routes/(dashboard)/dashboard/(components)/data-table-column-header.svelte
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/data-table-column-header.svelte
rename to apps/web/src/routes/(dashboard)/dashboard/(components)/data-table-column-header.svelte
diff --git a/apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/data-table-faceted-filter.svelte b/apps/web/src/routes/(dashboard)/dashboard/(components)/data-table-faceted-filter.svelte
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/data-table-faceted-filter.svelte
rename to apps/web/src/routes/(dashboard)/dashboard/(components)/data-table-faceted-filter.svelte
diff --git a/apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/data-table-pagination.svelte b/apps/web/src/routes/(dashboard)/dashboard/(components)/data-table-pagination.svelte
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/data-table-pagination.svelte
rename to apps/web/src/routes/(dashboard)/dashboard/(components)/data-table-pagination.svelte
diff --git a/apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/data-table-priority-cell.svelte b/apps/web/src/routes/(dashboard)/dashboard/(components)/data-table-priority-cell.svelte
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/data-table-priority-cell.svelte
rename to apps/web/src/routes/(dashboard)/dashboard/(components)/data-table-priority-cell.svelte
diff --git a/apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/data-table-row-actions.svelte b/apps/web/src/routes/(dashboard)/dashboard/(components)/data-table-row-actions.svelte
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/data-table-row-actions.svelte
rename to apps/web/src/routes/(dashboard)/dashboard/(components)/data-table-row-actions.svelte
diff --git a/apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/data-table-status-cell.svelte b/apps/web/src/routes/(dashboard)/dashboard/(components)/data-table-status-cell.svelte
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/data-table-status-cell.svelte
rename to apps/web/src/routes/(dashboard)/dashboard/(components)/data-table-status-cell.svelte
diff --git a/apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/data-table-title-cell.svelte b/apps/web/src/routes/(dashboard)/dashboard/(components)/data-table-title-cell.svelte
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/data-table-title-cell.svelte
rename to apps/web/src/routes/(dashboard)/dashboard/(components)/data-table-title-cell.svelte
diff --git a/apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/data-table-toolbar.svelte b/apps/web/src/routes/(dashboard)/dashboard/(components)/data-table-toolbar.svelte
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/data-table-toolbar.svelte
rename to apps/web/src/routes/(dashboard)/dashboard/(components)/data-table-toolbar.svelte
diff --git a/apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/data-table-view-options.svelte b/apps/web/src/routes/(dashboard)/dashboard/(components)/data-table-view-options.svelte
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/data-table-view-options.svelte
rename to apps/web/src/routes/(dashboard)/dashboard/(components)/data-table-view-options.svelte
diff --git a/apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/data-table.svelte b/apps/web/src/routes/(dashboard)/dashboard/(components)/data-table.svelte
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/data-table.svelte
rename to apps/web/src/routes/(dashboard)/dashboard/(components)/data-table.svelte
diff --git a/apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/index.ts b/apps/web/src/routes/(dashboard)/dashboard/(components)/index.ts
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/dashboard/(components)/index.ts
rename to apps/web/src/routes/(dashboard)/dashboard/(components)/index.ts
diff --git a/apps/web/src/routes/(auth)/(dashboard)/dashboard/(data)/data.ts b/apps/web/src/routes/(dashboard)/dashboard/(data)/data.ts
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/dashboard/(data)/data.ts
rename to apps/web/src/routes/(dashboard)/dashboard/(data)/data.ts
diff --git a/apps/web/src/routes/(auth)/(dashboard)/dashboard/(data)/schemas.ts b/apps/web/src/routes/(dashboard)/dashboard/(data)/schemas.ts
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/dashboard/(data)/schemas.ts
rename to apps/web/src/routes/(dashboard)/dashboard/(data)/schemas.ts
diff --git a/apps/web/src/routes/(auth)/(dashboard)/dashboard/(data)/tickets.json b/apps/web/src/routes/(dashboard)/dashboard/(data)/tickets.json
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/dashboard/(data)/tickets.json
rename to apps/web/src/routes/(dashboard)/dashboard/(data)/tickets.json
diff --git a/apps/web/src/routes/(auth)/(dashboard)/dashboard/+page.svelte b/apps/web/src/routes/(dashboard)/dashboard/+page.svelte
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/dashboard/+page.svelte
rename to apps/web/src/routes/(dashboard)/dashboard/+page.svelte
diff --git a/apps/web/src/routes/(auth)/(dashboard)/settings/(components)/sidebar-nav.svelte b/apps/web/src/routes/(dashboard)/settings/(components)/sidebar-nav.svelte
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/settings/(components)/sidebar-nav.svelte
rename to apps/web/src/routes/(dashboard)/settings/(components)/sidebar-nav.svelte
diff --git a/apps/web/src/routes/(auth)/(dashboard)/settings/+layout.svelte b/apps/web/src/routes/(dashboard)/settings/+layout.svelte
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/settings/+layout.svelte
rename to apps/web/src/routes/(dashboard)/settings/+layout.svelte
diff --git a/apps/web/src/routes/(auth)/(dashboard)/settings/+page.server.ts b/apps/web/src/routes/(dashboard)/settings/+page.server.ts
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/settings/+page.server.ts
rename to apps/web/src/routes/(dashboard)/settings/+page.server.ts
diff --git a/apps/web/src/routes/(auth)/(dashboard)/settings/+page.svelte b/apps/web/src/routes/(dashboard)/settings/+page.svelte
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/settings/+page.svelte
rename to apps/web/src/routes/(dashboard)/settings/+page.svelte
diff --git a/apps/web/src/routes/(auth)/(dashboard)/settings/account/+page.server.ts b/apps/web/src/routes/(dashboard)/settings/account/+page.server.ts
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/settings/account/+page.server.ts
rename to apps/web/src/routes/(dashboard)/settings/account/+page.server.ts
diff --git a/apps/web/src/routes/(auth)/(dashboard)/settings/account/+page.svelte b/apps/web/src/routes/(dashboard)/settings/account/+page.svelte
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/settings/account/+page.svelte
rename to apps/web/src/routes/(dashboard)/settings/account/+page.svelte
diff --git a/apps/web/src/routes/(auth)/(dashboard)/settings/account/account-form.svelte b/apps/web/src/routes/(dashboard)/settings/account/account-form.svelte
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/settings/account/account-form.svelte
rename to apps/web/src/routes/(dashboard)/settings/account/account-form.svelte
diff --git a/apps/web/src/routes/(auth)/(dashboard)/settings/appearance/+page.server.ts b/apps/web/src/routes/(dashboard)/settings/appearance/+page.server.ts
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/settings/appearance/+page.server.ts
rename to apps/web/src/routes/(dashboard)/settings/appearance/+page.server.ts
diff --git a/apps/web/src/routes/(auth)/(dashboard)/settings/appearance/+page.svelte b/apps/web/src/routes/(dashboard)/settings/appearance/+page.svelte
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/settings/appearance/+page.svelte
rename to apps/web/src/routes/(dashboard)/settings/appearance/+page.svelte
diff --git a/apps/web/src/routes/(auth)/(dashboard)/settings/appearance/appearance-form.svelte b/apps/web/src/routes/(dashboard)/settings/appearance/appearance-form.svelte
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/settings/appearance/appearance-form.svelte
rename to apps/web/src/routes/(dashboard)/settings/appearance/appearance-form.svelte
diff --git a/apps/web/src/routes/(auth)/(dashboard)/settings/notifications/+page.server.ts b/apps/web/src/routes/(dashboard)/settings/notifications/+page.server.ts
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/settings/notifications/+page.server.ts
rename to apps/web/src/routes/(dashboard)/settings/notifications/+page.server.ts
diff --git a/apps/web/src/routes/(auth)/(dashboard)/settings/notifications/+page.svelte b/apps/web/src/routes/(dashboard)/settings/notifications/+page.svelte
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/settings/notifications/+page.svelte
rename to apps/web/src/routes/(dashboard)/settings/notifications/+page.svelte
diff --git a/apps/web/src/routes/(auth)/(dashboard)/settings/notifications/notifications-form.svelte b/apps/web/src/routes/(dashboard)/settings/notifications/notifications-form.svelte
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/settings/notifications/notifications-form.svelte
rename to apps/web/src/routes/(dashboard)/settings/notifications/notifications-form.svelte
diff --git a/apps/web/src/routes/(auth)/(dashboard)/settings/profile-form.svelte b/apps/web/src/routes/(dashboard)/settings/profile-form.svelte
similarity index 100%
rename from apps/web/src/routes/(auth)/(dashboard)/settings/profile-form.svelte
rename to apps/web/src/routes/(dashboard)/settings/profile-form.svelte
diff --git a/apps/web/src/routes/+layout.server.ts b/apps/web/src/routes/+layout.server.ts
index 4866957..52b809c 100644
--- a/apps/web/src/routes/+layout.server.ts
+++ b/apps/web/src/routes/+layout.server.ts
@@ -1,29 +1,8 @@
import type { LayoutServerLoad } from './$types';
-// export function load({locals}){
-// console.log('base token',locals.userPb.authStore.token);
-// console.log('valid',locals.userPb.authStore.isValid);
-// if(!locals.userPb.authStore.token) throw redirect(303,'/login');
-
-// const user = {
-// firstname: locals.userPb.authStore.baseModel.firstname
-// }
-
-// return{
-// user
-// }
-// }
-
export const load: LayoutServerLoad = async ({ locals }: { locals: App.Locals }) => {
- if (!locals.pocketBase.authStore.token) {
- return {
- authenticated: locals.pocketBase.authStore.isValid,
- user: locals.pocketBase.authStore.model?.baseModel
- };
- } else {
- return {
- authenticated: locals.pocketBase.authStore.isValid,
- user: {}
- };
- }
+ return {
+ authenticated: locals.pocketBase.authStore.isValid,
+ user: locals.pocketBase.authStore.model,
+ };
};
diff --git a/apps/web/src/routes/+layout.svelte b/apps/web/src/routes/+layout.svelte
index 12f0dc8..b262eca 100644
--- a/apps/web/src/routes/+layout.svelte
+++ b/apps/web/src/routes/+layout.svelte
@@ -22,6 +22,7 @@
{#if dev}
+
{/if}