make quote inlining an option
This commit is contained in:
parent
455989f85b
commit
a45e27038f
|
@ -778,7 +778,9 @@ func xonksaver(user *WhatAbout, item junk.Junk, origin string) *Honk {
|
|||
content += fmt.Sprintf(`<p><a href="%s">%s</a>`, url, url)
|
||||
url = xid
|
||||
}
|
||||
if user.Options.InlineQuotes {
|
||||
content = qutify(user, content)
|
||||
}
|
||||
rid, ok = obj.GetString("inReplyTo")
|
||||
if !ok {
|
||||
if robj, ok := obj.GetMap("inReplyTo"); ok {
|
||||
|
|
1
honk.go
1
honk.go
|
@ -54,6 +54,7 @@ type UserOptions struct {
|
|||
SkinnyCSS bool `json:",omitempty"`
|
||||
OmitImages bool `json:",omitempty"`
|
||||
MentionAll bool `json:",omitempty"`
|
||||
InlineQuotes bool `json:",omitempty"`
|
||||
Avatar string `json:",omitempty"`
|
||||
Banner string `json:",omitempty"`
|
||||
MapLink string `json:",omitempty"`
|
||||
|
|
|
@ -14,7 +14,8 @@
|
|||
<input tabindex=1 type="checkbox" id="omitimages" name="omitimages" value="omitimages" {{ if .User.Options.OmitImages }}checked{{ end }}><span></span>
|
||||
<p><label class="button" for="mentionall">mention all:</label>
|
||||
<input tabindex=1 type="checkbox" id="mentionall" name="mentionall" value="mentionall" {{ if .User.Options.MentionAll }}checked{{ end }}><span></span>
|
||||
|
||||
<p><label class="button" for="inlineqts">inline quotes:</label>
|
||||
<input tabindex=1 type="checkbox" id="inlineqts" name="inlineqts" value="inlineqts" {{ if .User.Options.InlineQuotes }}checked{{ end }}><span></span>
|
||||
<p><label class="button" for="maps">apple map links:</label>
|
||||
<input tabindex=1 type="checkbox" id="maps" name="maps" value="apple" {{ if eq "apple" .User.Options.MapLink }}checked{{ end }}><span></span>
|
||||
<p><label class="button" for="reaction">reaction:</label>
|
||||
|
|
5
web.go
5
web.go
|
@ -1134,6 +1134,11 @@ func saveuser(w http.ResponseWriter, r *http.Request) {
|
|||
} else {
|
||||
options.MentionAll = false
|
||||
}
|
||||
if r.FormValue("inlineqts") == "inlineqts" {
|
||||
options.InlineQuotes = true
|
||||
} else {
|
||||
options.InlineQuotes = false
|
||||
}
|
||||
if r.FormValue("maps") == "apple" {
|
||||
options.MapLink = "apple"
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue