This commit is contained in:
parent
6920f9ee24
commit
426ab872dd
4 changed files with 35 additions and 43 deletions
|
@ -7,7 +7,7 @@ jobs:
|
|||
steps:
|
||||
- run: apk add --no-cache nodejs git
|
||||
- name: login to container registry
|
||||
run: echo "${{ secrets.PACKAGE_PUBLISH_TOKEN }}" | docker login --username finn --password-stdin git.janky.solutions
|
||||
run: echo "${{ secrets.PACKAGE_PUBLISH_TOKEN }}" | docker login --username ${{ secrets.PACKAGE_PUBLISH_USER }} --password-stdin git.janky.solutions
|
||||
- name: gather metadata for container image tags
|
||||
uses: https://github.com/docker/metadata-action@v5
|
||||
id: meta
|
||||
|
@ -20,7 +20,7 @@ jobs:
|
|||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
platforms: linux/amd64,linux/arm64,linux/arm/v7
|
||||
push: true
|
||||
push: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v') }}
|
||||
build-args: |
|
||||
VERSION_STRING=${{ env.GITHUB_REF_NAME }}
|
||||
- name: update hassio-addons
|
||||
|
|
|
@ -1,28 +1,11 @@
|
|||
{{ template "header.html" . }}
|
||||
<h1>Better Z-Wave Locks</h1>
|
||||
<!-- <header>Active Codes</header>
|
||||
[ <a href="{{ .BaseURL }}/add-code">add</a> ]
|
||||
<table border="1">
|
||||
<tr>
|
||||
<th>Name</th>
|
||||
<th>Code</th>
|
||||
<th>Last used</th>
|
||||
<th>Expires</th>
|
||||
<th>Actions</th>
|
||||
</tr>
|
||||
{{ range .ActiveCodes }}
|
||||
<tr>
|
||||
<td>{{ .Name.Value }}</td>
|
||||
<td>{{ .Code }}</td>
|
||||
<td>0.005ms ago on <a href="{{ $.BaseURL }}/locks/1">Back Door</a></td>
|
||||
<td>{{ .End.Value }}</td>
|
||||
<td><a href="#">details</a> | <a href="#">delete</a></td>
|
||||
</tr>
|
||||
{{ end }}
|
||||
</table> -->
|
||||
<br /><br />
|
||||
<header>locks</header>
|
||||
<ul>
|
||||
{{ range .Locks }}<li><a href="{{ $.BaseURL }}/locks/{{ .ID }}">{{ .Name }} ({{ .ZwaveDeviceID }})</a></li>{{ end }}
|
||||
</ul>
|
||||
<span class="table">
|
||||
{{ range .Locks }}
|
||||
<a class="table-row" href="{{ $.BaseURL }}/locks/{{ .ID }}">
|
||||
<p class="table-cell">{{ if eq .Name "" }}Lock #{{ .ZwaveDeviceID }}{{ else }}{{ .Name }}{{ end }}</p>
|
||||
</a>
|
||||
{{ end }}
|
||||
</span>
|
||||
{{ template "footer.html" }}
|
||||
|
|
|
@ -2,24 +2,18 @@
|
|||
<header>{{ if eq .Data.lock.Name "" }}Lock #{{ .Data.lock.ID }}{{ else }}{{ .Data.lock.Name }}{{ end }}</header>
|
||||
[ <a href="{{ $.BaseURL }}/locks/{{ .Data.lock.ID }}/edit">rename</a> ]<br />
|
||||
<br />
|
||||
<table class="table">
|
||||
<tr>
|
||||
<td>Slot</td>
|
||||
<td>Name</td>
|
||||
<td>Code</td>
|
||||
<td>Enabled?</td>
|
||||
<td>Actions</td>
|
||||
</tr>
|
||||
<span class="table">
|
||||
<span class="table-row">
|
||||
<span class="table-cell">Name</span>
|
||||
<span class="table-cell">Code</span>
|
||||
</span>
|
||||
{{ range $_, $code := .Data.codes }}
|
||||
<tr class="code-{{ if $code.Enabled }}enabled{{ else }}disabled{{ end }}">
|
||||
<td>{{ $code.Slot }}</td>
|
||||
<td>{{ $code.Name }}</td>
|
||||
<td>{{ $code.Code }}</td>
|
||||
<td>{{ if $code.Enabled }}enabled{{ else }}disabled{{ end }}</td>
|
||||
<td>[ <a href="{{ $.BaseURL }}/locks/{{ $.Data.lock.ID }}/codes/{{ $code.Slot }}">edit</a> ]</td>
|
||||
</tr>
|
||||
<a href="{{ $.BaseURL }}/locks/{{ $.Data.lock.ID }}/codes/{{ $code.Slot }}" class="table-row code-{{ if $code.Enabled }}enabled{{ else }}disabled{{ end }}">
|
||||
<span class="table-cell">{{ $code.Name }}</span>
|
||||
<span class="table-cell">{{ $code.Code }}</span>
|
||||
</a>
|
||||
{{ end }}
|
||||
</table>
|
||||
</span>
|
||||
|
||||
<br /><br />
|
||||
|
||||
|
|
|
@ -30,9 +30,24 @@ header {
|
|||
}
|
||||
|
||||
.code-enabled {
|
||||
background-color: #0a0;
|
||||
background-color: #050;
|
||||
}
|
||||
|
||||
.table {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.table-row {
|
||||
border-bottom: solid #999 1px;
|
||||
/* background-color: #333; */
|
||||
height: 3em;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-around;
|
||||
}
|
||||
|
||||
.table-row:first {
|
||||
border-top: solid #999 1px;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue