Skip to content

Commit 44d3437

Browse files
committed
Merge branch 'develop' into eslint-require-await
Bitte geben Sie eine Commit-Beschreibung für Ihre Änderungen ein. Zeilen,
2 parents 3307807 + 5fa0465 commit 44d3437

File tree

74 files changed

+394
-409
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+394
-409
lines changed

.github/workflows/crowdin-upload-keys.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ jobs:
2626
env:
2727
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TOKEN }}
2828
run: |
29-
crowdin upload sources --config .crowdin.yaml -b main
29+
crowdin upload sources --config .crowdin.yaml -b "${GITHUB_REF##*/}"

eslint.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ export default [
1717
"@typescript-eslint/no-explicit-any": "off",
1818
"@typescript-eslint/no-floating-promises": "off",
1919
"@typescript-eslint/no-misused-promises": "off",
20-
"@typescript-eslint/no-unused-vars": "off",
2120
},
2221
},
2322
];

src/components/Header.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ import { IconContext } from "react-icons";
2525
import ButtonLikeAnchor from "./shared/ButtonLikeAnchor";
2626
import { ModalHandle } from "./shared/modals/Modal";
2727
import { broadcastLogout } from "../utils/broadcastSync";
28+
import BaseButton from "./shared/BaseButton";
2829

2930
// References for detecting a click outside of the container of the dropdown menus
3031
const containerLang = React.createRef<HTMLDivElement>();
@@ -144,11 +145,11 @@ const Header = () => {
144145
{/* Select language */}
145146
<div className="nav-dd lang-dd" id="lang-dd" ref={containerLang}>
146147
<Tooltip active={!displayMenuLang} title={t("LANGUAGE")}>
147-
<button className="lang" onClick={() => setMenuLang(!displayMenuLang)}>
148+
<BaseButton className="lang" onClick={() => setMenuLang(!displayMenuLang)}>
148149
<IconContext.Provider value={{ style: { fontSize: "20px" } }}>
149150
<HiTranslate />
150151
</IconContext.Provider>
151-
</button>
152+
</BaseButton>
152153
</Tooltip>
153154
{displayMenuLang && <MenuLang handleChangeLanguage={handleChangeLanguage}/>}
154155
</div>
@@ -192,14 +193,14 @@ const Header = () => {
192193
ref={containerNotify}
193194
>
194195
<Tooltip active={!displayMenuNotify} title={t("SYSTEM_NOTIFICATIONS")}>
195-
<button onClick={() => setMenuNotify(!displayMenuNotify)}>
196+
<BaseButton onClick={() => setMenuNotify(!displayMenuNotify)}>
196197
<i className="fa fa-bell" aria-hidden="true" />
197198
{errorCounter !== 0 && (
198199
<span id="error-count" className="badge">
199200
{errorCounter}
200201
</span>
201202
)}
202-
</button>
203+
</BaseButton>
203204
</Tooltip>
204205
{/* Click on the bell icon, a dropdown menu with all services in serviceList and their status opens */}
205206
{displayMenuNotify && (
@@ -227,11 +228,11 @@ const Header = () => {
227228
ref={containerHelp}
228229
>
229230
<Tooltip active={!displayMenuHelp} title={t("HELP.HELP")}>
230-
<button
231+
<BaseButton
231232
onClick={() => setMenuHelp(!displayMenuHelp)}
232233
>
233234
<span className="fa fa-question-circle"></span>
234-
</button>
235+
</BaseButton>
235236
</Tooltip>
236237
{/* Click on the help icon, a dropdown menu with documentation, REST-docs and shortcuts (if available) opens */}
237238
{displayMenuHelp && (
@@ -248,13 +249,13 @@ const Header = () => {
248249

249250
{/* Username */}
250251
<div className="nav-dd user-dd" id="user-dd" ref={containerUser}>
251-
<button
252+
<BaseButton
252253
className="h-nav"
253254
onClick={() => setMenuUser(!displayMenuUser)}
254255
>
255256
{user.user.name || user.user.username}
256257
<span className="dropdown-icon" />
257-
</button>
258+
</BaseButton>
258259
{/* Click on username, a dropdown menu with the option to logout opens */}
259260
{displayMenuUser && <MenuUser />}
260261
</div>
@@ -281,7 +282,7 @@ const MenuLang = ({ handleChangeLanguage }: { handleChangeLanguage: (code: strin
281282
{languages.map((language, key) => (
282283
<li key={key}>
283284
<ButtonLikeAnchor
284-
extraClassName={(i18n.language === language.code ? "selected" : "")}
285+
className={(i18n.language === language.code ? "selected" : "")}
285286
onClick={() => handleChangeLanguage(language.code)}
286287
>
287288
{language.long}
@@ -312,8 +313,7 @@ const MenuNotify = ({
312313
{healthStatus.map((service, key) => (
313314
<li key={key}>
314315
{!!service.status && (
315-
<button
316-
className="button-like-anchor"
316+
<ButtonLikeAnchor
317317
onClick={() => redirectToServices()}
318318
>
319319
<span> {service.name} </span>
@@ -326,7 +326,7 @@ const MenuNotify = ({
326326
{service.status}
327327
</span>
328328
)}
329-
</button>
329+
</ButtonLikeAnchor>
330330
)}
331331
</li>
332332
))}

src/components/NavBar.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import NewResourceModal, { NewResource } from "./shared/NewResourceModal";
1010
import { useHotkeys } from "react-hotkeys-hook";
1111
import { ModalHandle } from "./shared/modals/Modal";
1212
import { ParseKeys } from "i18next";
13+
import BaseButton from "./shared/BaseButton";
1314

1415
/**
1516
* Component that renders the nav bar
@@ -109,13 +110,13 @@ const NavBar = ({
109110
{create &&
110111
<div className="btn-group">
111112
{hasAccess(create.accessRole, user) && (
112-
<button
113+
<BaseButton
113114
className="add"
114115
onClick={showNewResourceModal}
115116
>
116117
<i className="fa fa-plus" />
117118
<span>{t(create.text)}</span>
118-
</button>
119+
</BaseButton>
119120
)}
120121
</div>
121122
}

src/components/configuration/partials/ThemesActionsCell.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ import { useAppDispatch } from "../../../store";
77
import { deleteTheme, ThemeDetailsType } from "../../../slices/themeSlice";
88
import ThemeDetails from "./wizard/ThemeDetails";
99
import { ActionCellDelete } from "../../shared/ActionCellDelete";
10-
import { IconButton } from "../../shared/IconButton";
1110
import { Modal, ModalHandle } from "../../shared/modals/Modal";
1211
import { useTranslation } from "react-i18next";
12+
import ButtonLikeAnchor from "../../shared/ButtonLikeAnchor";
1313

1414
/**
1515
* This component renders the action cells of themes in the table view
@@ -44,9 +44,9 @@ const ThemesActionsCell = ({
4444
return (
4545
<>
4646
{/* edit themes */}
47-
<IconButton
48-
callback={() => showThemeDetails()}
49-
iconClassname={"more"}
47+
<ButtonLikeAnchor
48+
onClick={() => showThemeDetails()}
49+
className={"more"}
5050
editAccessRole={"ROLE_UI_THEMES_EDIT"}
5151
tooltipText={"CONFIGURATION.THEMES.TABLE.TOOLTIP.DETAILS"}
5252
/>

src/components/configuration/partials/wizard/WatermarkPage.tsx

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import WizardNavigationButtons from "../../../shared/wizard/WizardNavigationButt
66
import FileUpload from "../../../shared/wizard/FileUpload";
77
import Notifications from "../../../shared/Notifications";
88
import ModalContentTable from "../../../shared/modals/ModalContentTable";
9+
import BaseButton from "../../../shared/BaseButton";
910

1011
/**
1112
* This component renders the watermark page for new themes in the new themes wizard
@@ -96,7 +97,7 @@ const WatermarkPage = <T extends RequiredFormProps>({
9697
<div className="video-container">
9798
<div className="watermark-config">
9899
<div className="position-selection">
99-
<button
100+
<BaseButton
100101
className={cn(
101102
"position-button position-top-left",
102103
{
@@ -110,8 +111,8 @@ const WatermarkPage = <T extends RequiredFormProps>({
110111
{t(
111112
"CONFIGURATION.THEMES.DETAILS.WATERMARK.TOP_LEFT",
112113
)}
113-
</button>
114-
<button
114+
</BaseButton>
115+
<BaseButton
115116
className={cn(
116117
"position-button position-top-right",
117118
{
@@ -125,8 +126,8 @@ const WatermarkPage = <T extends RequiredFormProps>({
125126
{t(
126127
"CONFIGURATION.THEMES.DETAILS.WATERMARK.TOP_RIGHT",
127128
)}
128-
</button>
129-
<button
129+
</BaseButton>
130+
<BaseButton
130131
className={cn(
131132
"position-button position-bottom-left",
132133
{
@@ -140,8 +141,8 @@ const WatermarkPage = <T extends RequiredFormProps>({
140141
{t(
141142
"CONFIGURATION.THEMES.DETAILS.WATERMARK.BOTTOM_LEFT",
142143
)}
143-
</button>
144-
<button
144+
</BaseButton>
145+
<BaseButton
145146
className={cn(
146147
"position-button position-bottom-right",
147148
{
@@ -155,7 +156,7 @@ const WatermarkPage = <T extends RequiredFormProps>({
155156
{t(
156157
"CONFIGURATION.THEMES.DETAILS.WATERMARK.BOTTOM_RIGHT",
157158
)}
158-
</button>
159+
</BaseButton>
159160
</div>
160161
</div>
161162
</div>

src/components/events/partials/EventActionCell.tsx

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ import { Event, deleteEvent } from "../../../slices/eventSlice";
1616
import { Tooltip } from "../../shared/Tooltip";
1717
import { openModal } from "../../../slices/eventDetailsSlice";
1818
import { ActionCellDelete } from "../../shared/ActionCellDelete";
19-
import { IconButton } from "../../shared/IconButton";
2019
import { Modal, ModalHandle } from "../../shared/modals/Modal";
20+
import ButtonLikeAnchor from "../../shared/ButtonLikeAnchor";
2121

2222
/**
2323
* This component renders the action cells of events in the table view
@@ -87,18 +87,18 @@ const EventActionCell = ({
8787
)}
8888

8989
{/* Open event details */}
90-
<IconButton
91-
callback={onClickEventDetails}
92-
iconClassname={"more"}
90+
<ButtonLikeAnchor
91+
onClick={onClickEventDetails}
92+
className={"more"}
9393
editAccessRole={"ROLE_UI_EVENTS_DETAILS_VIEW"}
9494
tooltipText={"EVENTS.EVENTS.TABLE.TOOLTIP.DETAILS"}
9595
/>
9696

9797
{/* If event belongs to a series then the corresponding series details can be opened */}
9898
{!!row.series && (
99-
<IconButton
100-
callback={onClickSeriesDetails}
101-
iconClassname={"more-series"}
99+
<ButtonLikeAnchor
100+
onClick={onClickSeriesDetails}
101+
className={"more-series"}
102102
editAccessRole={"ROLE_UI_SERIES_DETAILS_VIEW"}
103103
tooltipText={"EVENTS.SERIES.TABLE.TOOLTIP.DETAILS"}
104104
/>
@@ -135,45 +135,45 @@ const EventActionCell = ({
135135

136136
{/* If the event has comments and no open comments then the comment tab of event details can be opened directly */}
137137
{row.has_comments && !row.has_open_comments && (
138-
<IconButton
139-
callback={() => onClickComments()}
140-
iconClassname={"comments"}
138+
<ButtonLikeAnchor
139+
onClick={() => onClickComments()}
140+
className={"comments"}
141141
tooltipText={"EVENTS.EVENTS.TABLE.TOOLTIP.COMMENTS"}
142142
/>
143143
)}
144144

145145
{/* If the event has comments and open comments then the comment tab of event details can be opened directly */}
146146
{row.has_comments && row.has_open_comments && (
147-
<IconButton
148-
callback={() => onClickComments()}
149-
iconClassname={"comments-open"}
147+
<ButtonLikeAnchor
148+
onClick={() => onClickComments()}
149+
className={"comments-open"}
150150
tooltipText={"EVENTS.EVENTS.TABLE.TOOLTIP.COMMENTS"}
151151
/>
152152
)}
153153

154154
{/* If the event is in in a paused workflow state then a warning icon is shown and workflow tab of event
155155
details can be opened directly */}
156156
{row.workflow_state === "PAUSED" &&
157-
<IconButton
158-
callback={() => onClickWorkflow()}
159-
iconClassname={"fa fa-warning"}
157+
<ButtonLikeAnchor
158+
onClick={() => onClickWorkflow()}
159+
className={"fa fa-warning"}
160160
editAccessRole={"ROLE_UI_EVENTS_DETAILS_WORKFLOWS_EDIT"}
161161
tooltipText={"EVENTS.EVENTS.TABLE.TOOLTIP.PAUSED_WORKFLOW"}
162162
/>
163163
}
164164

165165
{/* Open assets tab of event details directly*/}
166-
<IconButton
167-
callback={() => onClickAssets()}
168-
iconClassname={"fa fa-folder-open"}
166+
<ButtonLikeAnchor
167+
onClick={() => onClickAssets()}
168+
className={"fa fa-folder-open"}
169169
editAccessRole={"ROLE_UI_EVENTS_DETAILS_ASSETS_VIEW"}
170170
tooltipText={"EVENTS.EVENTS.TABLE.TOOLTIP.ASSETS"}
171171
/>
172172

173173
{/* Open dialog for embedded code*/}
174-
<IconButton
175-
callback={() => showEmbeddingCodeModal()}
176-
iconClassname={"fa fa-link"}
174+
<ButtonLikeAnchor
175+
onClick={() => showEmbeddingCodeModal()}
176+
className={"fa fa-link"}
177177
editAccessRole={"ROLE_UI_EVENTS_EMBEDDING_CODE_VIEW"}
178178
tooltipText={"EVENTS.EVENTS.TABLE.TOOLTIP.EMBEDDING_CODE"}
179179
/>

src/components/events/partials/EventsDateCell.tsx

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
import { useTranslation } from "react-i18next";
2-
import { editFilterValue } from "../../../slices/tableFilterSlice";
3-
import React from "react";
41
import { loadEventsIntoTable } from "../../../thunks/tableThunks";
52
import { fetchEvents } from "../../../slices/eventSlice";
63
import { Event } from "../../../slices/eventSlice";

src/components/events/partials/EventsLocationCell.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { loadEventsIntoTable } from "../../../thunks/tableThunks";
44
import { useAppDispatch, useAppSelector } from "../../../store";
55
import { fetchEvents } from "../../../slices/eventSlice";
66
import { Event } from "../../../slices/eventSlice";
7-
import { IconButton } from "../../shared/IconButton";
7+
import ButtonLikeAnchor from "../../shared/ButtonLikeAnchor";
88

99
/**
1010
* This component renders the location cells of events in the table view
@@ -30,13 +30,13 @@ const EventsLocationCell = ({
3030

3131
return (
3232
// Link template for location of event
33-
<IconButton
34-
callback={() => addFilter(row.location)}
35-
iconClassname={"crosslink"}
33+
<ButtonLikeAnchor
34+
onClick={() => addFilter(row.location)}
35+
className={"crosslink"}
3636
tooltipText={"EVENTS.EVENTS.TABLE.TOOLTIP.LOCATION"}
3737
>
3838
{row.location}
39-
</IconButton>
39+
</ButtonLikeAnchor>
4040
);
4141
};
4242

src/components/events/partials/EventsSeriesCell.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { loadEventsIntoTable } from "../../../thunks/tableThunks";
44
import { useAppDispatch, useAppSelector } from "../../../store";
55
import { fetchEvents } from "../../../slices/eventSlice";
66
import { Event } from "../../../slices/eventSlice";
7-
import { IconButton } from "../../shared/IconButton";
7+
import ButtonLikeAnchor from "../../shared/ButtonLikeAnchor";
88

99
/**
1010
* This component renders the series cells of events in the table view
@@ -31,16 +31,16 @@ const EventsSeriesCell = ({
3131
return (
3232
row.series ? (
3333
// Link template for series of event
34-
<IconButton
35-
callback={() => row.series
34+
<ButtonLikeAnchor
35+
onClick={() => row.series
3636
? addFilter(row.series.id)
3737
: console.error("Tried to sort by a series, but the series did not exist.")
3838
}
39-
iconClassname={"crosslink"}
39+
className={"crosslink"}
4040
tooltipText={"EVENTS.EVENTS.TABLE.TOOLTIP.SERIES"}
4141
>
4242
{row.series.title}
43-
</IconButton>
43+
</ButtonLikeAnchor>
4444
)
4545
: <></>
4646
);

0 commit comments

Comments
 (0)