Skip to content

Commit

Permalink
hiding menu icon collapse panel left in local server page
Browse files Browse the repository at this point in the history
  • Loading branch information
urmauur committed Jan 17, 2024
1 parent 005c47f commit f5eaa41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 33 deletions.
5 changes: 4 additions & 1 deletion web/containers/Layout/TopBar/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
33 changes: 1 addition & 32 deletions web/screens/LocalServer/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -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 */}
Expand Down Expand Up @@ -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">
Expand Down

0 comments on commit f5eaa41

Please sign in to comment.