Add a 5 minute period before a lecture where you can join
All checks were successful
Build and Publish Docker Container / build (push) Successful in 5m46s

This commit is contained in:
Joshua Coles 2023-10-12 09:40:59 +01:00
parent ea8a7a7871
commit 0cb56424a1

View File

@ -60,12 +60,13 @@
</td>
<td class="whitespace-nowrap px-3 py-4 text-sm text-gray-500">
<% if lecture.start_time.future? %>
<% joinable_time = lecture.start_time - 5.minutes %>
<% if joinable_time.future? %>
<%= button_to "Prepare",
lecture_start_preparation_path(id: lecture.id),
class: 'action-button'
%>
<% elsif lecture.start_time.past? && !lecture.attended? %>
<% elsif joinable_time.past? && !lecture.attended? %>
<% start_label = if lecture.is_live? then
"Join"
else