Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
AURA
dashboard-clock
Commits
f63c93ab
Commit
f63c93ab
authored
Nov 25, 2020
by
david
Browse files
Improve next timeslot rendering.
#11
parent
24cdb5f5
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/StudioClock.svelte
View file @
f63c93ab
...
@@ -236,7 +236,10 @@
...
@@ -236,7 +236,10 @@
}
}
}
}
return
"
(
"
+
str
+
"
)
"
;
if
(
str
!=
""
)
str
=
"
(
"
+
str
+
"
)
"
;
return
str
;
}
}
/* Indicates if some fallback timeslot is playing */
/* Indicates if some fallback timeslot is playing */
...
@@ -273,6 +276,15 @@
...
@@ -273,6 +276,15 @@
return
false
;
return
false
;
}
}
/* Displays any following timeslot */
function
displayNextTimeslot
(
value
)
{
let
html
=
""
;
if
(
'
next_timeslot
'
in
value
)
{
html
+=
displayShowName
(
value
.
next_timeslot
,
nonexttimeslot
)
html
+=
"
"
+
displayShowTimes
(
value
.
next_timeslot
);
}
return
html
;
}
/* Hack to load external CSS into the Web Component */
/* Hack to load external CSS into the Web Component */
function
loadExternalCss
(
root
,
file
)
{
function
loadExternalCss
(
root
,
file
)
{
...
@@ -693,12 +705,10 @@
...
@@ -693,12 +705,10 @@
</div>
</div>
</div>
</div>
{#if value.next_timeslot}
<div
id=
"next-timeslot"
>
<div
id=
"next-timeslot"
>
<h3
class=
"timeslot-title"
>
{@html displayShowName(value.next_timeslot, nonexttimeslot)} {displayShowTimes(value.next_timeslot)}
</h3>
<h3
class=
"timeslot-title"
>
{@html displayNextTimeslot(value)}
</h3>
</div>
</div>
{/if}
{:catch error}
{:catch error}
<div
class=
"error"
><p>
{error}
</p></div>
<div
class=
"error"
><p>
{error}
</p></div>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment