Skip to content

Commit

Permalink
fix(web): console scroll height
Browse files Browse the repository at this point in the history
  • Loading branch information
LeezQ committed Apr 12, 2023
1 parent 4e3be22 commit fc78e14
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 12 deletions.
4 changes: 3 additions & 1 deletion web/src/components/Editor/JSONViewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ type JSONViewerProps = {
language?: string;
showNumber?: boolean;
colorMode?: string;
className?: string;
};

const JSONViewerStyle: any = {
Expand Down Expand Up @@ -235,7 +236,7 @@ const JSONViewerDarkStyle: any = {
},
};
export default function JSONViewer(props: JSONViewerProps) {
const { code, language = "json", colorMode = "light" } = props;
const { code, language = "json", colorMode = "light", ...rest } = props;
const lightTheme = { background: "#fdfdfe" };
const darkTheme = {
background: "#202631",
Expand All @@ -248,6 +249,7 @@ export default function JSONViewer(props: JSONViewerProps) {
maxHeight: 390,
overflow: "auto",
}}
{...rest}
>
<SyntaxHighlighter
language={language}
Expand Down
2 changes: 1 addition & 1 deletion web/src/components/EmptyBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export default function EmptyBox(props: {
}) {
const { children, hideIcon, className } = props;
return (
<Center className={clsx("h-full w-full flex-col", className)}>
<Center className={clsx("h-full w-full flex-1 flex-col", className)}>
{hideIcon ? null : (
<Icon
width="150"
Expand Down
5 changes: 4 additions & 1 deletion web/src/pages/app/functions/mods/ConsolePanel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,10 @@ function ConsolePanel() {
return (
<Panel className="flex-1">
<Panel.Header title="Console"></Panel.Header>
<div className="text-sm relative overflow-y-auto px-2 font-mono " style={{ height: "100%" }}>
<div
className="text-sm relative flex flex-col overflow-y-auto px-2 font-mono"
style={{ height: "100%" }}
>
{currentRequestId && (
<p className="mb-1 ml-1">
RequestID: {currentRequestId} <CopyText text={String(currentRequestId)} />
Expand Down
25 changes: 24 additions & 1 deletion web/src/pages/homepage/footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,28 @@ const Footer = (props: Props) => {
<div className="mt-4 flex justify-between">
<div className="w-1/2 text-lg text-[#14171F]">
<div className="leading-8 text-[#5E6987]">{t("HomePage.Footer.product")}</div>
<ul className="leading-8">
<ul className="mb-4 leading-8">
<li>
<a href={String(t(`HomePage.LafLink`))}>{t("HomePage.Footer.item1_1")}</a>
</li>
<li>
<a
href="https://github.com/labring/laf/releases"
target="_blank"
rel="noreferrer"
>
{t("HomePage.Footer.item1_3")}
</a>
</li>
<li>
<a
href="https://marketplace.visualstudio.com/items?itemName=NightWhite.laf-assistant"
target="_blank"
rel="noreferrer"
>
{t("HomePage.Footer.item1_4")}
</a>
</li>
<li>
<a
href="https://github.com/labring/laf/releases"
Expand Down Expand Up @@ -200,6 +218,11 @@ const Footer = (props: Props) => {
{t("HomePage.Footer.item2_4")}
</a>
</li>
<li>
<a href={String(t("HomePage.DocsLink"))} target="_blank" rel="noreferrer">
{t("HomePage.Footer.item2_5")}
</a>
</li>
</ul>
</div>
</div>
Expand Down
11 changes: 3 additions & 8 deletions web/src/pages/homepage/navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,15 +172,10 @@ const Navbar = (props: Props) => {
aria-labelledby="dropdownDefaultButton"
>
<div>
<li>
<a href="/homepage/" className="block px-4 py-2 hover:bg-gray-100 ">
主页
</a>
</li>
<li>
<a
target="_blank"
href="https://docs.laf.dev"
href={String(t("HomePage.DocsLink"))}
className="block px-4 py-2 hover:bg-gray-100"
rel="noreferrer"
>
Expand Down Expand Up @@ -219,9 +214,9 @@ const Navbar = (props: Props) => {
</a>
) : null}

<a href="#" className="flex px-4 py-2 hover:bg-gray-100 ">
<div className="flex px-4 py-2 hover:bg-gray-100 ">
<Language />
</a>
</div>
</div>
</ul>
</div>
Expand Down

0 comments on commit fc78e14

Please sign in to comment.