remove experimental server api on setting
This commit is contained in:
parent
c101e800a7
commit
8b9d8e8301
@ -17,6 +17,7 @@
|
|||||||
"@hookform/resolvers": "^3.3.2",
|
"@hookform/resolvers": "^3.3.2",
|
||||||
"@janhq/core": "link:./core",
|
"@janhq/core": "link:./core",
|
||||||
"@janhq/uikit": "link:./uikit",
|
"@janhq/uikit": "link:./uikit",
|
||||||
|
"@janhq/server": "link:./server",
|
||||||
"autoprefixer": "10.4.16",
|
"autoprefixer": "10.4.16",
|
||||||
"class-variance-authority": "^0.7.0",
|
"class-variance-authority": "^0.7.0",
|
||||||
"framer-motion": "^10.16.4",
|
"framer-motion": "^10.16.4",
|
||||||
|
|||||||
@ -6,10 +6,7 @@ import { useContext, useEffect, useState } from 'react'
|
|||||||
import { fs } from '@janhq/core'
|
import { fs } from '@janhq/core'
|
||||||
import { Switch, Button } from '@janhq/uikit'
|
import { Switch, Button } from '@janhq/uikit'
|
||||||
|
|
||||||
// import { useAtom } from 'jotai'
|
|
||||||
|
|
||||||
import ShortcutModal from '@/containers/ShortcutModal'
|
import ShortcutModal from '@/containers/ShortcutModal'
|
||||||
import { toaster } from '@/containers/Toast'
|
|
||||||
|
|
||||||
import { toaster } from '@/containers/Toast'
|
import { toaster } from '@/containers/Toast'
|
||||||
|
|
||||||
@ -17,13 +14,10 @@ import { FeatureToggleContext } from '@/context/FeatureToggle'
|
|||||||
|
|
||||||
import { useSettings } from '@/hooks/useSettings'
|
import { useSettings } from '@/hooks/useSettings'
|
||||||
|
|
||||||
// import { serverEnabledAtom } from '@/helpers/atoms/LocalServer.atom'
|
|
||||||
|
|
||||||
const Advanced = () => {
|
const Advanced = () => {
|
||||||
const { experimentalFeatureEnabed, setExperimentalFeatureEnabled } =
|
const { experimentalFeatureEnabed, setExperimentalFeatureEnabled } =
|
||||||
useContext(FeatureToggleContext)
|
useContext(FeatureToggleContext)
|
||||||
const [gpuEnabled, setGpuEnabled] = useState<boolean>(false)
|
const [gpuEnabled, setGpuEnabled] = useState<boolean>(false)
|
||||||
// const [serverEnabled, setServerEnabled] = useAtom(serverEnabledAtom)
|
|
||||||
const { readSettings, saveSettings, validateSettings, setShowNotification } =
|
const { readSettings, saveSettings, validateSettings, setShowNotification } =
|
||||||
useSettings()
|
useSettings()
|
||||||
|
|
||||||
@ -97,30 +91,6 @@ const Advanced = () => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
</div>
|
</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 && (
|
{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="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="w-4/5 flex-shrink-0 space-y-1.5">
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user