-
Export Video
-
);
}
@@ -347,3 +497,104 @@ function PlatformSelect({
);
}
+
+function CustomDropdownWrapper({
+ initialSetting,
+ disabled,
+ emitSettings,
+}: {
+ initialSetting: TSetting;
+ disabled: boolean;
+ emitSettings: (settings: TSetting) => void;
+}) {
+ const [isOpen, setIsOpen] = useState(false);
+ const [currentSetting, setSetting] = useState
(initialSetting);
+
+ return (
+
+
+ {settings.map(setting => {
+ return (
+ {
+ setSetting(setting);
+ emitSettings(setting);
+ setIsOpen(false);
+ }}
+ key={setting.name}
+ >
+
+ {setting.name}{' '}
+ {setting.name !== 'Custom' && (
+ <>
+
{setting.fps}fps
{setting.resolution}p
+ >
+ )}
+
+
+ );
+ })}
+
+ }
+ trigger={['click']}
+ visible={isOpen}
+ onVisibleChange={setIsOpen}
+ placement="bottomLeft"
+ >
+ setIsOpen(!isOpen)}>
+
+ {currentSetting.name}{' '}
+ {currentSetting.name !== 'Custom' && (
+ <>
+
{currentSetting.fps}fps
{currentSetting.resolution}p
+ >
+ )}
+
+
+
+
+
+ );
+}
+
+function OrientationToggle({
+ initialState,
+ disabled,
+ emitState,
+}: {
+ initialState: TOrientation;
+ disabled: boolean;
+ emitState: (state: TOrientation) => void;
+}) {
+ const [currentFormat, setCurrentFormat] = useState(initialState);
+
+ function setFormat(format: TOrientation) {
+ setCurrentFormat(format);
+ emitState(format);
+ }
+ return (
+
(null);
- const [modalWidth, setModalWidth] = useState('700px');
const [clipsOfStreamAreLoading, setClipsOfStreamAreLoading] = useState(null);
- // This is kind of weird, but ensures that modals stay the right
- // size while the closing animation is played. This is why modal
- // width has its own state. This makes sure we always set the right
- // size whenever displaying a modal.
function setShowModal(modal: TModalStreamView | null) {
rawSetShowModal(modal);
-
- if (modal && modal.type) {
- setModalWidth(
- {
- trim: '60%',
- preview: '700px',
- export: '700px',
- remove: '400px',
- upload: '400px',
- requirements: '400px',
- }[modal.type],
- );
- }
}
async function previewVideo(id: string) {
@@ -306,7 +288,7 @@ export default function StreamView({ emitSetView }: { emitSetView: (data: IViewS
getContainer={`.${styles.streamViewRoot}`}
onCancel={closeModal}
footer={null}
- width={modalWidth}
+ width={showModal?.type === 'preview' ? 700 : 'fit-content'}
closable={false}
visible={!!showModal}
destroyOnClose={true}
diff --git a/app/components-react/shared/inputs/FileInput.tsx b/app/components-react/shared/inputs/FileInput.tsx
index c9fb3e4cab46..6b961966ef16 100644
--- a/app/components-react/shared/inputs/FileInput.tsx
+++ b/app/components-react/shared/inputs/FileInput.tsx
@@ -7,7 +7,12 @@ import InputWrapper from './InputWrapper';
import { $t } from '../../../services/i18n';
type TFileInputProps = TSlobsInputProps<
- { directory?: boolean; filters?: Electron.FileFilter[]; save?: boolean },
+ {
+ directory?: boolean;
+ filters?: Electron.FileFilter[];
+ save?: boolean;
+ buttonContent?: React.ReactNode;
+ },
string,
InputProps
>;
@@ -53,9 +58,13 @@ export const FileInput = InputComponent((p: TFileInputProps) => {
inputAttrs?.onChange(val.target.value)}
- disabled
value={p.value}
- addonAfter={}
+ disabled
+ addonAfter={
+
+ }
/>
);
diff --git a/app/i18n/en-US/highlighter.json b/app/i18n/en-US/highlighter.json
index 7dbe7ce46a34..0e548c29441f 100644
--- a/app/i18n/en-US/highlighter.json
+++ b/app/i18n/en-US/highlighter.json
@@ -170,5 +170,7 @@
"• Game mode is supported (Battle Royale, Reload, Zero Build, OG)": "• Game mode is supported (Battle Royale, Reload, Zero Build, OG)",
"Show details": "Show details",
"All requirements met but no luck?": "All requirements met but no luck?",
- "Take a screenshot of your stream and share it here": "Take a screenshot of your stream and share it here"
+ "Take a screenshot of your stream and share it here": "Take a screenshot of your stream and share it here",
+ "Exporting video...": "Exporting video...",
+ "%{clipsAmount} clips": "%{clipsAmount} clips"
}
\ No newline at end of file
diff --git a/app/services/highlighter/index.ts b/app/services/highlighter/index.ts
index 8add8b5efbcf..c098acc6b124 100644
--- a/app/services/highlighter/index.ts
+++ b/app/services/highlighter/index.ts
@@ -64,6 +64,7 @@ import {
IHighlight,
IHighlighterMilestone,
IInput,
+ EOrientation,
EGame,
} from './models/ai-highlighter.models';
import { HighlighterViews } from './highlighter-views';
@@ -111,8 +112,8 @@ export class HighlighterService extends PersistentStatefulService;
@@ -26,8 +31,6 @@ export enum EGame {
UNSET = 'unset',
}
-export type TOrientation = 'horizontal' | 'vertical';
-
export enum EHighlighterInputTypes {
KILL = 'kill',
KNOCKED = 'knocked',