Skip to content

Commit a497576

Browse files
committed
wip: LayerInfoPreview handle in,out,duration as string and numbers
1 parent 7eb12a5 commit a497576

File tree

3 files changed

+37
-8
lines changed

3 files changed

+37
-8
lines changed

packages/blueprints-integration/src/previews.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ export type PreviewContent =
6262
text: Array<string>
6363
inTime?: number | string
6464
outTime?: number | string
65+
duration?: number | string
6566
}
6667
| {
6768
type: 'separationLine'

packages/webui/src/client/ui/PreviewPopUp/PreviewPopUp.scss

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,10 @@
5959
.preview-popUp__element-with-time-info {
6060
width: 100%;
6161
display: flex;
62+
font-feature-settings: 'liga' off;
63+
6264
margin-bottom: 0px;
63-
65+
6466
.preview-popUp__element-with-time-info__layer-color {
6567
width: 25px;
6668
height: 20px;
@@ -70,6 +72,19 @@
7072
font-size: 1.4em;
7173
@include item-type-colors();
7274
}
75+
76+
.preview-popUp__element-with-time-info__timing {
77+
overflow: none;
78+
white-space: nowrap;
79+
text-overflow: ellipsis;
80+
81+
font-weight: 500;
82+
line-height: 100%; /* 15px */
83+
84+
.label {
85+
font-weight: 300;
86+
}
87+
}
7388
}
7489

7590
.preview-popup__separation-line {

packages/webui/src/client/ui/PreviewPopUp/Previews/LayerInfoPreview.tsx

Lines changed: 20 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,31 @@ export function LayerInfoPreview(content: layerInfoContent): React.ReactElement
1919
{line}
2020
</div>
2121
))}
22-
<div className="preview-popUp__timing">
23-
{content.inTime && (
22+
<div className="preview-popUp__element-with-time-info__timing">
23+
{content.inTime !== undefined && (
2424
<>
25-
<span className="label">IN: </span>{' '}
26-
{RundownUtils.formatTimeToShortTime((content.inTime as any as number) || 0)}
25+
<span className="label">{t('IN')}: </span>
26+
{typeof content.inTime === 'number'
27+
? RundownUtils.formatTimeToShortTime(content.inTime || 0)
28+
: content.inTime}
2729
</>
2830
)}
2931
&nbsp;{' '}
30-
{content.outTime && (
32+
{content.duration !== undefined && (
3133
<>
32-
<span className="label">{t('DURATION: ')}</span>
33-
{RundownUtils.formatTimeToShortTime((content.outTime as any as number) || 0)}
34+
<span className="label">{t('DURATION')}: </span>
35+
{typeof content.duration === 'number'
36+
? RundownUtils.formatTimeToShortTime(content.duration || 0)
37+
: content.duration}
38+
</>
39+
)}
40+
&nbsp;{' '}
41+
{content.outTime !== undefined && (
42+
<>
43+
<span className="label">{t('OUT')}: </span>
44+
{typeof content.outTime === 'number'
45+
? RundownUtils.formatTimeToShortTime(content.outTime || 0)
46+
: content.outTime}
3447
</>
3548
)}
3649
</div>

0 commit comments

Comments
 (0)