-
+
Editor •
@@ -25,7 +25,7 @@
Search Results
-
+
@@ -49,15 +49,11 @@ export default {
data: function() {
return {
isDirty: false,
- query: ''
+ tabIndex: 0
}
},
- provide: {
- update: function() {}
- },
methods: {
markDirty: function(dirty) {
- console.log('markDirty:'+dirty)
this.isDirty = dirty
}
},
@@ -65,7 +61,6 @@ export default {
// called before the route that renders this component is confirmed.
// does NOT have access to `this` component instance,
// because it has not been created yet when this guard is called!
- console.log('beforeRouteEnter'+to+from)
next()
},
beforeRouteUpdate (to, from, next) {
@@ -83,13 +78,13 @@ export default {
next(false)
}
}
+ this.tabIndex = 0
next()
},
beforeRouteLeave (to, from, next) {
// called when the route that renders this component is about to
// be navigated away from.
// has access to `this` component instance.
- console.log('beforeRouteLeave'+to+from)
next()
}
}
diff --git a/todo.adoc b/todo.adoc
index 8b26e06..6a13a41 100644
--- a/todo.adoc
+++ b/todo.adoc
@@ -1,27 +1,20 @@
= Todo
:icons: font
-* Operations
+* Backend
+** Authentication
+*** [ ] some kind of user auth
+** save endpoint
+*** [ ] add authentication/authorization
+*** [ ] convert document to adoc (give format?)
+*** [ ] check for unique tags
+** [ ] search endpoint
+*** [ ] search for tags
+*** [ ] fulltext search
+**** with link:https://blevesearch.com/docs/Getting%20Started/[Bleve]
+* [ ] CLI Frontend
+* [ ] Operations
** [ ] dockerize the build
** [ ] integrate CI/CD
** [ ] run on https://cabinet.chrissexton.org[cabinet.chrissexton.org]
** [ ] create redirect or https://cab.chrissexton.org[cab.chrissexton.org]
-* Vue Frontend
-** [ ] spend some time learning about TypeScript/Vue.js style
-** Documents
-*** [x] adoc editor widget
-** Authentication
-*** [ ] some kind of user auth
-** Views
-*** [ ] editor view
-*** [ ] public index/search view
-* Backend
-** [?] save endpoint
-*** [ ] need to generate a slug for entries
-*** [ ] add authentication/authorization
-*** [ ] convert document to adoc (give format?)
-*** [x] test in frontend
-*** [ ] check for unique tags
-*** [ ] set some db fields not null
-** [ ] search endpoint
-* CLI Frontend
diff --git a/web/entry.go b/web/entry.go
index 80c3378..c26ce9e 100644
--- a/web/entry.go
+++ b/web/entry.go
@@ -81,8 +81,11 @@ func (web *Web) newEntry(w http.ResponseWriter, r *http.Request) {
}
func (web *Web) allEntries(w http.ResponseWriter, r *http.Request) {
- r.ParseForm()
- query := r.Form.Get("query")
+ query := ""
+ items, ok := r.URL.Query()["query"]
+ if ok {
+ query = items[0]
+ }
entries, err := entry.Search(web.db, query)
if err != nil {
w.WriteHeader(500)