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"}}{{$L := localizer $}}
3{{template "page-header" dict "L" $L "Title" "Meetings"}}
4<section rst-stack rst-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 rst-stack rst-section>
15<h2>Upcoming</h2>
16{{if .Partial}}<div data-partial>{{template "callout" dict "L" $L "Title" .PartialTitle "Body" .PartialBody "Tone" "warning"}}</div>
17{{else if .Upcoming}}
18<div rst-list class="calls-meetings">
19{{range .Upcoming}}
20<div rst-row>
21 <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>
22 {{if .ByAgent}}<span class="calls-row-badge">{{icon "bot"}}{{template "badge" dict "L" $L "Label" "Agent"}}</span>{{end}}
23 <details rst-row-menu name="estilo-menus">
24 <summary aria-label="Actions for {{.Title}}">{{icon "ellipsis"}}</summary>
25 <div estilo-menu class="calls-row-menu">
26 <a estilo-menu-item href="/meetings/{{.Sqid}}/settings"><span estilo-menu-label>Meeting settings</span></a>
27 <a estilo-menu-item href="/meetings/{{.Sqid}}/links/replace"><span estilo-menu-label>Replace the link</span></a>
28 <hr>
29 <a estilo-menu-item="danger" href="/meetings/{{.Sqid}}/end"><span estilo-menu-label>End meeting for everyone</span></a>
30 </div>
31 </details>
32</div>
33{{end}}
34</div>
35{{else}}
36{{template "empty-state" dict "L" $L "Body" "No meetings yet. Start a call now, or make one below and share its link."}}
37{{end}}
38</section>
39<section rst-stack rst-section>
40<h2>New meeting</h2>
41<form rst-form method="post" action="/meetings">
42 {{template "field" dict "L" $L "ID" "title" "Name" "title" "Label" "Title" "Required" true "Maxlength" "200" "Error" .TitleError}}
43 {{template "field" dict "L" $L "ID" "starts_at" "Name" "starts_at" "Label" "Starts" "Help" (printf "In %s. Leave it blank to start now." .Zone) "Type" "datetime-local" "Error" .StartError}}
44 <div rst-form-actions><button type="submit" rst-btn="primary lg">Create meeting</button></div>
45</form>
46</section>
47{{if .Ended}}
48<details class="calls-ended" rst-section>
49<summary>Ended meetings ({{len .Ended}})</summary>
50<div rst-list>
51{{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 "L" $L "Label" "Agent"}}</span>{{end}}</div>{{end}}
52</div>
53</details>
54{{end}}
55{{end}}
56