diff --git a/src/cssStyles.tsx b/src/cssStyles.tsx
index b1ec07013..1392b59cf 100644
--- a/src/cssStyles.tsx
+++ b/src/cssStyles.tsx
@@ -1,7 +1,7 @@
/**
* This file contains general css stylings
*/
-import { css, Global, keyframes } from "@emotion/react";
+import { css, Global } from "@emotion/react";
import React from "react";
import emotionNormalize from "emotion-normalize";
import { createTheme } from "@mui/material/styles";
@@ -405,13 +405,6 @@ export const subtitleSelectStyle = (theme: Theme) => createTheme({
},
});
-export const spinningStyle = css({
- animation: `2s linear infinite none ${keyframes({
- "0%": { transform: "rotate(0)" },
- "100%": { transform: "rotate(360deg)" },
- })}`,
-});
-
export const customIconStyle = css(({
maxWidth: "16px",
height: "auto",
diff --git a/src/main/Save.tsx b/src/main/Save.tsx
index 3518b5402..49582b51e 100644
--- a/src/main/Save.tsx
+++ b/src/main/Save.tsx
@@ -3,10 +3,10 @@ import React, { useEffect } from "react";
import { css } from "@emotion/react";
import {
basicButtonStyle, backOrContinueStyle, ariaLive, errorBoxStyle,
- navigationButtonStyle, spinningStyle,
+ navigationButtonStyle,
} from "../cssStyles";
-import { LuLoader, LuCheckCircle, LuAlertCircle, LuChevronLeft, LuSave, LuCheck } from "react-icons/lu";
+import { LuCheckCircle, LuAlertCircle, LuChevronLeft, LuSave, LuCheck } from "react-icons/lu";
import { useAppDispatch, useAppSelector } from "../redux/store";
import {
@@ -32,8 +32,8 @@ import {
import { serializeSubtitle } from "../util/utilityFunctions";
import { useTheme } from "../themes";
import { ThemedTooltip } from "./Tooltip";
+import { Spinner } from "@opencast/appkit";
import { ProtoButton } from "@opencast/appkit";
-import { IconType } from "react-icons";
import { setEnd } from "../redux/endSlice";
/**
@@ -102,11 +102,9 @@ const Save: React.FC = () => {
* Button that sends a post request to save current changes
*/
export const SaveButton: React.FC<{
- basicIcon?: IconType
text?: string
isTransitionToEnd?: boolean
}> = ({
- basicIcon = LuSave,
text,
isTransitionToEnd = false,
}) => {
@@ -123,22 +121,20 @@ export const SaveButton: React.FC<{
const theme = useTheme();
// Update based on current fetching status
- let Icon = basicIcon;
- let spin = false;
let tooltip = null;
- if (workflowStatus === "failed") {
- Icon = LuAlertCircle;
- spin = false;
- tooltip = t("save.confirmButton-failed-tooltip");
- } else if (workflowStatus === "success") {
- Icon = LuCheck;
- spin = false;
- tooltip = t("save.confirmButton-success-tooltip");
- } else if (workflowStatus === "loading") {
- Icon = LuLoader;
- spin = true;
- tooltip = t("save.confirmButton-attempting-tooltip");
- }
+ const Icon = () => {
+ if (workflowStatus === "failed") {
+ tooltip = t("save.confirmButton-failed-tooltip");
+ return