Преглед на файлове

Land on login form for private instances

pull/274/head
Matt Baer преди 4 години
родител
ревизия
151ec71163
променени са 2 файла, в които са добавени 5 реда и са изтрити 1 реда
  1. +4
    -0
      app.go
  2. +1
    -1
      templates/base.tmpl

+ 4
- 0
app.go Целия файл

@@ -221,6 +221,10 @@ func handleViewHome(app *App, w http.ResponseWriter, r *http.Request) error {
return handleViewPad(app, w, r)
}

if app.cfg.App.Private {
return viewLogin(app, w, r)
}

if land := app.cfg.App.LandingPath(); land != "/" {
return impart.HTTPError{http.StatusFound, land}
}


+ 1
- 1
templates/base.tmpl Целия файл

@@ -48,7 +48,7 @@
{{ end }}
{{if and (and .LocalTimeline .CanViewReader) (not .Chorus)}}<a href="/read"{{if eq .Path "/read"}} class="selected"{{end}}>Reader</a>{{end}}
{{if and (and (and .Chorus .OpenRegistration) (not .Username)) (or (not .Private) (ne .Landing ""))}}<a href="/signup"{{if eq .Path "/signup"}} class="selected"{{end}}>Sign up</a>{{end}}
{{if not .Username}}<a href="/login"{{if eq .Path "/login"}} class="selected"{{end}}>Log in</a>{{else if .SimpleNav}}<a href="/me/logout">Log out</a>{{end}}
{{if and (not .Username) (not .Private)}}<a href="/login"{{if eq .Path "/login"}} class="selected"{{end}}>Log in</a>{{else if .SimpleNav}}<a href="/me/logout">Log out</a>{{end}}
{{ end }}
</nav>
{{if .Chorus}}{{if .Username}}<div class="right-side" style="font-size: 0.86em;">


Зареждане…
Отказ
Запис