-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #894 from marcelhillesheim/feature/streaming-tutorial
FE: streaming: added tutorial
- Loading branch information
Showing
4 changed files
with
149 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
rcongui_public/src/pages/home/streaming/stream-tutorial.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
import React from 'react'; | ||
import { useTranslation } from "react-i18next"; | ||
import { siObsstudio } from "simple-icons"; | ||
import { SimpleIcon } from "@/components/simple-icon"; | ||
|
||
const StreamTutorial = () => { | ||
const { t } = useTranslation('translation', { keyPrefix: 'streaming.tutorial' }); | ||
|
||
const cssValue = `.stream-banner { | ||
background-color: black !important; | ||
} | ||
.stream-banner-text { | ||
color: #ffa500 !important; | ||
} | ||
.stream-banner-kills { | ||
color: red !important; | ||
} | ||
.stream-banner-player { | ||
color: #6a5acd !important; | ||
} | ||
.stream-banner-weapon { | ||
color: #6a5acd !important; | ||
}`; | ||
|
||
const steps = [ | ||
{ | ||
id: 'obs', | ||
content: t("openOBS"), | ||
icon: <SimpleIcon size={20} icon={siObsstudio} className="dark:fill-current inline-block ml-2" /> | ||
}, | ||
{ | ||
id: 'source', | ||
content: t("createSource") | ||
}, | ||
{ | ||
id: 'values', | ||
content: t("enterFollowingValues"), | ||
subContent: ( | ||
<div className="ml-4 space-y-2 mt-2"> | ||
<p className="flex justify-between"> | ||
<span className="font-semibold">{t("url")}:</span> | ||
<span className="font-mono">{window.location.href}</span> | ||
</p> | ||
<p className="flex justify-between"> | ||
<span className="font-semibold">{t("width")}:</span> | ||
<span className="font-mono">1000</span> | ||
</p> | ||
<p className="flex justify-between"> | ||
<span className="font-semibold">{t("height")}:</span> | ||
<span className="font-mono">800</span> | ||
</p> | ||
<p className="font-semibold">{t("customCSS")}:</p> | ||
<pre | ||
className="w-full p-4 bg-accent rounded-md font-mono text-sm text-gray-100 whitespace-pre overflow-x-auto"> | ||
{cssValue} | ||
</pre> | ||
<p> | ||
{t("adjustColors")} | ||
</p> | ||
<p className="italic">{t("andSave")}</p> | ||
</div> | ||
) | ||
}, | ||
{ | ||
id: 'crop', | ||
content: t("crop") | ||
}, | ||
{ | ||
id: 'settings', | ||
content: t("changeSettings") | ||
} | ||
]; | ||
|
||
return ( | ||
<div className="w-full flex justify-center"> | ||
<div className="w-96 space-y-3"> | ||
<div className="space-y-3"> | ||
<p>{t("introduction")}</p> | ||
<p>{t("stepByStep")}</p> | ||
</div> | ||
|
||
<ol className="space-y-4"> | ||
{steps.map((step, index) => ( | ||
<li key={step.id} className="flex flex-col"> | ||
<div className="flex items-center"> | ||
<span className="font-semibold">{index + 1}. </span> | ||
<span className="ml-2">{step.content}</span> | ||
{step.icon} | ||
</div> | ||
{step.subContent} | ||
</li> | ||
))} | ||
</ol> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default StreamTutorial; |