-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
app.vue
215 lines (193 loc) · 5.32 KB
/
app.vue
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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<template>
<NuxtPage />
<AnnouncementDialog v-if="shouldShowAnnouncement" id="sept-2024">
<template #title>
<h1 class="text-2xl font-bold font-dumbledor">
Changelog for September 2024
</h1>
<div class="text-lg text-stone-400">{{ formattedAnnouncementDate }}</div>
</template>
<p class="p-2">
There's a number of fun changes that have come out this month! Here are the changes for September 2024:
</p>
<ul class="list-disc list-inside p-2">
<li>
The new Boffin role has been added to the list of roles.
</li>
<li>
Add a new "Dashboard" page that shows recent activity and upcoming events the user has signed up for.
</li>
<li>
Add a public profile page for users, displaying favorite games and all played roles.
</li>
<li>
Add percentages to charts (instead of just the total count).
</li>
<li>
Add links to communities on the "Communities" page.
</li>
<li>
Limit games shown on the roles and scripts page to the current user's, instead of all public games in the database.
</li>
<li>
Add functionality to copy a grimoire from a previous game.
</li>
<li>
Add support for up to 25 players in a game.
</li>
<li>
Add new date, player count, script, and location filters to the games view.
</li>
<li>
Allow users to tag themselves as a co-storyteller for a game.
</li>
<li>
Improve search functionality.
</li>
<li>
Improve the style of the "Games over time" chart.
</li>
<li>
Improve transitions between pages to be smoother.
</li>
<li>
Properly alphabetize the roles in the "all roles" view of player profiles.
</li>
<li>
Expand the range for games to be merged so that they don't need to be recorded on the same exact date.
</li>
<li>
Change how saving a game works to only warn users if the game is being created on the current day.
</li>
<li>
When multiple games are being edited, the user is now returned to the games list instead of the dashbaord.
</li>
<li>
Fix a bug related to displaying stats in scripts.
</li>
<li>
Fix multiple bugs related to fetching roles for scripts.
</li>
<li>
Fix a bug where a player name in the grimoire would try to default to a previously-entered name that was similar.
</li>
</ul>
<p class="p-2">
Please let me know on Discord if you have any issues or feedback. Thank
you!
</p>
</AnnouncementDialog>
<VitePwaManifest />
</template>
<script setup lang="ts">
import {
Chart as ChartJS,
Title,
Tooltip,
Legend,
BarElement,
CategoryScale,
LinearScale,
ArcElement,
PointElement,
LineElement,
Colors,
PolarAreaController,
RadialLinearScale,
Filler,
} from "chart.js";
import dayjs from "dayjs";
import utc from "dayjs/plugin/utc";
import timezone from "dayjs/plugin/timezone";
import type { User } from "~/composables/useUsers";
dayjs.extend(utc);
dayjs.extend(timezone);
const users = useUsers();
const user = useSupabaseUser();
const featureFlags = useFeatureFlags();
await featureFlags.init();
await featureFlags.fetchScheduledMaintenance();
watch(
user,
async (current, previous) => {
if (featureFlags.isEnabled("maintenance")) {
return;
}
if (current?.id !== previous?.id) {
try {
await users.fetchMe(current?.id);
} catch (e) {
console.error("Error fetching user settings", e);
}
}
},
{
immediate: true,
deep: true,
}
);
const announcementDate = dayjs.tz("2024-10-01", "America/Los_Angeles");
const maintenanceMode = featureFlags.maintenanceIsScheduled;
const formattedAnnouncementDate = computed(() => {
return new Intl.DateTimeFormat(navigator.language, {
dateStyle: "full",
}).format(announcementDate.toDate());
});
const formattedMaintenceDayAndMonth = computed(() => {
if (!maintenanceMode) return "";
return new Intl.DateTimeFormat(navigator.language, {
dateStyle: "full",
}).format(maintenanceMode);
});
const formattedMaintenanceStart = computed(() => {
if (!maintenanceMode) return "";
return new Intl.DateTimeFormat(navigator.language, {
dateStyle: "full",
timeStyle: "short",
}).format(maintenanceMode);
});
const shouldShowAnnouncement = computed(() => {
return dayjs().isAfter(announcementDate);
});
useHead({
titleTemplate: (titleChunk) => {
return titleChunk ? `${titleChunk} - ClockTracker` : "ClockTracker";
},
});
ChartJS.register(
Title,
Tooltip,
Legend,
BarElement,
CategoryScale,
RadialLinearScale,
LinearScale,
ArcElement,
PointElement,
LineElement,
PolarAreaController,
Filler,
Colors
);
</script>
<style>
body {
@apply bg-stone-50 dark:bg-stone-800 font-gothic dark:text-stone-100;
}
:root {
--vs-controls-color: #664cc3;
--vs-border-color: #664cc3;
--vs-dropdown-bg: #282c34;
--vs-dropdown-color: #cc99cd;
--vs-dropdown-option-color: #cc99cd;
--vs-selected-bg: #664cc3;
--vs-selected-color: #eeeeee;
--vs-search-input-color: #eeeeee;
--vs-dropdown-option--active-bg: #664cc3;
--vs-dropdown-option--active-color: #eeeeee;
}
.v-select {
white-space: nowrap;
position: relative;
}
</style>