feat(web): show ICS subscription events in detail view
This commit is contained in:
+10
-3
@@ -25,9 +25,16 @@ type Server struct {
|
||||
icsCache *icssub.Cache
|
||||
}
|
||||
|
||||
// NewServer constructs a web UI Server.
|
||||
func NewServer(cfg *config.Config, st *store.Store, dbase *db.DB, logger *slog.Logger) *Server {
|
||||
return &Server{cfg: cfg, store: st, dbase: dbase, logger: logger, icsCache: icssub.NewCache(icssub.DefaultTTL)}
|
||||
// NewServer constructs a web UI Server. icsCache may be nil, in which
|
||||
// case a private default-TTL cache is created — prefer sharing a single
|
||||
// *icssub.Cache with the CALDAV/CardDAV backends (e.g. from
|
||||
// cmd/server/main.go) so the web calendar page and the DAV protocol
|
||||
// serve identical events for the same ICS subscription.
|
||||
func NewServer(cfg *config.Config, st *store.Store, dbase *db.DB, logger *slog.Logger, icsCache *icssub.Cache) *Server {
|
||||
if icsCache == nil {
|
||||
icsCache = icssub.NewCache(icssub.DefaultTTL)
|
||||
}
|
||||
return &Server{cfg: cfg, store: st, dbase: dbase, logger: logger, icsCache: icsCache}
|
||||
}
|
||||
|
||||
// Handler returns the http.Handler serving the web UI, mounted at "/web/"
|
||||
|
||||
Reference in New Issue
Block a user