1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
| {% import ( "{{{ .Package }}}/app" "{{{ .Package }}}/app/controller/cutil" "{{{ .Package }}}/views/components" "{{{ .Package }}}/views/layout" ) %}
{% code type List struct { layout.Basic Hars []string } %}
{% func (p *List) Body(as *app.State, ps *cutil.PageState) %} <div class="card"> <h3>{%= components.SVGRefIcon(`upload`, ps) %}HTTP Archives</h3> <div> <form action="" method="post" enctype="multipart/form-data"> <div class="mt"><input type="file" name="f" /></div> <div class="mt"><input type="text" name="n" placeholder="Name (optional)" /></div> <div class="mt"><button type="submit">Upload HAR</button></div> </form> </div> </div> <div class="card"> <h3>{%= components.SVGRefIcon(`book`, ps) %} Managed Archives</h3> <ul class="mts"> {%- for _, r := range p.Hars -%} <li><a href="/har/{%s r %}">{%s r %}</a></li> {%- endfor -%} </ul> </div> {% endfunc %}
|