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
- Monitor feature: lists messages as they arrive, regardless of their
destination mailbox
- Make `@inbucket` mailbox prompt configurable
### Fixed
- 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
PublicDir string
GreetingFile string
MailboxPrompt string
CookieAuthKey string
MonitorVisible bool
MonitorHistory int
@@ -139,6 +140,7 @@ func LoadConfig(filename string) error {
{"web", "template.dir", &webConfig.TemplateDir, true},
{"web", "public.dir", &webConfig.PublicDir, true},
{"web", "greeting.file", &webConfig.GreetingFile, true},
{"web", "mailbox.prompt", &webConfig.MailboxPrompt, false},
{"web", "cookie.auth.key", &webConfig.CookieAuthKey, false},
{"datastore", "path", &dataStoreConfig.Path, true},
}

View File

@@ -73,6 +73,10 @@ ip4.port=9000
# Name of web theme to use
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
template.dir=%(install.dir)s/themes/%(theme)s/templates

View File

@@ -75,6 +75,10 @@ ip4.port=10080
# Name of web theme to use
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
template.dir=%(install.dir)s/themes/%(theme)s/templates

View File

@@ -75,6 +75,10 @@ ip4.port=9000
# Name of web theme to use
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
template.dir=%(themes.dir)s/%(theme)s/templates

View File

@@ -73,6 +73,10 @@ ip4.port=9000
# Name of web theme to use
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
template.dir=%(install.dir)s/themes/%(theme)s/templates

View File

@@ -73,6 +73,10 @@ ip4.port=80
# Name of web theme to use
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
template.dir=%(install.dir)s/themes/%(theme)s/templates

View File

@@ -73,6 +73,10 @@ ip4.port=9000
# Name of web theme to use
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
template.dir=%(install.dir)s\themes\%(theme)s\templates

View File

@@ -61,7 +61,9 @@
placeholder="mailbox"
class="form-control"
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>
<button type="submit" class="btn btn-success">View</button>