More settings styles

This commit is contained in:
rift 2023-12-17 21:06:08 -06:00
parent a8ed8e55c2
commit 83fb885e8b
8 changed files with 33 additions and 30 deletions

View file

@ -27,10 +27,12 @@
}, },
"proxy": { "proxy": {
"title": "Proxy", "title": "Proxy",
"subtitle": "Choose the proxy that fits your needs",
"automatic": "Automatic" "automatic": "Automatic"
}, },
"languages": { "languages": {
"title": "Language", "title": "Language",
"subtitle": "Choose your preferred language",
"japanese": "Japanese", "japanese": "Japanese",
"english": "English" "english": "English"
} }

View file

@ -27,10 +27,12 @@
}, },
"proxy": { "proxy": {
"title": "プロキシ", "title": "プロキシ",
"subtitle": "ニーズに合ったプロキシを選んでください",
"automatic": "自動" "automatic": "自動"
}, },
"languages": { "languages": {
"title": "言語", "title": "言語",
"subtitle": "好きな言語を選んでください",
"japanese": "日本語", "japanese": "日本語",
"english": "英語" "english": "英語"
} }

View file

@ -7,12 +7,10 @@ interface Option {
} }
const Dropdown = ({ const Dropdown = ({
name,
storageKey, storageKey,
options, options,
refresh refresh
}: { }: {
name: string;
storageKey: string; storageKey: string;
options: Option[]; options: Option[];
refresh: boolean; refresh: boolean;
@ -30,7 +28,6 @@ const Dropdown = ({
return ( return (
<div className="relative text-center"> <div className="relative text-center">
<h1>{name}</h1>
<div <div
className={`font-roboto flex h-14 w-56 cursor-pointer flex-col items-center justify-center border border-input-border-color bg-input text-center text-xl ${ className={`font-roboto flex h-14 w-56 cursor-pointer flex-col items-center justify-center border border-input-border-color bg-input text-center text-xl ${
isOpen ? "rounded-t-2xl" : "rounded-2xl" isOpen ? "rounded-t-2xl" : "rounded-2xl"

View file

@ -24,12 +24,15 @@ const Misc = ({ id, active }) => {
variants={settingsPageVariant} variants={settingsPageVariant}
className="content-card flex flex-row flex-wrap justify-around" className="content-card flex flex-row flex-wrap justify-around"
> >
<Dropdown <div class="bg-lighter flex h-64 w-80 flex-col flex-wrap content-center items-center rounded-lg border border-input-border-color p-7 text-center">
name={t("settings.languages.title")} <div class="text-3xl">{t("settings.languages.title")}</div>
storageKey="i18nextLng" <div class="text-md">{t("settings.languages.subtitle")}</div>
options={languages} <Dropdown
refresh={true} storageKey="i18nextLng"
/> options={languages}
refresh={true}
/>
</div>
</motion.div> </motion.div>
</motion.div> </motion.div>
); );

View file

@ -13,27 +13,25 @@ const Proxy = ({ id, active }) => {
]; ];
return ( return (
<motion.div
role="tabpanel"
id={id}
className="tab-content"
variants={tabContentVariant}
animate={active ? "active" : "inactive"}
initial="inactive"
>
<motion.div <motion.div
role="tabpanel" variants={settingsPageVariant}
id={id} className="content-card flex flex-row flex-wrap justify-around"
className="tab-content"
variants={tabContentVariant}
animate={active ? "active" : "inactive"}
initial="inactive"
> >
<motion.div <div class="bg-lighter flex h-64 w-80 flex-col flex-wrap content-center items-center rounded-lg border border-input-border-color p-7 text-center">
variants={settingsPageVariant} <div class="p-2 text-3xl">{t("settings.proxy.title")}</div>
className="content-card flex flex-row flex-wrap justify-around" <div class="text-md p-4">{t("settings.proxy.subtitle")}</div>
> <Dropdown storageKey="proxy" options={engines} refresh={false} />
<Dropdown </div>
name={t("settings.proxy.title")}
storageKey="proxy"
options={engines}
refresh={false}
/>
</motion.div>
</motion.div> </motion.div>
</motion.div>
); );
}; };
export default Proxy; export default Proxy;

View file

@ -69,7 +69,7 @@ const TabComponent = ({ tabs, defaultIndex = 0 }) => {
const { t } = useTranslation() const { t } = useTranslation()
return ( return (
<div class="flex flex-col items-center"> <div class="flex flex-col items-center w-full h-full">
<div className="container h-full w-full"> <div className="container h-full w-full">
<div className="tabs-component"> <div className="tabs-component">
<ul className="tab-links" role="tablist"> <ul className="tab-links" role="tablist">

View file

@ -2,6 +2,7 @@
:root { :root {
--background-primary: #191724; --background-primary: #191724;
--background-lighter: #16121f;
--navbar-color: #26233a; --navbar-color: #26233a;
--navbar-height: 60px; --navbar-height: 60px;
--navbar-text-color: #7967dd; --navbar-text-color: #7967dd;
@ -25,4 +26,3 @@
.font-roboto { .font-roboto {
font-family: "Roboto"; font-family: "Roboto";
} }

View file

@ -4,6 +4,7 @@ export default {
theme: { theme: {
colors: { colors: {
primary: "var(--background-primary)", primary: "var(--background-primary)",
lighter: "var(--background-lighter)",
"navbar-text-color": "var(--navbar-text-color)", "navbar-text-color": "var(--navbar-text-color)",
"navbar-color": "var(--navbar-color)", "navbar-color": "var(--navbar-color)",
"text-color": "var(--navbar-link-color)", "text-color": "var(--navbar-link-color)",