1
0
mirror of https://github.com/jhillyerd/inbucket.git synced 2025-12-20 02:57:05 +00:00

Switch to storing To addresses as a slice

- Changes on-disk storage format
- Changes JSON API
- To and From values are now parsed/formatted by Go's mail.ParseAddress
  function
- Fixed bug in list-entry-template, was not escaping HTML characters
- Updated tests
This commit is contained in:
James Hillyerd
2016-09-21 22:12:20 -07:00
parent 01ea89e7e2
commit 017a097588
11 changed files with 46 additions and 26 deletions

View File

@@ -53,7 +53,12 @@
<dt>From:</dt>
<dd>{{.message.From}}</dd>
<dt>To:</dt>
<dd>{{.message.To}}</dd>
<dd>
{{range $i, $addr := .message.To}}
{{- if $i}},{{end}}
{{$addr -}}
{{end}}
</dd>
<dt>Date:</dt>
<dd>{{.message.Date}}</dd>
<dt>Subject:</dt>

View File

@@ -15,9 +15,9 @@ $(document).ready(function() {
<script type="text/html" id="list-entry-template">
<button data-id="id" type="button" class="message-list-entry list-group-item">
<div class="row">
<div class="col-sm-4 col-md-12 text-primary" data-content="subject"
<div class="col-sm-4 col-md-12 text-primary" data-content-text="subject"
data-format="subject"/>
<div class="col-sm-4 col-md-12 small" data-content="from"/>
<div class="col-sm-4 col-md-12 small" data-content-text="from"/>
<div class="col-sm-4 col-md-12 small" data-content="date" data-format="date"/>
</div>
</button>
@@ -34,8 +34,8 @@ $(document).ready(function() {
<div class="col-md-3">
<div class="input-group">
<input id="message-search"
type="search"
class="form-control"
type="search"
class="form-control"
placeholder="search"
data-toggle="tooltip"
data-placement="top"