Skip to content

Commit

Permalink
refactor(web): endpoints page
Browse files Browse the repository at this point in the history
  • Loading branch information
ItsNotGoodName committed Jul 24, 2023
1 parent f108884 commit c30af7f
Showing 1 changed file with 15 additions and 14 deletions.
29 changes: 15 additions & 14 deletions web/views/endpoints.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,11 @@ <h2>Showing {{len .Endpoints}} endpoints.</h2>
{{range $val := .Endpoints}}
<section id="endpoint-{{$val.ID}}">
<details>
<summary>{{$val.Name}}</summary>
<summary class="pico-no-chevron">
<div class="flex justify-between">
{{$val.Name}}<b>{{$val.Kind}}</b>
</div>
</summary>
<article>
<div class="flex flex-col gap-4">
<div class="flex justify-between gap-2">
Expand All @@ -23,11 +27,6 @@ <h2>Showing {{len .Endpoints}} endpoints.</h2>
</div>
</div>

<div class="flex justify-between gap-2">
<div>Kind</div>
<div>{{$val.Kind}}</div>
</div>

<div class="flex justify-between gap-2">
<div>
<em title="Do not send attachments to endpoint.">
Expand Down Expand Up @@ -59,15 +58,17 @@ <h2>Showing {{len .Endpoints}} endpoints.</h2>
</div>

{{if $val.Config}}
<h4>Config</h4>
<form>
{{ range $key, $value := $val.Config }}
<label for="config_{{$key}}">
{{$key}}
<textarea {{if $val.Internal}}readonly{{end}} {{if $value}}placeholder="**********" {{end}}
id="config_{{$key}}"></textarea>
</label>
{{ end }}
<fieldset>
<legend><b>Config</b></legend>
{{ range $key, $value := $val.Config }}
<label for="config_{{$key}}">
{{$key}}
<textarea {{if $val.Internal}}readonly{{end}} {{if $value}}placeholder="**********" {{end}}
id="config_{{$key}}"></textarea>
</label>
{{ end }}
</fieldset>
</form>
{{ end }}

Expand Down

0 comments on commit c30af7f

Please sign in to comment.