1
0
Fork 0
mirror of https://github.com/sussy-code/smov.git synced 2024-12-20 14:37:43 +01:00

settings view removed

This commit is contained in:
frost768 2023-03-15 17:47:50 +03:00
parent f0c9103e0d
commit 06d043d482
2 changed files with 0 additions and 83 deletions

View file

@ -12,7 +12,6 @@ import { DeveloperView } from "@/views/developer/DeveloperView";
import { VideoTesterView } from "@/views/developer/VideoTesterView";
import { ProviderTesterView } from "@/views/developer/ProviderTesterView";
import { EmbedTesterView } from "@/views/developer/EmbedTesterView";
import { SettingsView } from "@/views/settings/SettingsView";
import { BannerContextProvider } from "@/hooks/useBanner";
import { Layout } from "@/setup/Layout";
import { TestView } from "@/views/developer/TestView";
@ -43,7 +42,6 @@ function App() {
path="/search/:type/:query?"
component={SearchView}
/>
<Route exact path="/settings" component={SettingsView} />
{/* other */}
<Route exact path="/dev" component={DeveloperView} />

View file

@ -1,81 +0,0 @@
import { Dropdown, OptionItem } from "@/components/Dropdown";
import { useSettings } from "@/state/settings";
export function SettingsView() {
const languages: OptionItem[] = [
{ id: "en", name: "English" },
{ id: "tr", name: "Turkish" },
];
const {
language,
captionSettings,
setLanguage,
setCaptionBackgroundColor,
setCaptionColor,
setCaptionFontSize,
} = useSettings();
const selectedLanguage = languages.find((lang) => lang.id === language) || {
id: "en",
name: "English",
};
return (
<div className="flex aspect-square flex-row pl-28">
<div className="flex flex-col p-10">
<label className="font-bold text-white">Language</label>
<Dropdown
setSelectedItem={(item) => setLanguage(item.id)}
selectedItem={selectedLanguage}
options={languages}
/>
</div>
<div className="flex flex-col p-10">
<div className="font-bold text-white">Caption Settings</div>
<div className="flex flex-row">
<div className="flex flex-col">
<label className="font-bold text-white" htmlFor="fontSize">
Font Size
</label>
<input
onChange={(e) => setCaptionFontSize(e.target.valueAsNumber)}
type="range"
name="fontSize"
id="fontSize"
max={40}
min={10}
value={captionSettings.style.fontSize}
/>
<div className="flex flex-row justify-between">
<label className="font-bold text-white" htmlFor="color">
Color
</label>
<input
className="ml-10"
onChange={(e) => setCaptionColor(e.target.value)}
type="color"
name="color"
id="color"
value={captionSettings.style.color}
/>
</div>
<div className="flex flex-row justify-between">
<label className="font-bold text-white" htmlFor="bgColor">
Background Color
</label>
<input
className="ml-10"
onChange={(e) => setCaptionBackgroundColor(e.target.value)}
type="color"
name="bgColor"
id="bgColor"
value={captionSettings.style.backgroundColor}
/>
</div>
</div>
</div>
<div className="text-white">
{JSON.stringify(captionSettings, null, "\t\t")}
</div>
</div>
</div>
);
}