Skip to content

Commit

Permalink
[highlighter] add share feedback button (#5269)
Browse files Browse the repository at this point in the history
* add share feedback button to top bar

* translation fix

* to kick of build pipe again
  • Loading branch information
marvinoffers authored Jan 15, 2025
1 parent ec68c6b commit d134eec
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 29 deletions.
69 changes: 42 additions & 27 deletions app/components-react/highlighter/ClipsView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,12 @@ export default function ClipsView({

const containerRef = useOptimizedHover();

function shareFeedback() {
remote.shell.openExternal(
'https://support.streamlabs.com/hc/en-us/requests/new?ticket_form_id=31967205905051',
);
}

function getClipsView(
streamId: string | undefined,
sortedList: { id: string }[],
Expand All @@ -163,34 +169,43 @@ export default function ClipsView({
onDrop={event => onDrop(event, streamId)}
>
<div className={styles.container}>
<header className={styles.header}>
<button
className={styles.backButton}
onClick={() =>
emitSetView(
streamId
? { view: EHighlighterView.STREAM }
: { view: EHighlighterView.SETTINGS },
)
}
>
<i className="icon-back" />
</button>
<h1
className={styles.title}
onClick={() =>
emitSetView(
streamId
? { view: EHighlighterView.STREAM }
: { view: EHighlighterView.SETTINGS },
)
}
>
{props.streamTitle ?? $t('All highlight clips')}
</h1>
</header>
<div style={{ display: 'flex', width: '100%', justifyContent: 'space-between' }}>
<header className={styles.header}>
<button
className={styles.backButton}
onClick={() =>
emitSetView(
streamId
? { view: EHighlighterView.STREAM }
: { view: EHighlighterView.SETTINGS },
)
}
>
<i className="icon-back" />
</button>
<h1
className={styles.title}
onClick={() =>
emitSetView(
streamId
? { view: EHighlighterView.STREAM }
: { view: EHighlighterView.SETTINGS },
)
}
>
{props.streamTitle ?? $t('All highlight clips')}
</h1>
</header>
<div style={{ padding: '20px' }}>
<Button
icon={<i className="icon-community" style={{ marginRight: 8 }} />}
onClick={shareFeedback}
>
Share Feedback
</Button>
</div>
</div>
{sortedList.length === 0 ? (
/** Better empty state will come with ai PR */
<div style={{ padding: '20px' }}>
{$t('No clips found')}
<br />
Expand Down
2 changes: 1 addition & 1 deletion app/components-react/highlighter/PreviewModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -225,7 +225,7 @@ export default function PreviewModal({
return (
<div>
<h2>{$t('Preview')}</h2>
<p>Select at least one clip to preview your video</p>
<p>{$t('Select at least one clip to preview your video')}</p>
</div>
);
}
Expand Down
5 changes: 4 additions & 1 deletion app/i18n/en-US/highlighter.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,5 +142,8 @@
"Export Horizontal": "Export Horizontal",
"Get highlights (Fortnite only)": "Get highlights (Fortnite only)",
"My Stream Highlights": "My Stream Highlights",
"You cannot use special characters in this field": "You cannot use special characters in this field"
"You cannot use special characters in this field": "You cannot use special characters in this field",
"Share feedback": "Share feedback",
"Select at least one clip to preview your video": "Select at least one clip to preview your video",
"Select at least one clip to export your video": "Select at least one clip to export your video"
}

0 comments on commit d134eec

Please sign in to comment.