oficina / meet Public

Clone
git clone https://amadan.net/oficina/meet

Plain git — no account needed to clone.

Download

Download this file

1{{define "head"}}<script defer src="{{asset "static/zone.js"}}"></script>{{end}}
2{{define "content"}}
3{{template "page-header" dict "Title" "Meetings"}}
4<section>
5<form method="post" action="/meetings/start">
6 {{/* zone.js fills this with the browser's own time zone, so a call's
7 automatic title ("Call, 30 Sep 21:47") is in the starter's time,
8 not the server's. Without script it stays empty, and the title
9 names the zone it was written in. */}}
10 <input type="hidden" name="zone" value="" data-calls-zone>
11 <button type="submit" rst-btn="primary lg">Start a call</button>
12</form>
13</section>
14<section>
15<h2>Upcoming</h2>
16{{if .Upcoming}}
17<div rst-list class="calls-meetings">
18{{range .Upcoming}}
19<div rst-row>
20 <span rst-row-main><a href="/m/{{.Sqid}}/join">{{.Title}}</a><small rst-row-sub>{{if .ByAgent}}By {{.CreatedByPrincipal}} · {{end}}{{if .Starts}}Starts {{.Starts}}{{else}}Starts now{{end}}{{if not .LinkPresent}} · No live link{{end}}</small></span>
21 {{if .ByAgent}}<span class="calls-row-badge">{{icon "bot"}}{{template "badge" dict "Label" "Agent"}}</span>{{end}}
22 <details rst-row-menu name="estilo-menus">
23 <summary aria-label="Actions for {{.Title}}">{{icon "ellipsis"}}</summary>
24 <div estilo-menu class="calls-row-menu">
25 <a estilo-menu-item href="/meetings/{{.Sqid}}/settings"><span estilo-menu-label>Meeting settings</span></a>
26 <a estilo-menu-item href="/meetings/{{.Sqid}}/links/replace"><span estilo-menu-label>Replace the link</span></a>
27 <hr>
28 <a estilo-menu-item="danger" href="/meetings/{{.Sqid}}/end"><span estilo-menu-label>End meeting for everyone</span></a>
29 </div>
30 </details>
31</div>
32{{end}}
33</div>
34{{else}}
35{{template "empty-state" dict "Body" "No meetings yet. Start a call now, or make one below and share its link."}}
36{{end}}
37</section>
38<section>
39<h2>New meeting</h2>
40<form rst-form method="post" action="/meetings">
41 {{template "field" dict "ID" "title" "Name" "title" "Label" "Title" "Required" true "Maxlength" "200" "Error" .TitleError}}
42 {{template "field" dict "ID" "starts_at" "Name" "starts_at" "Label" "Starts" "Help" (printf "In %s. Leave it blank to start now." .Zone) "Type" "datetime-local" "Error" .StartError}}
43 <div rst-form-actions><button type="submit" rst-btn="primary lg">Create meeting</button></div>
44</form>
45</section>
46{{if .Ended}}
47<details class="calls-ended">
48<summary>Ended meetings ({{len .Ended}})</summary>
49<div rst-list>
50{{range .Ended}}<div rst-row><span rst-row-main><span class="calls-row-title">{{.Title}}</span><small rst-row-sub>{{if .ByAgent}}By {{.CreatedByPrincipal}} · {{end}}Ended</small></span>{{if .ByAgent}}<span class="calls-row-badge">{{icon "bot"}}{{template "badge" dict "Label" "Agent"}}</span>{{end}}</div>{{end}}
51</div>
52</details>
53{{end}}
54{{end}}
55