blob: a001e215855aee0c7e24888c908ef9c94bc9a7de (
plain)
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
<%- include('header', { title: "Rally the Troops!", refresh: (active_games.length > 0 ? 300 : 0) }) _%>
<img class="logo avatar" src="<%= avatar %>" width="80" height="80">
<p>
Welcome, <%= user.name %>!
<p>
Your mail address is <%= user.mail %>.
<br clear=left>
<p>»
<%
if (user.notify) {
%><a href="/unsubscribe">Disable mail notifications</a><%
} else {
%><a href="/subscribe">Enable mail notifications</a><%
}
%>
<br>»
Change
<a href="/change_password">password</a>,
<a href="/change_mail">mail address</a>,
<a href="/change_name">name</a>,
or <a href="/change_about">profile text</a>.
<br>»
<a href="/chat">Chat log</a>
<br>»
<a href="/logout">Logout</a>
<%_ if (open_games.length > 0) { _%>
<h2>Open Games</h2>
<table class="game">
<tr><th>ID<th>Game<th>Scenario<th>Options<th>Players<th>Description<th>Created<th>
<%_ open_games.forEach((row) => { _%>
<tr>
<td class="id"><%= row.game_id %>
<td class="name"><a href="/info/<%= row.title_id %>"><%= row.title_name %></a>
<td class="scenario"><%= row.scenario %>
<td class="options"><%- row.options %>
<td class="players"><%- row.player_names %>
<td class="description"><%= row.description %>
<td class="time"><%= row.ctime %>
<td class="command"><a href="/join/<%= row.game_id %>">Join</a>
<%_ }); _%>
</table>
<%_ } _%>
<%_ if (active_games.length > 0) { _%>
<h2>Active Games</h2>
<table class="game">
<tr><th>ID<th>Game<th>Scenario<th>Options<th>Players<th>Description<th>Changed<th>Turn<th>
<%_ active_games.forEach((row) => { _%>
<tr>
<td class="id"><%= row.game_id %>
<td class="title"><a href="/info/<%= row.title_id %>"><%= row.title_name %></a>
<td class="scenario"><%= row.scenario %>
<td class="options"><%- row.options %>
<td class="players"><%- row.player_names %>
<td class="description"><%= row.description %>
<td class="time"><%= row.mtime %>
<%_
if (row.is_active) {
%><td class="role is_active"><%= row.active %><%
} else {
%><td class="role"><%= row.active %><%
}
if (row.is_shared) {
%><td class="command"><a href="/join/<%= row.game_id %>">Play</a><%
} else {
%><td class="command"><a href="/<%- row.title_id %>/play:<%- row.game_id %>:<%- row.your_role %>">Play</a><%
}
_%>
<%_ }); _%>
</table>
<%_ } _%>
<%_ if (finished_games.length > 0) { _%>
<h2>Finished Games</h2>
<table class="game">
<tr><th>ID<th>Game<th>Scenario<th>Options<th>Players<th>Description<th>Finished<th>Result<th>
<%_ finished_games.forEach((row) => { _%>
<tr>
<td class="id"><%= row.game_id %>
<td class="title"><a href="/info/<%= row.title_id %>"><%= row.title_name %></a>
<td class="scenario"><%= row.scenario %>
<td class="options"><%- row.options %>
<td class="players"><%- row.player_names %>
<td class="description"><%= row.description %>
<td class="time"><%= row.mtime %>
<td class="result"><%= row.result %>
<%_
if (row.is_shared) {
%><td class="command"><a href="/join/<%= row.game_id %>">View</a><%
} else {
%><td class="command"><a href="/<%- row.title_id %>/play:<%- row.game_id %>:<%- row.your_role %>">View</a><%
}
_%>
<%_ }); _%>
</table>
<%_ } _%>
<%_ if (open_games.length === 0 && active_games.length === 0 && finished_games.length === 0) { _%>
<p>
You don't have any current or finished games.
<%_ } _%>
|