Actually show Node ID in QR (fixes #471)

This commit is contained in:
Jakob Borg 2014-08-04 22:53:37 +02:00
parent c9edd31993
commit f288e00c37
3 changed files with 4 additions and 4 deletions

File diff suppressed because one or more lines are too long

View File

@ -526,8 +526,8 @@ func restPostUpgrade(w http.ResponseWriter, r *http.Request) {
} }
func getQR(w http.ResponseWriter, r *http.Request) { func getQR(w http.ResponseWriter, r *http.Request) {
r.ParseForm() var qs = r.URL.Query()
text := r.FormValue("text") var text = qs.Get("text")
code, err := qr.Encode(text, qr.M) code, err := qr.Encode(text, qr.M)
if err != nil { if err != nil {
http.Error(w, "Invalid", 500) http.Error(w, "Invalid", 500)

View File

@ -404,7 +404,7 @@
<modal id="idqr" large="yes" status="info" close="yes" icon="qrcode" title="{{'Node Identification' | translate}} &mdash; {{nodeName(thisNode())}}"> <modal id="idqr" large="yes" status="info" close="yes" icon="qrcode" title="{{'Node Identification' | translate}} &mdash; {{nodeName(thisNode())}}">
<div class="well well-sm text-monospace text-center">{{myID}}</div> <div class="well well-sm text-monospace text-center">{{myID}}</div>
<img ng-if="myID" class="center-block img-thumbnail" src="qr/{{myID}}"/> <img ng-if="myID" class="center-block img-thumbnail" src="qr/?text={{myID}}"/>
</modal> </modal>
<!-- Node editor modal --> <!-- Node editor modal -->