feat: add possibility to hide upload button (#25)
All checks were successful
/ pre-commit (push) Successful in 1m4s
All checks were successful
/ pre-commit (push) Successful in 1m4s
I was asked to add the possibility to hide the upload button to avoid users confuse this tool for a file sharing app. This is only on the front. No breaking changes, by default the button is displayed. Co-authored-by: Thibault Piron <thibault.a.piron@gmail.com> Reviewed-on: #25 Reviewed-by: Julien Riou <jriou@monitoring@riou.xyz> Co-authored-by: tapiron <tapiron@monitoring@riou.xyz> Co-committed-by: tapiron <tapiron@monitoring@riou.xyz>
This commit is contained in:
parent
33628331f4
commit
e03aa6b87a
4 changed files with 34 additions and 27 deletions
|
@ -186,14 +186,15 @@ func (h *GetProtectedNoteHandler) ServeHTTP(w http.ResponseWriter, r *http.Reque
|
|||
}
|
||||
|
||||
type PageData struct {
|
||||
Title string
|
||||
Version string
|
||||
Expirations []int
|
||||
Expiration int
|
||||
Languages []string
|
||||
Err error
|
||||
URL string
|
||||
Note *Note
|
||||
Title string
|
||||
Version string
|
||||
Expirations []int
|
||||
Expiration int
|
||||
Languages []string
|
||||
Err error
|
||||
URL string
|
||||
Note *Note
|
||||
EnableUploadFileButton bool
|
||||
}
|
||||
|
||||
type HomeHandler struct {
|
||||
|
@ -431,6 +432,7 @@ func (s *Server) Start() error {
|
|||
if s.config.ShowVersion {
|
||||
p.Version = s.version
|
||||
}
|
||||
p.EnableUploadFileButton = s.config.EnableUploadFileButton
|
||||
|
||||
templates, err := template.New("templates").Funcs(funcs).ParseFS(templatesFS, "templates/*.html")
|
||||
if err != nil {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue