Skip to content

Commit a7a3514

Browse files
committed
feat: Enable / disable buckets in Studio Settings
1 parent 3a526b7 commit a7a3514

File tree

5 files changed

+21
-1
lines changed

5 files changed

+21
-1
lines changed

meteor/server/api/rest/v1/typeConversion.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ export function studioSettingsFrom(apiStudioSettings: APIStudioSettings): IStudi
321321
enableQuickLoop: apiStudioSettings.enableQuickLoop,
322322
forceQuickLoopAutoNext: forceQuickLoopAutoNextFrom(apiStudioSettings.forceQuickLoopAutoNext),
323323
fallbackPartDuration: apiStudioSettings.fallbackPartDuration ?? DEFAULT_FALLBACK_PART_DURATION,
324+
enableBuckets: apiStudioSettings.enableBuckets,
324325
}
325326
}
326327

@@ -340,6 +341,7 @@ export function APIStudioSettingsFrom(settings: IStudioSettings): APIStudioSetti
340341
enableQuickLoop: settings.enableQuickLoop,
341342
forceQuickLoopAutoNext: APIForceQuickLoopAutoNextFrom(settings.forceQuickLoopAutoNext),
342343
fallbackPartDuration: settings.fallbackPartDuration,
344+
enableBuckets: settings.enableBuckets,
343345
}
344346
}
345347

meteor/server/lib/rest/v1/studios.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,4 +186,5 @@ export interface APIStudioSettings {
186186
forceQuickLoopAutoNext?: 'disabled' | 'enabled_when_valid_duration' | 'enabled_forcing_min_duration'
187187
minimumTakeSpan?: number
188188
fallbackPartDuration?: number
189+
enableBuckets?: boolean
189190
}

packages/corelib/src/dataModel/Studio.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,11 @@ export interface IStudioSettings {
8888
* Default: 3000
8989
*/
9090
fallbackPartDuration?: number
91+
92+
/**
93+
* Enable buckets - the default behavior is to have buckets.
94+
*/
95+
enableBuckets?: boolean
9196
}
9297

9398
export type StudioLight = Omit<DBStudio, 'mappingsWithOverrides' | 'blueprintConfigWithOverrides'>

packages/webui/src/client/ui/RundownView.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1475,7 +1475,8 @@ const RundownViewContent = translateWithTracker<IPropsWithReady, IState, ITracke
14751475
rundownHeaderLayoutId: protectString((params['rundownHeaderLayout'] as string) || ''),
14761476
miniShelfLayoutId: protectString((params['miniShelfLayout'] as string) || ''),
14771477
shelfDisplayOptions: {
1478-
enableBuckets: displayOptions.includes('buckets'),
1478+
// If buckets are enabled in Studiosettings, it can also be filtered in the URLs display options.
1479+
enableBuckets: studio?.settings.enableBuckets && displayOptions.includes('buckets'),
14791480
enableLayout: displayOptions.includes('layout') || displayOptions.includes('shelfLayout'),
14801481
enableInspector: displayOptions.includes('inspector'),
14811482
},

packages/webui/src/client/ui/Settings/Studio/Generic.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,17 @@ export const StudioGenericProperties = withTranslation()(
248248
/>
249249
</label>
250250

251+
<label className="field">
252+
<LabelActual label={t('Enable Buckets')} />
253+
<EditAttribute
254+
modifiedClassName="bghl"
255+
attribute="settings.enableBuckets"
256+
obj={this.props.studio}
257+
type="checkbox"
258+
collection={Studios}
259+
/>
260+
</label>
261+
251262
<label className="field">
252263
<LabelActual label={t('Enable QuickLoop')} />
253264
<EditAttribute

0 commit comments

Comments
 (0)