Skip to content

Create polished demo videos without editing skills. Mac/Windows/Linux

feat(app): add discord link to editor header

webadderall3e7797966de3
diff --git a/src/components/video-editor/TutorialHelp.tsx b/src/components/video-editor/TutorialHelp.tsx
index c69c26f4..9b4a7709 100644
--- a/src/components/video-editor/TutorialHelp.tsx
+++ b/src/components/video-editor/TutorialHelp.tsx
@@ -16,11 +16,20 @@ import { formatShortcut } from "@/utils/platformUtils";
import { toast } from "sonner";
const RECORDLY_ISSUES_URL = "https://github.com/webadderall/Recordly/issues";
+const RECORDLY_DISCORD_URL = "https://discord.gg/FcfNN4S9m";
const RECORDLY_X_URL = "https://x.com/webadderall";
const CONTACT_EMAIL = "[email protected]";
export const APP_HEADER_ACTION_BUTTON_CLASS = "h-7 px-2 text-xs text-slate-400 hover:bg-white/10 hover:text-slate-200 transition-all gap-1.5";
export const APP_HEADER_ICON_BUTTON_CLASS = "h-7 w-7 p-0 text-slate-400 hover:bg-white/10 hover:text-slate-200 transition-all";
+function DiscordIcon(props: React.SVGProps<SVGSVGElement>) {
+ return (
+ <svg viewBox="0 0 24 24" fill="currentColor" aria-hidden="true" {...props}>
+ <path d="M20.317 4.369A19.791 19.791 0 0 0 15.418 3a13.255 13.255 0 0 0-.615 1.263 18.27 18.27 0 0 0-5.606 0A13.25 13.25 0 0 0 8.582 3a19.736 19.736 0 0 0-4.9 1.369C.533 9.091-.32 13.697.099 18.237a19.917 19.917 0 0 0 5.993 3.024 14.32 14.32 0 0 0 1.284-2.108 12.804 12.804 0 0 1-2.021-.972c.17-.126.335-.258.495-.395a14.135 14.135 0 0 0 12.3 0c.16.137.325.269.495.395a12.736 12.736 0 0 1-2.026.974 14.103 14.103 0 0 0 1.284 2.106 19.883 19.883 0 0 0 5.996-3.024c.489-5.258-.836-9.822-3.682-13.868ZM8.02 15.331c-1.182 0-2.154-1.085-2.154-2.419 0-1.334.953-2.419 2.154-2.419 1.211 0 2.173 1.095 2.154 2.419 0 1.334-.953 2.419-2.154 2.419Zm7.96 0c-1.182 0-2.154-1.085-2.154-2.419 0-1.334.953-2.419 2.154-2.419 1.211 0 2.173 1.095 2.154 2.419 0 1.334-.943 2.419-2.154 2.419Z" />
+ </svg>
+ );
+}
+
async function openExternalLink(url: string, errorMessage: string) {
try {
const result = await window.electronAPI.openExternalUrl(url);
@@ -32,6 +41,24 @@ async function openExternalLink(url: string, errorMessage: string) {
}
}
+export function DiscordLinkButton() {
+ const t = useScopedT("editor");
+
+ return (
+ <Button
+ type="button"
+ variant="ghost"
+ size="sm"
+ onClick={() => void openExternalLink(RECORDLY_DISCORD_URL, t("feedback.openFailed", "Failed to open link."))}
+ className={APP_HEADER_ICON_BUTTON_CLASS}
+ title={t("common.app.discord", "Join Discord")}
+ aria-label={t("common.app.discord", "Join Discord")}
+ >
+ <DiscordIcon className="h-3.5 w-3.5" />
+ </Button>
+ );
+}
+
export function FeedbackDialog() {
const t = useScopedT("editor");
diff --git a/src/components/video-editor/VideoEditor.tsx b/src/components/video-editor/VideoEditor.tsx
index 17e77c19..83ed952a 100644
--- a/src/components/video-editor/VideoEditor.tsx
+++ b/src/components/video-editor/VideoEditor.tsx
@@ -62,6 +62,7 @@ import {
import { type EditorEffectSection, SettingsPanel } from "./SettingsPanel";
import {
APP_HEADER_ICON_BUTTON_CLASS,
+ DiscordLinkButton,
FeedbackDialog,
KeyboardShortcutsDialog,
} from "./TutorialHelp";
@@ -2978,6 +2979,7 @@ export default function VideoEditor() {
>
<FolderOpen className="h-4 w-4" />
</Button>
+ <DiscordLinkButton />
<KeyboardShortcutsDialog />
<FeedbackDialog />
<div className="ml-1 h-5 w-px bg-white/10" />