Skip to content

Commit

Permalink
replaced custom with sl loader
Browse files Browse the repository at this point in the history
  • Loading branch information
marvinoffers committed Dec 17, 2024
1 parent efc54a8 commit df4d4d6
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 29 deletions.
18 changes: 0 additions & 18 deletions app/components-react/highlighter/StreamCard.m.less
Original file line number Diff line number Diff line change
Expand Up @@ -95,24 +95,6 @@
z-index: 1;
}

.loader {
border: 2px solid #f3f3f3; /* Light grey */
border-top: 2px solid #3e3e3e; /* Blue */
border-radius: 50%;
width: 16px;
height: 16px;
animation: spin 2s linear infinite;
}

@keyframes spin {
0% {
transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
}

.delete-button {
display: flex;
top: 8px;
Expand Down
30 changes: 19 additions & 11 deletions app/components-react/highlighter/StreamCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -185,21 +185,29 @@ function ActionBar({
<Button
size="large"
type="primary"
icon={
clipsOfStreamAreLoading !== stream.id ? (
<i className="icon-download" style={{ marginRight: '4px' }} />
) : undefined
}
onClick={e => {
emitExportVideo();
e.stopPropagation();
}}
style={{ display: 'grid', gridTemplateAreas: 'stack' }}
>
{clipsOfStreamAreLoading === stream.id ? (
<div className={styles.loader}></div>
) : (
<> {$t('Export highlight reel')}</>
)}
<div
style={{
visibility: clipsOfStreamAreLoading === stream.id ? 'visible' : 'hidden',
gridArea: 'stack',
}}
>
<i className="fa fa-spinner fa-pulse" />
</div>
<span
style={{
visibility: clipsOfStreamAreLoading !== stream.id ? 'visible' : 'hidden',
gridArea: 'stack',
}}
>
<i className="icon-download" style={{ marginRight: '4px' }} />
{$t('Export highlight reel')}
</span>
</Button>
</div>
);
Expand Down Expand Up @@ -255,7 +263,7 @@ export function Thumbnail({
}) {
function getThumbnailText(state: EAiDetectionState): JSX.Element | string {
if (clipsOfStreamAreLoading === stream?.id) {
return <div className={styles.loader}></div>;
return <i className="fa fa-spinner fa-pulse" style={{ marginLeft: 8 }} />;
}

if (clips.length > 0) {
Expand Down

0 comments on commit df4d4d6

Please sign in to comment.