Skip to content

Commit

Permalink
remove experimental server api on setting
Browse files Browse the repository at this point in the history
  • Loading branch information
urmauur committed Jan 17, 2024
1 parent c101e80 commit 8b9d8e8
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 30 deletions.
1 change: 1 addition & 0 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"@hookform/resolvers": "^3.3.2",
"@janhq/core": "link:./core",
"@janhq/uikit": "link:./uikit",
"@janhq/server": "link:./server",
"autoprefixer": "10.4.16",
"class-variance-authority": "^0.7.0",
"framer-motion": "^10.16.4",
Expand Down
30 changes: 0 additions & 30 deletions web/screens/Settings/Advanced/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,18 @@ import { useContext, useEffect, useState } from 'react'
import { fs } from '@janhq/core'
import { Switch, Button } from '@janhq/uikit'

// import { useAtom } from 'jotai'

import ShortcutModal from '@/containers/ShortcutModal'
import { toaster } from '@/containers/Toast'

import { toaster } from '@/containers/Toast'

import { FeatureToggleContext } from '@/context/FeatureToggle'

import { useSettings } from '@/hooks/useSettings'

// import { serverEnabledAtom } from '@/helpers/atoms/LocalServer.atom'

const Advanced = () => {
const { experimentalFeatureEnabed, setExperimentalFeatureEnabled } =
useContext(FeatureToggleContext)
const [gpuEnabled, setGpuEnabled] = useState<boolean>(false)
// const [serverEnabled, setServerEnabled] = useAtom(serverEnabledAtom)
const { readSettings, saveSettings, validateSettings, setShowNotification } =
useSettings()

Expand Down Expand Up @@ -97,30 +91,6 @@ const Advanced = () => {
}}
/>
</div>
{/* Server */}
{/* <div className="flex w-full items-start justify-between border-b border-border py-4 first:pt-0 last:border-none">
<div className="w-4/5 flex-shrink-0 space-y-1.5">
<div className="flex gap-x-2">
<h6 className="text-sm font-semibold capitalize">
Enable API Server
</h6>
</div>
<p className="whitespace-pre-wrap leading-relaxed">
Enable API server for Jan app.
</p>
</div>
<Switch
checked={serverEnabled}
onCheckedChange={(e: boolean) => {
if (e === true) {
window.core?.api?.startServer()
} else {
window.core?.api?.stopServer()
}
setServerEnabled(e)
}}
/>
</div> */}
{window.electronAPI && (
<div className="flex w-full items-start justify-between border-b border-border py-4 first:pt-0 last:border-none">
<div className="w-4/5 flex-shrink-0 space-y-1.5">
Expand Down

0 comments on commit 8b9d8e8

Please sign in to comment.