feat: select text across bullets and delete it like a text editor; Ctrl+Z in tasks; notes and lists without emoji; custom done columns complete tasks
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m33s
MindSift CI & Docker Release / Build, Test in Container & Push (push) Successful in 2m33s
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e2b9daba75
commit
6fb98d4002
27 files changed
+535
-64
No files matched your search
@@ -47,7 +47,7 @@ func (s *Server) handleCreateDocument(w http.ResponseWriter, r *http.Request) {
|
||||
var req struct {
|
||||
SpaceID string `json:"spaceId"`
|
||||
Title string `json:"title"`
|
||||
Icon string `json:"icon"`
|
||||
Icon *string `json:"icon"` // "" = no icon; missing = the default
|
||||
FolderPath string `json:"folderPath"`
|
||||
Blocks []domain.DocumentBlock `json:"blocks"`
|
||||
Tags []string `json:"tags"`
|
||||
@@ -58,7 +58,12 @@ func (s *Server) handleCreateDocument(w http.ResponseWriter, r *http.Request) {
|
||||
return
|
||||
}
|
||||
|
||||
doc, err := s.store.CreateDocument(userID, req.SpaceID, req.Title, req.Icon, req.FolderPath, req.Blocks, req.Tags, req.IsPinned)
|
||||
doc, err := s.store.CreateDocument(userID, req.SpaceID, req.Title, derefIcon(req.Icon), req.FolderPath, req.Blocks, req.Tags, req.IsPinned)
|
||||
if err == nil && doc != nil && req.Icon != nil && *req.Icon == "" {
|
||||
if err = s.store.ClearIcon("documents", doc.ID); err == nil {
|
||||
doc.Icon = ""
|
||||
}
|
||||
}
|
||||
if err != nil {
|
||||
writeError(w, http.StatusBadRequest, err.Error())
|
||||
return
|
||||
@@ -330,3 +335,11 @@ func (s *Server) docTitle(userID, docID string) string {
|
||||
}
|
||||
return "Unbenannte Notiz"
|
||||
}
|
||||
|
||||
// derefIcon: the icon of a create request; a missing one lets the store pick the default.
|
||||
func derefIcon(icon *string) string {
|
||||
if icon == nil {
|
||||
return ""
|
||||
}
|
||||
return *icon
|
||||
}
|
||||
Reference in new issue
Block a user