Skip to content

Commit ec4e409

Browse files
committed
widgets: port spin wheel
1 parent 5f860e0 commit ec4e409

14 files changed

Lines changed: 590 additions & 409 deletions

File tree

app/app-services.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ export { SseService } from 'services/server-sent-events';
117117
export { WidgetSource, WidgetsService } from './services/widgets';
118118
export { MediaShareService } from 'services/widgets/settings/media-share';
119119
export { AlertBoxService } from 'services/widgets/settings/alert-box';
120-
export { SpinWheelService } from 'services/widgets/settings/spin-wheel';
121120
export { PollService } from 'services/widgets/settings/poll';
122121
export { ChatHighlightService } from 'services/widgets/settings/chat-highlight';
123122

@@ -175,7 +174,6 @@ import { AudioService } from './services/audio';
175174
import { SourceFiltersService } from './services/source-filters';
176175
import { DiagnosticsService } from './services/diagnostics';
177176
import { WebsocketService } from './services/websocket';
178-
import { SpinWheelService } from 'services/widgets/settings/spin-wheel';
179177
import { LayoutService } from './services/layout';
180178
import { ProjectorService } from './services/projector';
181179
import { ObsImporterService } from 'services/obs-importer';
@@ -267,7 +265,6 @@ export const AppServices = {
267265
SourceFiltersService,
268266
DiagnosticsService,
269267
WebsocketService,
270-
SpinWheelService,
271268
LayoutService,
272269
ProjectorService,
273270
ObsImporterService,

app/components-react/editor/elements/RecentEvents.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ export default function RecentEvents(p: { isOverlay?: boolean }) {
3232
}
3333

3434
function Toolbar() {
35-
const { RecentEventsService, UserService, SpinWheelService } = Services;
35+
const { RecentEventsService, UserService } = Services;
3636

3737
const {
3838
muted,
@@ -59,7 +59,7 @@ function Toolbar() {
5959
<Tooltip title={$t('Spin Wheel')} placement="bottom">
6060
<i
6161
className="fas fa-chart-pie action-icon"
62-
onClick={() => SpinWheelService.actions.spinWheel()}
62+
onClick={() => RecentEventsService.actions.spinWheel()}
6363
/>
6464
</Tooltip>
6565
)}

app/components-react/shared/inputs/FormFactory.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ const componentTable: {
2828
textarea: inputs.TextAreaInput,
2929
color: inputs.ColorInput,
3030
mediaurl: inputs.MediaUrlInput,
31+
audiourl: inputs.AudioUrlInput,
3132
imagepicker: inputs.ImagePickerInput,
3233
time: inputs.TimeInput,
3334
animation: inputs.AnimationInput,
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
.category-editor {
2+
&-row {
3+
margin-bottom: 16px;
4+
align-items: center;
5+
gap: 8px;
6+
7+
&--name {
8+
flex: 1;
9+
}
10+
11+
&--close-button {
12+
margin-left: 4px;
13+
cursor: pointer;
14+
}
15+
}
16+
17+
&-buttons {
18+
margin-bottom: 16px;
19+
display: flex;
20+
justify-content: center;
21+
gap: 8px;
22+
}
23+
}
24+
25+
.section-editor {
26+
&-row {
27+
margin-bottom: 16px;
28+
align-items: center;
29+
gap: 8px;
30+
31+
&--category {
32+
flex-basis: 160px;
33+
34+
:global(.ant-select) {
35+
width: 100% !important;
36+
}
37+
}
38+
39+
&--weight {
40+
flex: 1;
41+
}
42+
43+
&-buttons {
44+
flex-basis: 58px;
45+
}
46+
47+
&--close-button {
48+
margin-left: 4px;
49+
cursor: pointer;
50+
}
51+
}
52+
53+
&--warning {
54+
margin-bottom: 16px;
55+
text-align: center;
56+
font-style: italic;
57+
opacity: 0.5;
58+
}
59+
60+
&-buttons {
61+
margin-bottom: 16px;
62+
display: flex;
63+
justify-content: center;
64+
gap: 8px;
65+
}
66+
}

0 commit comments

Comments
 (0)