1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-17 09:37:02 +00:00

Make @inbucket prompt configurable, closes #31

This commit is contained in:
James Hillyerd
2017-01-28 17:27:50 -08:00
parent de5b9a824b
commit e6f95c9367
9 changed files with 30 additions and 1 deletions

View File

@@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](http://semver.org/).
- Go client for REST API - Go client for REST API
- Monitor feature: lists messages as they arrive, regardless of their - Monitor feature: lists messages as they arrive, regardless of their
destination mailbox destination mailbox
- Make `@inbucket` mailbox prompt configurable
### Fixed ### Fixed
- No longer run out of file handles when dealing with a large number of - No longer run out of file handles when dealing with a large number of

View File

@@ -39,6 +39,7 @@ type WebConfig struct {
TemplateCache bool TemplateCache bool
PublicDir string PublicDir string
GreetingFile string GreetingFile string
MailboxPrompt string
CookieAuthKey string CookieAuthKey string
MonitorVisible bool MonitorVisible bool
MonitorHistory int MonitorHistory int
@@ -139,6 +140,7 @@ func LoadConfig(filename string) error {
{"web", "template.dir", &webConfig.TemplateDir, true}, {"web", "template.dir", &webConfig.TemplateDir, true},
{"web", "public.dir", &webConfig.PublicDir, true}, {"web", "public.dir", &webConfig.PublicDir, true},
{"web", "greeting.file", &webConfig.GreetingFile, true}, {"web", "greeting.file", &webConfig.GreetingFile, true},
{"web", "mailbox.prompt", &webConfig.MailboxPrompt, false},
{"web", "cookie.auth.key", &webConfig.CookieAuthKey, false}, {"web", "cookie.auth.key", &webConfig.CookieAuthKey, false},
{"datastore", "path", &dataStoreConfig.Path, true}, {"datastore", "path", &dataStoreConfig.Path, true},
} }

View File

@@ -73,6 +73,10 @@ ip4.port=9000
# Name of web theme to use # Name of web theme to use
theme=bootstrap theme=bootstrap
# Prompt displayed between the mailbox entry field and View button. Leave
# empty or comment out to hide the prompt.
mailbox.prompt=@inbucket
# Path to the selected themes template files # Path to the selected themes template files
template.dir=%(install.dir)s/themes/%(theme)s/templates template.dir=%(install.dir)s/themes/%(theme)s/templates

View File

@@ -75,6 +75,10 @@ ip4.port=10080
# Name of web theme to use # Name of web theme to use
theme=bootstrap theme=bootstrap
# Prompt displayed between the mailbox entry field and View button. Leave
# empty or comment out to hide the prompt.
mailbox.prompt=@inbucket
# Path to the selected themes template files # Path to the selected themes template files
template.dir=%(install.dir)s/themes/%(theme)s/templates template.dir=%(install.dir)s/themes/%(theme)s/templates

View File

@@ -75,6 +75,10 @@ ip4.port=9000
# Name of web theme to use # Name of web theme to use
theme=bootstrap theme=bootstrap
# Prompt displayed between the mailbox entry field and View button. Leave
# empty or comment out to hide the prompt.
mailbox.prompt=@inbucket
# Path to the selected themes template files # Path to the selected themes template files
template.dir=%(themes.dir)s/%(theme)s/templates template.dir=%(themes.dir)s/%(theme)s/templates

View File

@@ -73,6 +73,10 @@ ip4.port=9000
# Name of web theme to use # Name of web theme to use
theme=bootstrap theme=bootstrap
# Prompt displayed between the mailbox entry field and View button. Leave
# empty or comment out to hide the prompt.
mailbox.prompt=@inbucket
# Path to the selected themes template files # Path to the selected themes template files
template.dir=%(install.dir)s/themes/%(theme)s/templates template.dir=%(install.dir)s/themes/%(theme)s/templates

View File

@@ -73,6 +73,10 @@ ip4.port=80
# Name of web theme to use # Name of web theme to use
theme=bootstrap theme=bootstrap
# Prompt displayed between the mailbox entry field and View button. Leave
# empty or comment out to hide the prompt.
mailbox.prompt=@inbucket
# Path to the selected themes template files # Path to the selected themes template files
template.dir=%(install.dir)s/themes/%(theme)s/templates template.dir=%(install.dir)s/themes/%(theme)s/templates

View File

@@ -73,6 +73,10 @@ ip4.port=9000
# Name of web theme to use # Name of web theme to use
theme=bootstrap theme=bootstrap
# Prompt displayed between the mailbox entry field and View button. Leave
# empty or comment out to hide the prompt.
mailbox.prompt=@inbucket
# Path to the selected themes template files # Path to the selected themes template files
template.dir=%(install.dir)s\themes\%(theme)s\templates template.dir=%(install.dir)s\themes\%(theme)s\templates

View File

@@ -61,7 +61,9 @@
placeholder="mailbox" placeholder="mailbox"
class="form-control" class="form-control"
aria-describedby="at-inbucket-addon"/> aria-describedby="at-inbucket-addon"/>
<span class="input-group-addon" id="at-inbucket-addon">@inbucket</span> {{with .ctx.WebConfig.MailboxPrompt}}
<span class="input-group-addon" id="at-inbucket-addon">{{.}}</span>
{{end}}
</div> </div>
</div> </div>
<button type="submit" class="btn btn-success">View</button> <button type="submit" class="btn btn-success">View</button>