add notes field to filters for record keeping
Ted Unangst tedu@tedunangst.com
Mon, 02 Dec 2019 18:02:33 -0500
5 files changed,
12 insertions(+),
1 deletions(-)
M
docs/changelog.txt
→
docs/changelog.txt
@@ -2,6 +2,8 @@ changelog
-- next ++ Add notes field to filters for record keeping. + + Negated search -terms. + A raw sendactivity API action for the bold.
M
views/hfcs.html
→
views/hfcs.html
@@ -9,6 +9,9 @@ <hr>
<h3>new filter</h3> <p><label for="name">filter name:</label><br> <input tabindex=1 type="text" name="name" value="" autocomplete=off> +<p><label for="filtnotes">notes:</label><br> +<textarea tabindex=1 name="filtnotes" height=4> +</textarea> <hr> <h3>match</h3> <p><label for="actor">who or where:</label><br>@@ -48,6 +51,7 @@ {{ $csrf := .FilterCSRF }}
{{ range .Filters }} <section class="honk"> <p>Name: {{ .Name }} +{{ with .Notes }}<p>Notes: {{ . }}{{ end }} <p>Date: {{ .Date.Format "2006-01-02" }} {{ with .Actor }}<p>Who: {{ . }}{{ end }} {{ with .IncludeAudience }} (inclusive) {{ end }} {{ with .Text }}<p>Text: {{ . }}{{ end }}
M
views/style.css
→
views/style.css
@@ -143,10 +143,13 @@ font-size: 1em;
background: var(--bg-page); color: var(--fg); width: 600px; - height: 8em; + height: 4em; margin-bottom: 0.5em; box-sizing: border-box; max-width: 100%; +} +textarea#hostnoise { + height: 8em; } input[type="checkbox"] { position: fixed;
M
web.go
→
web.go
@@ -1878,6 +1878,7 @@ filt.Replace = strings.TrimSpace(r.FormValue("filtreplace"))
if dur := parseDuration(r.FormValue("filtduration")); dur > 0 { filt.Expiration = time.Now().UTC().Add(dur) } + filt.Notes = strings.TrimSpace(r.FormValue("filtnotes")) if filt.Actor == "" && filt.Text == "" && !filt.IsAnnounce { log.Printf("blank filter")