Skip to content

🎥 Make videos programmatically with React

Elements: Add About Elements Settings link

JonnyBurger21b72dd3ba2f
diff --git a/packages/studio/src/components/SettingsModal.tsx b/packages/studio/src/components/SettingsModal.tsx
index 1a87508c94..4495f38831 100644
--- a/packages/studio/src/components/SettingsModal.tsx
+++ b/packages/studio/src/components/SettingsModal.tsx
@@ -413,7 +413,10 @@ export const SettingsModal: React.FC<{
tab === 'models' ||
tab === 'updates' ||
tab === 'skills' ? null : (
- <SettingsModalFooter showLicenseFaq={tab === 'license'} />
+ <SettingsModalFooter
+ showAboutElements={tab === 'studio' && studioPane === 'elements'}
+ showLicenseFaq={tab === 'license'}
+ />
)}
</>
</DismissableModal>
diff --git a/packages/studio/src/components/SettingsModalFooter.tsx b/packages/studio/src/components/SettingsModalFooter.tsx
index 2c5efb770c..32a79459fe 100644
--- a/packages/studio/src/components/SettingsModalFooter.tsx
+++ b/packages/studio/src/components/SettingsModalFooter.tsx
@@ -47,8 +47,9 @@ const externalLinkIndicator: React.CSSProperties = {
};
export const SettingsModalFooter: React.FC<{
+ readonly showAboutElements: boolean;
readonly showLicenseFaq: boolean;
-}> = ({showLicenseFaq}) => {
+}> = ({showAboutElements, showLicenseFaq}) => {
const {restartRequired} = useContext(StudioServerConnectionCtx);
const [restarting, setRestarting] = useState(false);
const configFileLocation = useMemo(() => {
@@ -65,6 +66,13 @@ export const SettingsModalFooter: React.FC<{
'noopener,noreferrer',
);
}, []);
+ const openAboutElements = useCallback(() => {
+ window.open(
+ 'https://www.remotion.dev/elements',
+ '_blank',
+ 'noopener,noreferrer',
+ );
+ }, []);
const restart = useCallback(() => {
setRestarting(true);
restartStudio().catch((error: Error) => {
@@ -103,14 +111,18 @@ export const SettingsModalFooter: React.FC<{
>
{restarting ? 'Restarting...' : 'Restart Studio'}
</ModalButton>
- ) : showLicenseFaq ? (
+ ) : showLicenseFaq || showAboutElements ? (
<InspectorQuickAction
disabled={false}
- onClick={openLicenseFaq}
+ onClick={showLicenseFaq ? openLicenseFaq : openAboutElements}
style={{flex: 'none', width: 'fit-content'}}
- title="Open the Remotion License FAQ in a new tab"
+ title={
+ showLicenseFaq
+ ? 'Open the Remotion License FAQ in a new tab'
+ : 'Open Remotion Elements in a new tab'
+ }
>
- License FAQ
+ {showLicenseFaq ? 'License FAQ' : 'About Elements'}
<svg
aria-hidden="true"
viewBox="0 0 16 16"