mirror of
https://github.com/movie-web/movie-web.git
synced 2024-12-28 17:51:50 +01:00
settings view removed
This commit is contained in:
parent
f0c9103e0d
commit
06d043d482
@ -12,7 +12,6 @@ import { DeveloperView } from "@/views/developer/DeveloperView";
|
|||||||
import { VideoTesterView } from "@/views/developer/VideoTesterView";
|
import { VideoTesterView } from "@/views/developer/VideoTesterView";
|
||||||
import { ProviderTesterView } from "@/views/developer/ProviderTesterView";
|
import { ProviderTesterView } from "@/views/developer/ProviderTesterView";
|
||||||
import { EmbedTesterView } from "@/views/developer/EmbedTesterView";
|
import { EmbedTesterView } from "@/views/developer/EmbedTesterView";
|
||||||
import { SettingsView } from "@/views/settings/SettingsView";
|
|
||||||
import { BannerContextProvider } from "@/hooks/useBanner";
|
import { BannerContextProvider } from "@/hooks/useBanner";
|
||||||
import { Layout } from "@/setup/Layout";
|
import { Layout } from "@/setup/Layout";
|
||||||
import { TestView } from "@/views/developer/TestView";
|
import { TestView } from "@/views/developer/TestView";
|
||||||
@ -43,7 +42,6 @@ function App() {
|
|||||||
path="/search/:type/:query?"
|
path="/search/:type/:query?"
|
||||||
component={SearchView}
|
component={SearchView}
|
||||||
/>
|
/>
|
||||||
<Route exact path="/settings" component={SettingsView} />
|
|
||||||
|
|
||||||
{/* other */}
|
{/* other */}
|
||||||
<Route exact path="/dev" component={DeveloperView} />
|
<Route exact path="/dev" component={DeveloperView} />
|
||||||
|
@ -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>
|
|
||||||
);
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user