hiding menu icon collapse panel left in local server page

This commit is contained in:
Faisal Amir 2024-01-16 09:49:26 +07:00
parent 005c47f0ae
commit f5eaa41d09
2 changed files with 5 additions and 33 deletions

View File

@ -81,7 +81,10 @@ const TopBar = () => {
<div className="absolute left-16 h-full w-60 border-r border-border">
<div className="flex h-full w-full items-center justify-between">
<div
className="unset-drag cursor-pointer"
className={twMerge(
'unset-drag cursor-pointer',
mainViewState !== MainViewState.Thread && 'invisible'
)}
onClick={() => setShowLeftSideBar((show) => !show)}
>
<PanelRightCloseIcon

View File

@ -16,14 +16,12 @@ import {
SelectTrigger,
SelectValue,
} from '@janhq/uikit'
// import hljs from 'highlight.js'
import { useAtom, useAtomValue } from 'jotai'
import { Paintbrush, CodeIcon } from 'lucide-react'
import { ExternalLinkIcon, InfoIcon } from 'lucide-react'
// import { Marked, Renderer } from 'marked'
// import { markedHighlight } from 'marked-highlight'
import { twMerge } from 'tailwind-merge'
import CardSidebar from '@/containers/CardSidebar'
@ -56,33 +54,10 @@ const LocalServerScreen = () => {
useEffect(() => {
getServerLog().then((log) => {
// setLogs(log)
// console.log(log)
setLogs(log.split(/\r?\n|\r|\n/g))
// setLogs(JSON.stringify(log, null, 2))
})
}, [getServerLog, logs])
// const marked: Marked = new Marked(
// markedHighlight({
// langPrefix: 'hljs',
// highlight(code) {
// return hljs.highlightAuto(code).value
// },
// }),
// {
// renderer: {
// link: (href, title, text) => {
// return Renderer.prototype.link
// ?.apply(this, [href, title, text])
// .replace('<a', "<a target='_blank'")
// },
// },
// }
// )
// const parsedText = marked.parse(logs)
return (
<div className="flex h-full w-full">
{/* Left SideBar */}
@ -222,12 +197,6 @@ const LocalServerScreen = () => {
</div>
<div className="p-4">
<code className="text-xs">
{/* <div
dangerouslySetInnerHTML={{
__html: parsedText,
}}
/> */}
{logs.map((log, i) => {
return (
<p key={i} className="my-2 leading-relaxed">