fix: update reader service and handler

- Add panel_layout to getDefaultSettings() for dockable panels
- Remove template rendering from ShowReader (router handles SSR)
- Fix pgtype.Int4 marshaling to JSON (no explicit int conversion)
- Remove unused strings import from handlers
This commit is contained in:
2026-04-03 17:20:23 -04:00
parent e8544ac8f4
commit d91e5fac3d
2 changed files with 11 additions and 23 deletions
+9
View File
@@ -402,5 +402,14 @@ func (s *ReaderService) getDefaultSettings() map[string]interface{} {
"tap_zone_size": 30,
"auto_scroll": false,
"panel_zoom_enabled": true,
// Dockable panel defaults
"panel_layout": map[string]interface{}{
"toc": map[string]interface{}{"side": "left", "visible": true, "collapsed": false, "width_px": 320, "order": 1, "locked": false, "last_valid_side": "left"},
"settings": map[string]interface{}{"side": "left", "visible": false, "collapsed": true, "width_px": 380, "order": 2, "locked": false, "last_valid_side": "left"},
"navigator": map[string]interface{}{"side": "right", "visible": true, "collapsed": false, "width_px": 200, "order": 1, "locked": false, "last_valid_side": "right"},
"bookmarks": map[string]interface{}{"side": "right", "visible": false, "collapsed": true, "width_px": 280, "order": 2, "locked": false, "last_valid_side": "right"},
"mobile_nav_visible": false,
},
}
}