Update Settings design and 'About' section
This commit is contained in:
1 parent
5a84cb1145
commit
c2ec5fd17d
3 files changed
+51
-22
No files matched your search
@@ -7,10 +7,10 @@ import {
|
||||
FlaskConical,
|
||||
Info,
|
||||
LucideIcon,
|
||||
Settings,
|
||||
SlidersHorizontal,
|
||||
SquareMousePointer,
|
||||
SquareTerminal,
|
||||
Wrench,
|
||||
} from "lucide-react"
|
||||
import { useCallback, useEffect, useMemo, useRef, useState } from "react"
|
||||
import { useEvent } from "react-use"
|
||||
@@ -49,13 +49,6 @@ interface SettingsTab {
|
||||
}
|
||||
|
||||
export const SETTINGS_TABS: SettingsTab[] = [
|
||||
{
|
||||
id: "general",
|
||||
name: "General",
|
||||
tooltipText: "General Settings",
|
||||
headerText: "General Settings",
|
||||
icon: Settings,
|
||||
},
|
||||
{
|
||||
id: "api-config",
|
||||
name: "API Configuration",
|
||||
@@ -93,6 +86,13 @@ export const SETTINGS_TABS: SettingsTab[] = [
|
||||
icon: FlaskConical,
|
||||
hidden: !IS_DEV,
|
||||
},
|
||||
{
|
||||
id: "general",
|
||||
name: "General",
|
||||
tooltipText: "General Settings",
|
||||
headerText: "General Settings",
|
||||
icon: Wrench,
|
||||
},
|
||||
{
|
||||
id: "about",
|
||||
name: "About",
|
||||
@@ -139,13 +139,10 @@ const SettingsView = ({ onDone, targetSection }: SettingsViewProps) => {
|
||||
[],
|
||||
) // Empty deps - these imports never change
|
||||
|
||||
const { version, telemetrySetting } = useExtensionState()
|
||||
const { version } = useExtensionState()
|
||||
|
||||
// Initialize active tab with memoized calculation
|
||||
const initialTab = useMemo(
|
||||
() => targetSection || (telemetrySetting === "unset" ? "general" : SETTINGS_TABS[0].id),
|
||||
[targetSection, telemetrySetting],
|
||||
)
|
||||
const initialTab = useMemo(() => targetSection || SETTINGS_TABS[0].id, [targetSection])
|
||||
|
||||
const [activeTab, setActiveTab] = useState<string>(initialTab)
|
||||
const [isCompactMode, setIsCompactMode] = useState(true)
|
||||
|
||||
@@ -5,20 +5,46 @@ interface AboutSectionProps {
|
||||
version: string
|
||||
renderSectionHeader: (tabId: string) => JSX.Element | null
|
||||
}
|
||||
|
||||
const AboutSection = ({ version, renderSectionHeader }: AboutSectionProps) => {
|
||||
return (
|
||||
<div>
|
||||
{renderSectionHeader("about")}
|
||||
<Section>
|
||||
<div className="text-center text-[var(--vscode-descriptionForeground)] text-xs leading-[1.2] px-0 py-0 pr-2 pb-[15px] mt-auto">
|
||||
<p className="break-words m-0 p-0">
|
||||
If you have any questions or feedback, feel free to open an issue at{" "}
|
||||
<VSCodeLink className="inline" href="https://github.com/cline/cline">
|
||||
https://github.com/cline/cline
|
||||
<div style={{ padding: "0 16px" }}>
|
||||
<h2>Cline v{version}</h2>
|
||||
<p>
|
||||
An AI assistant that can use your CLI and Editor. Cline can handle complex software development tasks
|
||||
step-by-step with tools that let him create & edit files, explore large projects, use the browser, and
|
||||
execute terminal commands (after you grant permission).
|
||||
</p>
|
||||
|
||||
<h3>Community & Support</h3>
|
||||
<p>
|
||||
<VSCodeLink href="https://x.com/cline">X</VSCodeLink>
|
||||
{" • "}
|
||||
<VSCodeLink href="https://discord.gg/cline">Discord</VSCodeLink>
|
||||
{" • "}
|
||||
<VSCodeLink href="https://www.reddit.com/r/cline/"> r/cline</VSCodeLink>
|
||||
</p>
|
||||
|
||||
<h3>Development</h3>
|
||||
<p>
|
||||
<VSCodeLink href="https://github.com/cline/cline">GitHub</VSCodeLink>
|
||||
{" • "}
|
||||
<VSCodeLink href="https://github.com/cline/cline/issues"> Issues</VSCodeLink>
|
||||
{" • "}
|
||||
<VSCodeLink href="https://github.com/cline/cline/discussions/categories/feature-requests?discussions_q=is%3Aopen+category%3A%22Feature+Requests%22+sort%3Atop">
|
||||
{" "}
|
||||
Feature Requests
|
||||
</VSCodeLink>
|
||||
</p>
|
||||
<p className="italic mt-[10px] mb-0 p-0">v{version}</p>
|
||||
|
||||
<h3>Resources</h3>
|
||||
<p>
|
||||
<VSCodeLink href="https://docs.cline.bot/getting-started/for-new-coders">Documentation</VSCodeLink>
|
||||
{" • "}
|
||||
<VSCodeLink href="https://cline.bot/">https://cline.bot</VSCodeLink>
|
||||
</p>
|
||||
</div>
|
||||
</Section>
|
||||
</div>
|
||||
|
||||
@@ -30,11 +30,17 @@ const GeneralSettingsSection = ({ renderSectionHeader }: GeneralSettingsSectionP
|
||||
<p className="text-xs mt-[5px] text-[var(--vscode-descriptionForeground)]">
|
||||
Help improve Cline by sending usage data and error reports. No code, prompts, or personal information are
|
||||
ever sent. See our{" "}
|
||||
<VSCodeLink className="text-inherit" href="https://docs.cline.bot/more-info/telemetry">
|
||||
<VSCodeLink
|
||||
className="text-inherit"
|
||||
href="https://docs.cline.bot/more-info/telemetry"
|
||||
style={{ fontSize: "inherit", textDecoration: "underline" }}>
|
||||
telemetry overview
|
||||
</VSCodeLink>{" "}
|
||||
and{" "}
|
||||
<VSCodeLink className="text-inherit" href="https://cline.bot/privacy">
|
||||
<VSCodeLink
|
||||
className="text-inherit"
|
||||
href="https://cline.bot/privacy"
|
||||
style={{ fontSize: "inherit", textDecoration: "underline" }}>
|
||||
privacy policy
|
||||
</VSCodeLink>{" "}
|
||||
for more details.
|
||||
|
||||
Reference in new issue
Block a user