From a0252e70d9e2eda86bc14a79274e817fca0f00f7 Mon Sep 17 00:00:00 2001 From: yusheng chen Date: Tue, 15 Apr 2025 02:35:05 +0800 Subject: [PATCH] convert inline style to tailwind css of file `SettingsView.tsx` (#2684) * convert inline style to tailwind css of file `SettingsView.tsx` * style: fix `SettingsView.tsx` styling https://github.com/cline/cline/pull/2684#issuecomment-2784520485 --- .changeset/rich-boats-film.md | 5 + webview-ui/src/App.tsx | 3 +- .../src/components/settings/SettingsView.tsx | 143 ++++-------------- 3 files changed, 35 insertions(+), 116 deletions(-) create mode 100644 .changeset/rich-boats-film.md diff --git a/.changeset/rich-boats-film.md b/.changeset/rich-boats-film.md new file mode 100644 index 00000000..17fe69bf --- /dev/null +++ b/.changeset/rich-boats-film.md @@ -0,0 +1,5 @@ +--- +"claude-dev": patch +--- + +convert inline style to tailwind css of file `SettingsView.tsx` diff --git a/webview-ui/src/App.tsx b/webview-ui/src/App.tsx index 718b45e8..31fc4217 100644 --- a/webview-ui/src/App.tsx +++ b/webview-ui/src/App.tsx @@ -15,6 +15,7 @@ import { McpViewTab } from "@shared/mcp" const AppContent = () => { const { didHydrateState, showWelcome, shouldShowAnnouncement, telemetrySetting, vscMachineId } = useExtensionState() const [showSettings, setShowSettings] = useState(false) + const hideSettings = useCallback(() => setShowSettings(false), []) const [showHistory, setShowHistory] = useState(false) const [showMcp, setShowMcp] = useState(false) const [showAccount, setShowAccount] = useState(false) @@ -92,7 +93,7 @@ const AppContent = () => { ) : ( <> - {showSettings && setShowSettings(false)} />} + {showSettings && } {showHistory && setShowHistory(false)} />} {showMcp && setShowMcp(false)} />} {showAccount && setShowAccount(false)} />} diff --git a/webview-ui/src/components/settings/SettingsView.tsx b/webview-ui/src/components/settings/SettingsView.tsx index 1f8d43b2..5e141f5e 100644 --- a/webview-ui/src/components/settings/SettingsView.tsx +++ b/webview-ui/src/components/settings/SettingsView.tsx @@ -145,55 +145,16 @@ const SettingsView = ({ onDone }: SettingsViewProps) => { } return ( -
-
-

Settings

+
+
+

Settings

handleSubmit(false)}>Done
-
+
{/* Tabs container */} {planActSeparateModelsSetting ? ( -
-
+
+
handleTabChange("plan")}> Plan Mode @@ -203,7 +164,7 @@ const SettingsView = ({ onDone }: SettingsViewProps) => {
{/* Content container */} -
+
{ /> )} -
+
setCustomInstructions(e.target?.value ?? "")}> - Custom Instructions + Custom Instructions -

+

These instructions are added to the end of the system prompt sent with every request.

-
+
{ const checked = e.target.checked === true @@ -251,20 +207,15 @@ const SettingsView = ({ onDone }: SettingsViewProps) => { }}> Use different models for Plan and Act modes -

+

Switching between Plan and Act mode will persist the API and model used in the previous mode. This may be helpful e.g. when using a strong reasoning model to architect a plan for a cheaper coding model to act on.

-
+
{ const checked = e.target.checked === true @@ -272,19 +223,14 @@ const SettingsView = ({ onDone }: SettingsViewProps) => { }}> Allow anonymous error and usage reporting -

+

Help improve Cline by sending anonymous usage data and error reports. No code, prompts, or personal information are ever sent. See our{" "} - + telemetry overview {" "} and{" "} - + privacy policy {" "} for more details. @@ -294,18 +240,10 @@ const SettingsView = ({ onDone }: SettingsViewProps) => { {/* Browser Settings Section */} -

+
vscode.postMessage({ type: "openExtensionSettings" })} - style={{ - margin: "0 0 16px 0", - }}> + className="mt-0 mr-0 mb-4 ml-0"> Advanced Settings @@ -313,49 +251,24 @@ const SettingsView = ({ onDone }: SettingsViewProps) => { {IS_DEV && ( <> -
Debug
- +
Debug
+ Reset State -

+

This will reset all global state and secret storage in the extension.

)} -
-

+

+

If you have any questions or feedback, feel free to open an issue at{" "} - + https://github.com/cline/cline

-

- v{version} -

+

v{version}