1
1
<template >
2
- <div class =" schedule-container" >
3
- <!-- Ad -->
4
- <AdsByGoogle ad-slot =" 5905320802" ad-format =" " class =" is-advertisement" />
5
- <!-- Header -->
6
- <span class =" notification is-header expandable" />
7
- <span class =" notification is-header time" >
8
- {{ $t('marathon.schedule.table.time') }}
9
- </span >
10
- <span class =" notification is-header runners" >
11
- {{ $t('marathon.schedule.table.runner') }}
12
- </span >
13
- <span class =" notification is-header game" >
14
- {{ $t('marathon.schedule.table.game') }}
15
- </span >
16
- <span class =" notification is-header category" >
17
- {{ $t('marathon.schedule.table.category') }}
18
- </span >
19
- <span class =" notification is-header type" >
20
- {{ $t('marathon.schedule.table.type') }}
21
- </span >
22
- <span class =" notification is-header console" >
23
- {{ $t('marathon.schedule.table.console') }}
24
- </span >
25
- <span class =" notification is-header estimate" >
26
- {{ $t('marathon.schedule.table.estimate') }}
27
- </span >
28
- <span class =" notification is-header setup" >
29
- {{ $t('marathon.schedule.table.setup') }}
30
- </span >
31
- <!-- Main Schedule Loop -->
32
- <template v-if =" runs " >
33
- <template v-for =" (run , index ) in runs " >
34
- <!-- Ad -->
35
- <ClientOnly :key =" 'wrapper-advertisement' + index" >
36
- <AdsByGoogle v-if =" advertisementIndices.includes(index)" :key =" 'advertisement' + index" ad-slot =" 5905320802" ad-format =" " class =" is-advertisement" />
37
- <div v-show =" shouldShowDay(index) && index !== 0" :key =" 'not-advertisement' + index" class =" is-spacer" />
38
- </ClientOnly >
39
-
40
- <div v-show =" shouldShowDay(index)" :key =" 'day' + index" class =" day notification is-info" >
41
- {{ $d(new Date(run.date), 'longDate') }}
42
- </div >
43
-
44
- <span :id =" getId(run)" :key =" 'expandable' + index" class =" notification is-expandable expandable" :class =" getRowParity(index, run)" @click =" expand(run)" >
45
- <FontAwesomeIcon :icon =" [ 'fas', expanded.has(run.id) ? 'caret-down' : 'caret-right' ]" />
46
- </span >
47
- <span :id =" 'run-' + run.id" :key =" 'time' + index" class =" notification is-expandable time" :class =" getRowParity(index, run)" @click =" expand(run)" >
48
- {{ $d(new Date(run.date), 'shortTime') }}
49
- </span >
50
-
51
- <span v-if =" run.setupBlock" :key =" 'setupText' + index" class =" notification is-expandable setup-text" :class =" getRowParity(index, run)" @click =" expand(run)" >
52
- {{ (run.setupBlockText || $t('marathon.schedule.setupBlock')) }}
53
- </span >
54
- <template v-else >
55
- <span :key =" 'runners' + index" class =" notification is-expandable runners" :class =" getRowParity(index, run)" @click =" expand(run)" >
56
- <p v-for =" runner in run.runners" :key =" 'runners' + index + 'runner' + runner.id" >
57
- {{ runner.username }}
58
- </p >
2
+ <div >
3
+ <div class =" schedule-container" >
4
+ <!-- Ad -->
5
+ <AdsByGoogle ad-slot =" 5905320802" ad-format =" " class =" is-advertisement" />
6
+ <!-- Header -->
7
+ <span class =" notification is-header expandable" />
8
+ <span class =" notification is-header time" >
9
+ {{ $t('marathon.schedule.table.time') }}
10
+ </span >
11
+ <span class =" notification is-header runners" >
12
+ {{ $t('marathon.schedule.table.runner') }}
13
+ </span >
14
+ <span class =" notification is-header game" >
15
+ {{ $t('marathon.schedule.table.game') }}
16
+ </span >
17
+ <span class =" notification is-header category" >
18
+ {{ $t('marathon.schedule.table.category') }}
19
+ </span >
20
+ <span class =" notification is-header type" >
21
+ {{ $t('marathon.schedule.table.type') }}
22
+ </span >
23
+ <span class =" notification is-header console" >
24
+ {{ $t('marathon.schedule.table.console') }}
25
+ </span >
26
+ <span class =" notification is-header estimate" >
27
+ {{ $t('marathon.schedule.table.estimate') }}
28
+ </span >
29
+ <span class =" notification is-header setup" >
30
+ {{ $t('marathon.schedule.table.setup') }}
31
+ </span >
32
+ <!-- Main Schedule Loop -->
33
+ <template v-if =" runs " >
34
+ <template v-for =" (run , index ) in runs " >
35
+ <!-- Ad -->
36
+ <ClientOnly :key =" 'wrapper-advertisement' + index" >
37
+ <AdsByGoogle v-if =" advertisementIndices.includes(index)" :key =" 'advertisement' + index" ad-slot =" 5905320802" ad-format =" " class =" is-advertisement" />
38
+ <div v-show =" shouldShowDay(index) && index !== 0" :key =" 'not-advertisement' + index" class =" is-spacer" />
39
+ </ClientOnly >
40
+ <div v-show =" shouldShowDay(index)" :key =" 'day' + index" class =" day notification is-info" >
41
+ {{ $d(new Date(run.date), 'longDate') }}
42
+ </div >
43
+ <span :id =" getId(run)" :key =" 'expandable' + index" class =" notification is-expandable expandable" :class =" getRowParity(index, run)" @click =" expand(run)" >
44
+ <FontAwesomeIcon :icon =" [ 'fas', expanded.has(run.id) ? 'caret-down' : 'caret-right' ]" />
59
45
</span >
60
- <span :key =" 'game ' + index" class =" notification is-expandable game " :class =" getRowParity(index, run)" @click =" expand(run)" >
61
- {{ run.gameName }}
46
+ <span :id = " 'run-' + run.id " : key =" 'time ' + index" class =" notification is-expandable time " :class =" getRowParity(index, run)" @click =" expand(run)" >
47
+ {{ $d(new Date( run.date), 'shortTime') }}
62
48
</span >
63
- </template >
64
-
65
- <span :key =" 'category' + index" class =" notification is-expandable category" :class =" getRowParity(index, run)" @click =" expand(run)" >
66
- {{ run.categoryName }}
67
- </span >
68
- <span :key =" 'type' + index" class =" notification is-expandable type" :class =" getRowParity(index, run)" @click =" expand(run)" >
69
- {{ $t(`marathon.schedule.type.${run.type}`) }}
70
- </span >
71
- <span :key =" 'console' + index" class =" notification is-expandable console" :class =" getRowParity(index, run)" @click =" expand(run)" >
72
- <span >
73
- {{ run.console }}
49
+ <span v-if =" run.setupBlock" :key =" 'setupText' + index" class =" notification is-expandable setup-text" :class =" getRowParity(index, run)" @click =" expand(run)" >
50
+ {{ (run.setupBlockText || $t('marathon.schedule.setupBlock')) }}
51
+ </span >
52
+ <template v-else >
53
+ <span :key =" 'runners' + index" class =" notification is-expandable runners" :class =" getRowParity(index, run)" @click =" expand(run)" >
54
+ <p v-for =" runner in run.runners" :key =" 'runners' + index + 'runner' + runner.id" >
55
+ {{ runner.username }}
56
+ </p >
57
+ </span >
58
+ <span :key =" 'game' + index" class =" notification is-expandable game" :class =" getRowParity(index, run)" @click =" expand(run)" >
59
+ {{ run.gameName }}
60
+ </span >
61
+ </template >
62
+ <span :key =" 'category' + index" class =" notification is-expandable category" :class =" getRowParity(index, run)" @click =" expand(run)" >
63
+ {{ run.categoryName }}
74
64
</span >
75
- <sup v-if =" run.emulated" >
76
- {{ $t('global.emu') }}
77
- </sup >
78
- </span >
79
- <span :key =" 'estimate' + index" class =" notification is-expandable estimate" :class =" getRowParity(index, run)" @click =" expand(run)" >
80
- <ElementTemporalDuration :duration =" run.estimate" />
81
- </span >
82
- <span :key =" 'setup' + index" class =" notification is-expandable setup" :class =" getRowParity(index, run)" @click =" expand(run)" >
83
- <ElementTemporalDuration :duration =" run.setupTime" />
84
- </span >
85
- <div v-if =" expanded.has(run.id)" :key =" 'expanded' + index" class =" expanded-run" >
86
- <MarathonScheduleRun :run =" run" :class =" getRowParity(index, run)" />
87
- </div >
65
+ <span :key =" 'type' + index" class =" notification is-expandable type" :class =" getRowParity(index, run)" @click =" expand(run)" >
66
+ {{ $t(`marathon.schedule.type.${run.type}`) }}
67
+ </span >
68
+ <span :key =" 'console' + index" class =" notification is-expandable console" :class =" getRowParity(index, run)" @click =" expand(run)" >
69
+ <span >
70
+ {{ run.console }}
71
+ </span >
72
+ <sup v-if =" run.emulated" >
73
+ {{ $t('global.emu') }}
74
+ </sup >
75
+ </span >
76
+ <span :key =" 'estimate' + index" class =" notification is-expandable estimate" :class =" getRowParity(index, run)" @click =" expand(run)" >
77
+ <ElementTemporalDuration :duration =" run.estimate" />
78
+ </span >
79
+ <span :key =" 'setup' + index" class =" notification is-expandable setup" :class =" getRowParity(index, run)" @click =" expand(run)" >
80
+ <ElementTemporalDuration :duration =" run.setupTime" />
81
+ </span >
82
+ <div v-if =" expanded.has(run.id)" :key =" 'expanded' + index" class =" expanded-run" >
83
+ <MarathonScheduleRun :run =" run" :class =" getRowParity(index, run)" />
84
+ </div >
85
+ </template >
88
86
</template >
89
- </template >
87
+ </div >
88
+ <div class =" is-centered" >
89
+ <WidgetLoading :while =" [ schedule ]" />
90
+ </div >
90
91
</div >
91
92
</template >
92
93
93
94
<script lang="ts">
94
95
import Vue from ' vue' ;
95
96
import { mapActions } from ' vuex' ;
96
- import { ScheduleLine , ScheduleState , ScheduleTicker } from ' ~/types/api/schedule' ;
97
+ import { Schedule , ScheduleLine , ScheduleState , ScheduleTicker } from ' ~/types/api/schedule' ;
97
98
98
99
export default Vue .extend ({
99
100
props: {
@@ -119,8 +120,11 @@ export default Vue.extend({
119
120
]);
120
121
},
121
122
computed: {
123
+ schedule(): Schedule | undefined {
124
+ return (this .$store .state .api .schedule as ScheduleState ).schedules [this .marathonId ];
125
+ },
122
126
runs(): Array <ScheduleLine >| undefined {
123
- return ( this .$store . state . api . schedule as ScheduleState ). schedules [ this . marathonId ] ?.lines ;
127
+ return this .schedule ?.lines ;
124
128
},
125
129
tickers(): ScheduleTicker | undefined {
126
130
return (this .$store .state .api .schedule as ScheduleState ).tickers [this .marathonId ];
0 commit comments