Skip to content

Commit 3122081

Browse files
committed
wip
1 parent 4ecaee1 commit 3122081

File tree

4 files changed

+22
-12
lines changed

4 files changed

+22
-12
lines changed

packages/documentation/versioned_docs/version-1.50.0/for-developers/device-integrations/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ In order to understand all about writing TSR integrations there are some concept
99
- [TSR Types package](./tsr-types)
1010
- [TSR Actions](./tsr-actions)
1111

12-
But to start of we will explain the general structure of the TSR. Any user of the TSR will interface primarily with the Conductor class. Primarily the user will input device configurations, mappings and timelines into the TSR. The timeline describes the entire state of all of the devices over time. It does this by putting objects on timeline layers. Every timeline layer maps to a specific part of the device, this is configured through the mappings.
12+
But to start off we will explain the general structure of the TSR. Any user of the TSR will interface primarily with the Conductor class. Primarily the user will input device configurations, mappings and timelines into the TSR. The timeline describes the entire state of all of the devices over time. It does this by putting objects on timeline layers. Every timeline layer maps to a specific part of the device, this is configured through the mappings.
1313

1414
The timeline is converted into disctinct states at different points in time, and these states are fed to the individual integrations. As an integration developer you shouldn't have to worry about keeping track of this. It is most important that you expose \(a\) a method to convert from a Timeline State to a Device State, \(b\) a method for diffing 2 device states and (c) a way to send commands to the device. We'll dive deeper into this in [TSR Integration API](./tsr-api).
1515

packages/documentation/versioned_docs/version-1.51.0/for-developers/device-integrations/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ In order to understand all about writing TSR integrations there are some concept
99
- [TSR Types package](./tsr-types)
1010
- [TSR Actions](./tsr-actions)
1111

12-
But to start of we will explain the general structure of the TSR. Any user of the TSR will interface primarily with the Conductor class. Primarily the user will input device configurations, mappings and timelines into the TSR. The timeline describes the entire state of all of the devices over time. It does this by putting objects on timeline layers. Every timeline layer maps to a specific part of the device, this is configured through the mappings.
12+
But to start off we will explain the general structure of the TSR. Any user of the TSR will interface primarily with the Conductor class. Primarily the user will input device configurations, mappings and timelines into the TSR. The timeline describes the entire state of all of the devices over time. It does this by putting objects on timeline layers. Every timeline layer maps to a specific part of the device, this is configured through the mappings.
1313

1414
The timeline is converted into disctinct states at different points in time, and these states are fed to the individual integrations. As an integration developer you shouldn't have to worry about keeping track of this. It is most important that you expose \(a\) a method to convert from a Timeline State to a Device State, \(b\) a method for diffing 2 device states and (c) a way to send commands to the device. We'll dive deeper into this in [TSR Integration API](./tsr-api).
1515

packages/webui/src/client/ui/Settings/ShowStyle/HotkeyLegend.tsx

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,15 +39,20 @@ export function HotkeyLegendSettings({ showStyleBase }: IHotkeyLegendSettingsPro
3939
}, [showStyleBase._id])
4040

4141
const exportHotkeyJSON = useCallback(() => {
42+
if (!showStyleBase.hotkeyLegend) return
43+
4244
const jsonStr = JSON.stringify(showStyleBase.hotkeyLegend, undefined, 4)
4345

4446
const element = document.createElement('a')
45-
element.href = URL.createObjectURL(new Blob([jsonStr], { type: 'application/json' }))
47+
const url = URL.createObjectURL(new Blob([jsonStr], { type: 'application/json' }))
48+
element.href = url
4649
element.download = `${showStyleBase._id}_${showStyleBase.name.replace(/\W/g, '_')}_hotkeys.json`
4750

4851
document.body.appendChild(element) // Required for this to work in FireFox
4952
element.click()
5053
document.body.removeChild(element) // Required for this to work in FireFox
54+
55+
URL.revokeObjectURL(url)
5156
}, [showStyleBase._id, showStyleBase.hotkeyLegend, showStyleBase.name])
5257

5358
const onDeleteHotkeyLegend = useCallback(
@@ -133,7 +138,12 @@ export function HotkeyLegendSettings({ showStyleBase }: IHotkeyLegendSettingsPro
133138
<FontAwesomeIcon icon={faPlus} />
134139
</Button>
135140

136-
<Button variant="outline-secondary" className="mx-1" onClick={exportHotkeyJSON}>
141+
<Button
142+
variant="outline-secondary"
143+
className="mx-1"
144+
onClick={exportHotkeyJSON}
145+
disabled={!showStyleBase.hotkeyLegend || showStyleBase.hotkeyLegend.length === 0}
146+
>
137147
<FontAwesomeIcon icon={faDownload} />
138148
<span>{t('Export')}</span>
139149
</Button>

packages/webui/src/client/ui/Settings/SnapshotsView.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -114,9 +114,9 @@ export default function SnapshotsView(): JSX.Element {
114114
<tbody>
115115
<tr>
116116
<th></th>
117-
<th>Type</th>
118-
<th>Name</th>
119-
<th>Comment</th>
117+
<th>{t('Type')}</th>
118+
<th>{t('Name')}</th>
119+
<th>{t('Comment')}</th>
120120
{removeSnapshots ? <th></th> : null}
121121
</tr>
122122
{snapshots.map((snapshot) => {
@@ -294,7 +294,7 @@ function RestoreStoredSnapshotButton({ snapshotId }: { snapshotId: SnapshotId })
294294
},
295295
})
296296
}
297-
}, [snapshotId])
297+
}, [t, snapshotId])
298298

299299
return (
300300
<Button variant="outline-secondary" onClick={restoreStoredSnapshot}>
@@ -321,15 +321,15 @@ function TakeSystemSnapshotButton({ studioId }: { studioId: StudioId | null }) {
321321
.catch((err) => {
322322
logger.error(err)
323323
doModalDialog({
324-
title: t('Restore Snapshot'),
325-
message: t('Snapshot restore failed: {{errorMessage}}', { errorMessage: stringifyError(err) }),
324+
title: t('Take System Snapshot'),
325+
message: t('Take System Snapshot failed: {{errorMessage}}', { errorMessage: stringifyError(err) }),
326326
acceptOnly: true,
327327
onAccept: () => {
328328
// nothing
329329
},
330330
})
331331
})
332-
}, [studioId])
332+
}, [t, studioId])
333333

334334
const studioName = useTracker(() => (studioId ? Studios.findOne(studioId)?.name : null), [studioId])
335335

@@ -369,7 +369,7 @@ function RemoveSnapshotButton({ snapshotId }: { snapshotId: SnapshotId }) {
369369
},
370370
})
371371
}
372-
}, [snapshotId])
372+
}, [t, snapshotId])
373373

374374
return (
375375
<Button variant="outline-secondary" onClick={removeStoredSnapshot}>

0 commit comments

Comments
 (0)