mirror of
https://github.com/liyunze-coding/RythonDev.git
synced 2026-09-22 07:44:26 +00:00
updated stream schedule
This commit is contained in:
parent
3ee787c3c0
commit
bf66861cb4
1 changed files with 56 additions and 38 deletions
|
|
@ -4,15 +4,20 @@
|
|||
|
||||
const myLocation = "Australia/Melbourne";
|
||||
|
||||
const myStreamSchedule = [
|
||||
{
|
||||
start: getUpcomingTimeDevTZ(2, "9:30"),
|
||||
end: getUpcomingTimeDevTZ(2, "16:00"),
|
||||
},
|
||||
{
|
||||
start: getUpcomingTimeDevTZ(4, "9:30"),
|
||||
end: getUpcomingTimeDevTZ(4, "16:00"),
|
||||
},
|
||||
type StreamScheduleDay = {
|
||||
start: moment.Moment;
|
||||
end: moment.Moment;
|
||||
};
|
||||
|
||||
const myStreamSchedule: null | StreamScheduleDay[] = [
|
||||
// {
|
||||
// start: getUpcomingTimeDevTZ(2, "9:30"),
|
||||
// end: getUpcomingTimeDevTZ(2, "16:00"),
|
||||
// },
|
||||
// {
|
||||
// start: getUpcomingTimeDevTZ(4, "9:30"),
|
||||
// end: getUpcomingTimeDevTZ(4, "16:00"),
|
||||
// },
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
@ -75,6 +80,9 @@
|
|||
let formattedLocalisedSchedule: Schedule[] = $state([]);
|
||||
|
||||
function displayStreamSchedule() {
|
||||
if (myStreamSchedule == null) {
|
||||
return;
|
||||
}
|
||||
localisedStreamSchedule = myStreamSchedule.map((stream) => ({
|
||||
start: convertToUserLocalTimezone(stream.start),
|
||||
end: convertToUserLocalTimezone(stream.end),
|
||||
|
|
@ -133,6 +141,7 @@
|
|||
</div>
|
||||
{/if}
|
||||
<div class="mt-1">
|
||||
{#if myStreamSchedule.length}
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
|
|
@ -162,6 +171,15 @@
|
|||
{/if}
|
||||
</tbody>
|
||||
</table>
|
||||
{:else}
|
||||
<div>
|
||||
To be announced on <a
|
||||
href="/discord"
|
||||
target="_blank"
|
||||
class="underline hover:text-blue-500">Discord</a
|
||||
>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
|
|
|||
Loading…
Reference in a new issue