From 7e1387a7876edf94fed5bf7446e4b7b89eecd6f3 Mon Sep 17 00:00:00 2001 From: codeskyblue Date: Thu, 22 Dec 2016 12:05:34 +0800 Subject: [PATCH] fix display login logic. --- httpstaticserver.go | 1 + main.go | 1 + res/index.tmpl.html | 2 ++ res/js/index.js | 2 +- 4 files changed, 5 insertions(+), 1 deletion(-) diff --git a/httpstaticserver.go b/httpstaticserver.go index 93bde84..7328fbb 100644 --- a/httpstaticserver.go +++ b/httpstaticserver.go @@ -34,6 +34,7 @@ type HTTPStaticServer struct { Theme string PlistProxy string GoogleTrackerId string + AuthType string indexes []IndexFileItem m *mux.Router diff --git a/main.go b/main.go index d01a4d8..60a36d8 100644 --- a/main.go +++ b/main.go @@ -139,6 +139,7 @@ func main() { ss.Title = gcfg.Title ss.GoogleTrackerId = gcfg.GoogleTrackerId ss.Upload = gcfg.Upload + ss.AuthType = gcfg.Auth.Type if gcfg.PlistProxy != "" { u, err := url.Parse(gcfg.PlistProxy) diff --git a/res/index.tmpl.html b/res/index.tmpl.html index 3eb385c..11a5c9d 100644 --- a/res/index.tmpl.html +++ b/res/index.tmpl.html @@ -36,6 +36,7 @@ + [[if eq .AuthType "openid"]] + [[end]]