Skip to content

🎥 Make videos programmatically with React

Remotion Studio: Less annoying update check

Jonny Burgera8a4d4e59a7c
diff --git a/packages/cli/src/editor/components/UpdateCheck.tsx b/packages/cli/src/editor/components/UpdateCheck.tsx
index bc274b27d4..ec52e8f5d7 100644
--- a/packages/cli/src/editor/components/UpdateCheck.tsx
+++ b/packages/cli/src/editor/components/UpdateCheck.tsx
@@ -7,7 +7,7 @@ import React, {
} from 'react';
import {VERSION} from 'remotion';
import type {PackageManager} from '../../preview-server/get-package-manager';
-import {BLUE, WARNING_COLOR} from '../helpers/colors';
+import {BLUE, LIGHT_TEXT, WARNING_COLOR} from '../helpers/colors';
import {ModalsContext} from '../state/modals';
import {useZIndex} from '../state/z-index';
import {updateAvailable} from './RenderQueue/actions';
@@ -28,6 +28,8 @@ const buttonStyle: React.CSSProperties = {
backgroundColor: 'transparent',
cursor: 'pointer',
fontSize: 14,
+ display: 'inline-flex',
+ justifyContent: 'center',
};
// Keep in sync with packages/bugs/api/[v].ts
@@ -108,7 +110,7 @@ export const UpdateCheck = () => {
const dynButtonStyle: React.CSSProperties = useMemo(() => {
return {
...buttonStyle,
- color: hasKnownBugs ? WARNING_COLOR : BLUE,
+ color: hasKnownBugs ? WARNING_COLOR : LIGHT_TEXT,
};
}, [hasKnownBugs]);
@@ -126,8 +128,25 @@ export const UpdateCheck = () => {
style={dynButtonStyle}
onClick={openModal}
type="button"
+ title={hasKnownBugs ? 'Bugfixes available' : 'Update available'}
>
- {hasKnownBugs ? 'Bugfixes available' : 'Update available'}
+ {hasKnownBugs ? (
+ 'Bugfixes available'
+ ) : (
+ <svg
+ xmlns="http://www.w3.org/2000/svg"
+ style={{
+ height: 16,
+ width: 16,
+ }}
+ viewBox="0 0 512 512"
+ >
+ <path
+ fill="currentcolor"
+ d="M256 48a208 208 0 1 1 0 416 208 208 0 1 1 0-416zm0 464A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM135.1 217.4c-4.5 4.2-7.1 10.1-7.1 16.3c0 12.3 10 22.3 22.3 22.3H208v96c0 17.7 14.3 32 32 32h32c17.7 0 32-14.3 32-32V256h57.7c12.3 0 22.3-10 22.3-22.3c0-6.2-2.6-12.1-7.1-16.3L269.8 117.5c-3.8-3.5-8.7-5.5-13.8-5.5s-10.1 2-13.8 5.5L135.1 217.4z"
+ />
+ </svg>
+ )}
</button>
);
};
diff --git a/packages/cli/src/editor/components/UpdateModal/UpdateModal.tsx b/packages/cli/src/editor/components/UpdateModal/UpdateModal.tsx
index daea4ac8c2..f6ad48c34c 100644
--- a/packages/cli/src/editor/components/UpdateModal/UpdateModal.tsx
+++ b/packages/cli/src/editor/components/UpdateModal/UpdateModal.tsx
@@ -84,7 +84,7 @@ export const UpdateModal: React.FC<{
<div style={text}>To upgrade, run the following command:</div>
</>
) : (
- <div style={text}>
+ <div style={title}>
A new update for Remotion is available! Run the following command:
</div>
)}