-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-cameras.vugu
42 lines (36 loc) · 1.76 KB
/
page-cameras.vugu
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
33
34
35
36
37
38
39
40
41
42
<div>
<main:TitleBar>
<span class="w3-bar-item w3-large" vg-content='fmt.Sprintf("%d Cameras", len(c.Site.Cameras))'></span>
<button class="w3-bar-item w3-button w3-right w3-large w3-ripple w3-teal" @click="c.handleAdd()"><i class="fas fa-plus"></i></button>
</main:TitleBar>
<div class="w3-container">
<ul class="w3-ul w3-card">
<li vg-for="_, camera := range c.Site.CamerasSorted()" class="w3-bar">
<span @click="camera.Delete()" class="w3-bar-item w3-button w3-large w3-right"><i class="far fa-trash-alt"></i></span>
<span @click='c.Navigate("/camera/" + camera.Key(), nil)' class="w3-bar-item w3-button w3-large w3-right"><i class="far fa-edit"></i></span>
<div class="w3-bar-item">
<span class="w3-large" vg-content="camera.Name"></span>
<span vg-content="camera.Key()"></span><br>
</div>
<div class="w3-container">
<span class="w3-large">Photos</span>
<ul class="w3-ul w3-card">
<li vg-for="_, photo := range camera.PhotosSorted()" class="w3-bar">
<span @click="photo.Delete()" class="w3-bar-item w3-button w3-large w3-right"><i class="far fa-trash-alt"></i></span>
<span @click='c.Navigate("/camera/" + camera.Key() + "/photo/" + photo.Key(), nil)' class="w3-bar-item w3-button w3-large w3-right"><i class="far fa-edit"></i></span>
<img :src="photo.jsImageURL" class="w3-bar-item" style="height:100px">
<div class="w3-bar-item">
<span class="w3-large" vg-content="photo.Key()"></span><br>
<span vg-content='fmt.Sprintf("%d mappings", len(photo.Mappings))'></span><br>
<span vg-content='fmt.Sprintf("SSR: %.3f", photo.ResidualSqr())'></span>
</div>
</li>
</ul>
</div>
</li>
</ul>
</div>
</div>
<script type="application/x-go">
import "fmt"
</script>