Skip to content
This repository has been archived by the owner on Dec 26, 2023. It is now read-only.

Commit

Permalink
styles;
Browse files Browse the repository at this point in the history
  • Loading branch information
zsmatrix62 committed Mar 1, 2022
1 parent a8d3d6e commit 38f18c7
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 17 deletions.
9 changes: 3 additions & 6 deletions web-src/src/app/pages/main-page.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {Layout} from "@douyinfe/semi-ui";
import Sider from "@douyinfe/semi-ui/lib/es/layout/Sider";
import {useObservableState} from "observable-hooks";
import React, {ReactNode, useContext, useEffect, useRef} from "react";
import React, {ReactNode, useContext, useEffect} from "react";
import {SharedSubjectContext} from "../context/shared-subjects";
import {MainFooter} from "../shared/main-footer";
import {MainNav} from "../shared/main-nav";
Expand All @@ -11,7 +11,7 @@ import "./main-page.scss"


export const MainPage = () => {
const {Header, Footer, Content} = Layout;
const {Header, Content} = Layout;
const sharedSubs = useContext(SharedSubjectContext);
const [activeToolNode, setActiveToolNode] =
useObservableState<ReactNode>((obs) => {
Expand All @@ -29,9 +29,6 @@ export const MainPage = () => {
});
}, [setActiveToolNode, sharedSubs]);

// listen resize window event and adjust content height
const centerContainerRef = useRef<Layout>(null)

return (
<isTauriAppContext.Consumer>
{
Expand All @@ -41,7 +38,7 @@ export const MainPage = () => {
{!isTauriApp && <Header> <MainNav/> </Header>}
<Layout className="central-layout">
<Sider children={<ToolsSider/>}/>
<Content children={activeToolNode} ref={centerContainerRef}/>
<Content children={activeToolNode}/>
</Layout>
{!isTauriApp &&
<Layout.Footer className='main-footer-container'> <MainFooter/> </Layout.Footer>}
Expand Down
6 changes: 3 additions & 3 deletions web-src/src/app/shared/main-nav.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import {IconGithubLogo} from "@douyinfe/semi-icons";
import {Button, Nav, Space, Tooltip, Typography} from "@douyinfe/semi-ui";
import {Button, Nav, Space, Tooltip} from "@douyinfe/semi-ui";
import {DownloadOne} from "@icon-park/react";
import "./main-nav.scss"

Expand All @@ -22,12 +22,12 @@ export const MainNav = () => {

const navFooter = <Nav.Footer>
<Space>
<Tooltip content={<Typography.Text>Download Offline Client</Typography.Text>}
<Tooltip content='Download Offline Client'
position='bottomLeft'>
<Button size={"large"} onClick={onDownloadClicked}
icon={<DownloadOne theme="outline" size="21" fill="var(--semi-color-primary)"/>}/>
</Tooltip>
<Tooltip content={<Typography.Text>Github Repository</Typography.Text>}
<Tooltip content='Github Repository'
position='bottomLeft'>
<Button size={"large"} icon={<IconGithubLogo size={"extra-large"} onClick={onHomePageClicked}
/>}/>
Expand Down
8 changes: 7 additions & 1 deletion web-src/src/app/tool-blocks/json-formatter.scss
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,13 @@
flex-direction: row;
flex-wrap: wrap;

.mod-input-block-is-tauri {
height: 100vh !important;
}

.input-block {
height: 100%;
height: calc(100vh - 109px);

display: flex;
flex-direction: column;
padding-bottom: 10px;
Expand All @@ -26,6 +31,7 @@

textarea {
height: 100%;
overflow-y: hidden;
}
}

Expand Down
6 changes: 3 additions & 3 deletions web-src/src/app/tool-blocks/json-formatter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export const JsonFormatterBlock = () => {
}
})

setInputValue(`[{"category":"porro","sold":true,"author":"Mr. Clotilde Rohan","title":"eos magni sint corporis itaque eos.","price":7.0,"isbn":"504fa9b5-0499-43a6-97c3-61ab5293db58","email":"[email protected]"},{"category":"voluptas","sold":false,"author":"Miss Jaleel Green","title":"suscipit labore ea ducimus harum.","price":7.0,"isbn":"504fa9b5-0499-43a6-97c3-61ab5293db58","email":"[email protected]"},{"category":"est","sold":false,"author":"Miss Zane Hintz","title":"quia sit et velit pariatur et repudiandae.","price":7.0,"isbn":"504fa9b5-0499-43a6-97c3-61ab5293db58","email":"[email protected]"},{"category":"dolor","sold":false,"author":"Mr. Domenico Hayes","title":"modi voluptas enim aut sunt voluptatibus velit non.","price":7.0,"isbn":"504fa9b5-0499-43a6-97c3-61ab5293db58","email":"[email protected]"}]`)
// setInputValue(`[{"category":"porro","sold":true,"author":"Mr. Clotilde Rohan","title":"eos magni sint corporis itaque eos.","price":7.0,"isbn":"504fa9b5-0499-43a6-97c3-61ab5293db58","email":"[email protected]"},{"category":"voluptas","sold":false,"author":"Miss Jaleel Green","title":"suscipit labore ea ducimus harum.","price":7.0,"isbn":"504fa9b5-0499-43a6-97c3-61ab5293db58","email":"[email protected]"},{"category":"est","sold":false,"author":"Miss Zane Hintz","title":"quia sit et velit pariatur et repudiandae.","price":7.0,"isbn":"504fa9b5-0499-43a6-97c3-61ab5293db58","email":"[email protected]"},{"category":"dolor","sold":false,"author":"Mr. Domenico Hayes","title":"modi voluptas enim aut sunt voluptatibus velit non.","price":7.0,"isbn":"504fa9b5-0499-43a6-97c3-61ab5293db58","email":"[email protected]"}]`)
})

const setOutputJson = (val?: string, indent?: number) => {
Expand Down Expand Up @@ -226,7 +226,7 @@ export const JsonFormatterBlock = () => {
</SideSheet>

<Row className='json-formatter-container-child' gutter={10}>
<Col span={12} className='input-block'>
<Col span={12} className={`input-block ${isTauri ? 'mod-input-block-is-tauri' : ''}`}>
<Row style={{padding: "10px 0"}}>
<Space> <Button onClick={setRandomJson}>Sample</Button> <Button
onClick={onClearClicked}>Clear</Button> </Space>
Expand All @@ -242,7 +242,7 @@ export const JsonFormatterBlock = () => {
/>
</Row>
</Col>
<Col span={12} className='input-block'>
<Col span={12} className={`input-block ${isTauri ? 'mod-input-block-is-tauri' : ''}`}>
<Row style={{padding: "10px 0", flexDirection: "row-reverse"}} type={"flex"}>
<Space>
<Button disabled={!outputValue}
Expand Down
Binary file removed web-src/src/assets/fonts/SigmarOne-Regular.ttf
Binary file not shown.
4 changes: 0 additions & 4 deletions web-src/src/index.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
@font-face {
font-family: "SigmarOne";
src: local("SigmarOne"), url("./assets/fonts/SigmarOne-Regular.ttf") format("trutype");
}

body {
margin: 0;
Expand Down

0 comments on commit 38f18c7

Please sign in to comment.