diff --git a/app/components/ActionsBar/index.tsx b/app/components/ActionsBar/index.tsx
index 045459c4c..3c6132f7f 100644
--- a/app/components/ActionsBar/index.tsx
+++ b/app/components/ActionsBar/index.tsx
@@ -76,7 +76,7 @@ export default function ActionsBar(props: ActionsBarProps) {
return (
{title && (
{title}
diff --git a/app/components/Imgs/index.tsx b/app/components/Imgs/index.tsx
index bf09df795..6b06cc059 100644
--- a/app/components/Imgs/index.tsx
+++ b/app/components/Imgs/index.tsx
@@ -4,33 +4,23 @@ import { RequestMessage } from "@/app/client/api";
interface ImgsProps {
message: RequestMessage;
- isMobileScreen?: boolean;
}
export default function Imgs(props: ImgsProps) {
- const { message, isMobileScreen } = props;
+ const { message } = props;
const imgSrcs = getMessageImages(message);
if (imgSrcs.length < 1) {
return <>>;
}
- let imgVars = {
+ const imgVars = {
"--imgs-width": `calc(var(--max-message-width) - ${
imgSrcs.length - 1
}*0.25rem)`,
"--img-width": `calc(var(--imgs-width)/ ${imgSrcs.length})`,
};
- if (isMobileScreen) {
- imgVars = {
- "--imgs-width": `calc(var(--max-message-width) - ${
- imgSrcs.length - 1
- }*0.25rem)`,
- "--img-width": `calc(var(--imgs-width)/ ${imgSrcs.length})`,
- };
- }
-
return (
{type == "password" && (
-
setShow((pre) => !pre)}>
+
setShow((pre) => !pre)}>
{show ?
:
}
)}
diff --git a/app/components/List/index.tsx b/app/components/List/index.tsx
index 91b97019c..94c9af655 100644
--- a/app/components/List/index.tsx
+++ b/app/components/List/index.tsx
@@ -52,20 +52,13 @@ export function ListItem(props: ListItemProps) {
const context = useContext(ListContext);
- const [childrenMeta, setMeta] = useState
({});
+ const [childrenType, setMeta] = useState("unknown");
- const { isMobileScreen, inputNextLine, rangeNextLine } = context;
-
- let containerClassName = "py-3";
- let titleClassName = "";
- if (isMobileScreen) {
- containerClassName = "py-2";
- titleClassName = "";
- }
+ const { inputNextLine, rangeNextLine } = context;
let internalNextLine;
- switch (childrenMeta.type) {
+ switch (childrenType) {
case "input":
internalNextLine = !!(nextline || inputNextLine);
break;
@@ -76,20 +69,18 @@ export function ListItem(props: ListItemProps) {
internalNextLine = false;
}
- const update = useCallback((m: ChildrenMeta) => {
- setMeta(m);
+ const updateType = useCallback((m: ChildrenMeta) => {
+ setMeta(m.type);
}, []);
return (
-
+
{title}
@@ -97,7 +88,7 @@ export function ListItem(props: ListItemProps) {
{subTitle}
)}
-
+
{!noLogo &&
}
diff --git a/app/components/MenuLayout/index.tsx b/app/components/MenuLayout/index.tsx
index fb20728f3..d5355aa9d 100644
--- a/app/components/MenuLayout/index.tsx
+++ b/app/components/MenuLayout/index.tsx
@@ -59,23 +59,20 @@ export default function MenuLayout<
),
});
- let containerClassName = "flex h-[100%] w-[100%]";
- let listClassName =
- "relative basis-sidebar h-[calc(100%-1.25rem)] pb-6 max-md:px-4 max-md:pb-4 rounded-md my-2.5 bg-menu";
- let panelClassName = "flex-1 h-[100%] w-page";
-
- if (isMobileScreen) {
- containerClassName = "h-[100%] w-[100%] relative bg-center";
- listClassName = `h-[100%] w-[100%] flex-1 px-4`;
- panelClassName = `transition-all duration-300 absolute top-0 max-h-[100vh] w-[100%] ${
- showPanel ? "left-0" : "left-[101%]"
- } z-10`;
- }
-
return (
-
+
{
if (e.target === e.currentTarget) {
navigate(Path.Home);
@@ -101,7 +98,14 @@ export default function MenuLayout<
)}
-
+
{content}
diff --git a/app/components/Screen/index.tsx b/app/components/Screen/index.tsx
index c1ec1ca9f..2f7a7b19c 100644
--- a/app/components/Screen/index.tsx
+++ b/app/components/Screen/index.tsx
@@ -25,20 +25,13 @@ export default function Screen(props: ScreenProps) {
useListenWinResize();
- let containerClassName = "flex h-[100%] w-[100%] bg-center overflow-hidden";
- let sidebarClassName = "flex-0 overflow-hidden";
- let pageClassName = "flex-1 h-[100%] min-w-0 overflow-hidden";
-
- if (isMobileScreen) {
- containerClassName =
- "relative flex flex-col-reverse h-[100%] w-[100%] bg-center";
- sidebarClassName = "absolute w-[100%] bottom-0 z-10";
- pageClassName = "w-[100%] h-[100%]";
- }
-
return (
-