diff --git a/app/components/AppHeader.vue b/app/components/AppHeader.vue index 6bae473..fa936f6 100644 --- a/app/components/AppHeader.vue +++ b/app/components/AppHeader.vue @@ -23,13 +23,25 @@ const logoTo = computed(() => user.value ? '/library' : '/login') // Navigation links - only show Sign Out when logged in const links = computed(() => { if (user.value) { - return [{ - label: 'Sign Out', - icon: 'i-lucide-log-out', - color: 'neutral' as const, - variant: 'ghost' as const, - onClick: handleSignOut - }] + return [ + { + label: 'Library', + icon: 'i-lucide-library', + to: '/library' + }, + { + label: 'Loans', + icon: 'i-lucide-handshake', + to: '/library/loans' + }, + { + label: 'Sign Out', + icon: 'i-lucide-log-out', + color: 'neutral' as const, + variant: 'ghost' as const, + onClick: handleSignOut + } + ] } return [] }) diff --git a/app/components/BookCard.vue b/app/components/BookCard.vue index 64559e6..f83c78c 100644 --- a/app/components/BookCard.vue +++ b/app/components/BookCard.vue @@ -7,6 +7,7 @@ interface Props { isbn?: string | null coverPath?: string | null addedAt?: string | Date + activeLoan?: ActiveLoanSummary | null selected?: boolean selectable?: boolean } @@ -69,6 +70,15 @@ function handleClick(e: MouseEvent) { class="text-4xl text-muted" /> + + Lent out + @@ -111,6 +121,15 @@ function handleClick(e: MouseEvent) { name="i-lucide-book" class="text-4xl text-muted" /> + + Lent out +
diff --git a/app/components/BookLendingModal.vue b/app/components/BookLendingModal.vue new file mode 100644 index 0000000..2bde755 --- /dev/null +++ b/app/components/BookLendingModal.vue @@ -0,0 +1,213 @@ + + + diff --git a/app/components/BorrowedLoansSection.vue b/app/components/BorrowedLoansSection.vue new file mode 100644 index 0000000..03a9fc3 --- /dev/null +++ b/app/components/BorrowedLoansSection.vue @@ -0,0 +1,161 @@ + + + diff --git a/app/components/LoanedOutLoansSection.vue b/app/components/LoanedOutLoansSection.vue new file mode 100644 index 0000000..7cf3d8c --- /dev/null +++ b/app/components/LoanedOutLoansSection.vue @@ -0,0 +1,207 @@ + + + diff --git a/app/pages/(auth)/login.vue b/app/pages/(auth)/login.vue index a31110b..d84865e 100644 --- a/app/pages/(auth)/login.vue +++ b/app/pages/(auth)/login.vue @@ -113,7 +113,7 @@ async function onSubmit(payload: FormSubmitEvent) {