mirror of
https://github.com/octoleo/syncthing.git
synced 2024-12-23 03:18:59 +00:00
Actually show Node ID in QR (fixes #471)
This commit is contained in:
parent
c9edd31993
commit
f288e00c37
File diff suppressed because one or more lines are too long
@ -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)
|
||||||
|
@ -404,7 +404,7 @@
|
|||||||
|
|
||||||
<modal id="idqr" large="yes" status="info" close="yes" icon="qrcode" title="{{'Node Identification' | translate}} — {{nodeName(thisNode())}}">
|
<modal id="idqr" large="yes" status="info" close="yes" icon="qrcode" title="{{'Node Identification' | translate}} — {{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 -->
|
||||||
|
Loading…
Reference in New Issue
Block a user