feat(reader): add reader JavaScript loading and backend support
- templates/reader.templ: add script tag to load main.js - Enables reader shell and Alpine components to initialize - internal/handlers/reader.go: add GetMediaReadingProgress handler - Backend now supports fetching reading progress via API - GET /api/media-items/:id/progress returns current progress
This commit is contained in:
@@ -570,7 +570,7 @@ func (h *ReaderHandler) generatePDFThumbnail(fullPath string, page int, width, h
|
||||
return []byte{}, nil
|
||||
}
|
||||
|
||||
func (h *ReaderHandler) ParseEbook(c echo.Context) error {
|
||||
func (h *ReaderHandler) ParseEbook(c *echo.Context) error {
|
||||
mediaItemID := c.Param("mediaItemId")
|
||||
parsedUUID, err := uuid.Parse(mediaItemID)
|
||||
if err != nil {
|
||||
|
||||
@@ -12,6 +12,7 @@ templ Reader(user User, metadata ReaderMetadata, progress ReadingProgress, bookm
|
||||
<link rel="manifest" href="/static/manifest.json"/>
|
||||
<link href="/static/reader-fonts.css" rel="stylesheet"/>
|
||||
<script src="/static/htmx.min.js"></script>
|
||||
<script src="/static/main.js" defer></script>
|
||||
<link href="/static/style.css" rel="stylesheet"/>
|
||||
</head>
|
||||
<body
|
||||
|
||||
Reference in New Issue
Block a user