build: production build with Phase 1 2025 Bible Reader implementation complete
Includes all Phase 1 features: - Search-first navigation with auto-complete - Responsive reading interface (desktop/tablet/mobile) - 4 customization presets + full fine-tuning controls - Layered details panel with notes, bookmarks, highlights - Smart offline caching with IndexedDB and auto-sync - Full accessibility (WCAG 2.1 AA) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
60
payload/collections/Bookmarks.ts
Normal file
60
payload/collections/Bookmarks.ts
Normal file
@@ -0,0 +1,60 @@
|
||||
import { CollectionConfig } from 'payload';
|
||||
|
||||
export const Bookmarks: CollectionConfig = {
|
||||
slug: 'bookmarks',
|
||||
admin: {
|
||||
useAsTitle: 'id',
|
||||
defaultColumns: ['user', 'book', 'chapter', 'createdAt'],
|
||||
group: 'User Content',
|
||||
},
|
||||
fields: [
|
||||
{
|
||||
name: 'user',
|
||||
type: 'relationship',
|
||||
relationTo: 'users',
|
||||
required: true,
|
||||
index: true,
|
||||
},
|
||||
{
|
||||
name: 'book',
|
||||
type: 'relationship',
|
||||
relationTo: 'bible-books',
|
||||
required: true,
|
||||
},
|
||||
{
|
||||
name: 'chapter',
|
||||
type: 'number',
|
||||
required: true,
|
||||
min: 1,
|
||||
},
|
||||
{
|
||||
name: 'verse',
|
||||
type: 'number',
|
||||
min: 1,
|
||||
},
|
||||
{
|
||||
name: 'note',
|
||||
type: 'textarea',
|
||||
},
|
||||
],
|
||||
access: {
|
||||
read: ({ req }) => {
|
||||
if (!req.user) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (req.user.role === 'admin' || req.user.role === 'super-admin') {
|
||||
return true;
|
||||
}
|
||||
|
||||
return {
|
||||
user: {
|
||||
equals: req.user.id,
|
||||
},
|
||||
};
|
||||
},
|
||||
create: ({ req }) => !!req.user,
|
||||
update: ({ req }) => !!req.user,
|
||||
delete: ({ req }) => !!req.user,
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user