feat: setting for mobile friendly
This commit is contained in:
@@ -35,7 +35,7 @@ const APIDocument = () => {
|
||||
👉 {t("api_doc.step_1")}
|
||||
</h3>
|
||||
{/* <div className="flex flex-col gap-1"> */}
|
||||
<img className='border border-solid rounded-md border-gray-300 shadow-lg w-[85%]' src="https://s.voce.chat/web_client/assets/img/api.doc.step1.png" alt="step 1" />
|
||||
<img className='border border-solid rounded-md border-gray-300 shadow-lg md:w-[85%]' src="https://s.voce.chat/web_client/assets/img/api.doc.step1.png" alt="step 1" />
|
||||
{/* </div> */}
|
||||
</div>
|
||||
<div className="flex flex-col gap-2">
|
||||
@@ -50,13 +50,13 @@ const APIDocument = () => {
|
||||
<IconCopy onClick={handleCopy} className="absolute right-2 bottom-2 cursor-pointer" />
|
||||
</p>
|
||||
</div>
|
||||
<img className='border border-solid rounded-md border-gray-300 shadow-lg w-[85%]' src="https://s.voce.chat/web_client/assets/img/api.doc.step2.jpg" alt="step 2" />
|
||||
<img className='border border-solid rounded-md border-gray-300 shadow-lg md:w-[85%]' src="https://s.voce.chat/web_client/assets/img/api.doc.step2.jpg" alt="step 2" />
|
||||
</div>
|
||||
<div className="flex flex-col gap-2">
|
||||
<h3 className='text-gray-700 dark:text-white text-lg flex items-center gap-2'>
|
||||
👉 {t("api_doc.last")}
|
||||
</h3>
|
||||
<img className='border border-solid rounded-md border-gray-300 shadow-lg w-[85%]' src="https://s.voce.chat/web_client/assets/img/api.doc.step3.png" alt="step 3" />
|
||||
<img className='border border-solid rounded-md border-gray-300 shadow-lg md:w-[85%]' src="https://s.voce.chat/web_client/assets/img/api.doc.step3.png" alt="step 3" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -73,7 +73,7 @@ export default function BotConfig() {
|
||||
</h2>
|
||||
<p className='text-gray-500 dark:text-gray-400 text-xs'>{t("manage_desc")}</p>
|
||||
</div>
|
||||
<div className="w-fit overflow-hidden">
|
||||
<div className="w-full md:w-fit overflow-auto md:overflow-hidden">
|
||||
<table className="min-w-full table-auto">
|
||||
<thead className="border-b dark:border-b-gray-500 bg-gray-50 dark:bg-gray-600">
|
||||
<tr>
|
||||
|
||||
@@ -61,12 +61,12 @@ export default function MyAccount() {
|
||||
return (
|
||||
<>
|
||||
<div className="flex flex-col items-start gap-8">
|
||||
<div className="p-6 flex flex-col items-center md:w-[512px] bg-gray-100 dark:bg-gray-800 rounded-2xl">
|
||||
<div className="md:p-6 flex flex-col items-center w-full md:w-[512px] md:bg-gray-100 md:dark:bg-gray-800 md:rounded-2xl">
|
||||
<AvatarUploader url={avatar} name={name} uploadImage={uploadAvatar} />
|
||||
<div className="mt-2 mb-16 font-bold text-lg text-gray-800 dark:text-white">
|
||||
{name} <span className="font-normal text-gray-500">#{uid}</span>
|
||||
</div>
|
||||
<div className="w-full flex flex-col items-start md:flex-row justify-between mb-6">
|
||||
<div className="w-full flex items-start justify-between mb-6">
|
||||
<div className="flex flex-col text-gray-500 dark:text-gray-50">
|
||||
<span className="text-xs uppercase font-semibold">{t("username")}</span>
|
||||
<span className="text-sm ">
|
||||
@@ -77,7 +77,7 @@ export default function MyAccount() {
|
||||
{ct("action.edit")}
|
||||
</Button>
|
||||
</div>
|
||||
<div className="w-full flex flex-col items-start md:flex-row justify-between mb-6">
|
||||
<div className="w-full flex items-start justify-between mb-6">
|
||||
<div className="flex flex-col text-gray-500 dark:text-gray-50">
|
||||
<span className="text-xs uppercase font-semibold">{t("email")}</span>
|
||||
<span className="text-sm">{email}</span>
|
||||
@@ -86,7 +86,7 @@ export default function MyAccount() {
|
||||
{ct("action.edit")}
|
||||
</Button>
|
||||
</div>
|
||||
<div className="w-full flex flex-col items-start md:flex-row justify-between mb-6">
|
||||
<div className="w-full flex items-start justify-between mb-6">
|
||||
<div className="flex flex-col text-gray-500 dark:text-gray-50">
|
||||
<span className="text-xs uppercase font-semibold">{t("password")}</span>
|
||||
<span className="text-sm">*********</span>
|
||||
|
||||
@@ -34,7 +34,7 @@ export default function Widget() {
|
||||
<div className="text-gray-500 dark:text-white text-sm mt-5 mb-2">
|
||||
{t('config')}:
|
||||
</div>
|
||||
<div className="w-[700px] border border-solid border-gray-300 dark:border-gray-400 rounded overflow-hidden">
|
||||
<div className="w-full md:w-[700px] border border-solid border-gray-300 dark:border-gray-400 rounded overflow-auto md:overflow-hidden">
|
||||
<table className="min-w-full table-auto">
|
||||
<thead className="border-b bg-gray-50 dark:bg-gray-500">
|
||||
<tr>
|
||||
|
||||
@@ -77,7 +77,7 @@ export default function ConfigFirebase() {
|
||||
client_email,
|
||||
} = values as FirebaseConfig;
|
||||
return (
|
||||
<div className="setting-container">
|
||||
<div className="setting-container max-md:w-full max-md:h-auto">
|
||||
<StyledRadio
|
||||
options={Object.values(Options)}
|
||||
values={Object.keys(Options)}
|
||||
|
||||
@@ -70,7 +70,7 @@ export default function Logins() {
|
||||
const valuesChanged = clientIdChanged || changed || githubChanged;
|
||||
|
||||
return (
|
||||
<div className="setting-container">
|
||||
<div className="setting-container max-md:w-full max-md:h-auto">
|
||||
<div className="inputs">
|
||||
<div className="input">
|
||||
<div className="row">
|
||||
|
||||
@@ -53,7 +53,7 @@ export default function ConfigSMTP() {
|
||||
if (!values) return null;
|
||||
const { host, port, from, username, password, enabled = false } = values as SMTPConfig;
|
||||
return (
|
||||
<div className="setting-container">
|
||||
<div className="setting-container max-md:w-full">
|
||||
<div className="inputs">
|
||||
<div className="input row">
|
||||
<Label className="dark:text-gray-200">{t("enable")}</Label>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { useState } from "react";
|
||||
import { useNavigate, useSearchParams } from "react-router-dom";
|
||||
import { useNavigate, useParams, useSearchParams } from "react-router-dom";
|
||||
import StyledSettingContainer from "../../common/component/StyledSettingContainer";
|
||||
import useNavs from "./navs";
|
||||
import LogoutConfirmModal from "./LogoutConfirmModal";
|
||||
@@ -12,7 +12,7 @@ export default function Setting() {
|
||||
const [searchParams] = useSearchParams();
|
||||
const navs = useNavs();
|
||||
const flattenNaves = navs.map(({ items }) => items).flat();
|
||||
const navKey = searchParams.get("nav");
|
||||
const { nav: navKey } = useParams();;
|
||||
const [logoutConfirm, setLogoutConfirm] = useState(false);
|
||||
const navigateTo = useNavigate();
|
||||
pageFrom = pageFrom ? pageFrom : searchParams.get("f") || "/";
|
||||
@@ -25,7 +25,7 @@ export default function Setting() {
|
||||
setLogoutConfirm((prev) => !prev);
|
||||
};
|
||||
|
||||
const currNav = flattenNaves.find((n) => n.name == navKey) || flattenNaves[0];
|
||||
const currNav = flattenNaves.find((n) => n.name == navKey);
|
||||
|
||||
return (
|
||||
<>
|
||||
@@ -36,7 +36,7 @@ export default function Setting() {
|
||||
navs={navs}
|
||||
dangers={[{ title: t("action.logout"), handler: toggleLogoutConfirm }]}
|
||||
>
|
||||
{currNav.component}
|
||||
{navKey ? currNav?.component : null}
|
||||
</StyledSettingContainer>
|
||||
{logoutConfirm && <LogoutConfirmModal closeModal={toggleLogoutConfirm} />}
|
||||
</>
|
||||
|
||||
Reference in New Issue
Block a user