From 6cd05b7f9fc94162572fa9b388b15cab027be0f3 Mon Sep 17 00:00:00 2001 From: Sheng Chen Date: Tue, 14 May 2024 13:17:59 +0800 Subject: [PATCH 1/2] Add format section into the project setting page. - Click the formatter from nav side will open a new window for formatter page. - Move the project select to the top level of the page. - Move the apply button to the top level of the page. --- .../features/ClasspathConfigurationView.tsx | 52 ++++++++----------- .../classpath/features/components/Hint.tsx | 51 ++++++++++++++++++ .../features/components/JdkRuntime.tsx | 4 +- .../components/UnmanagedFolderSources.tsx | 2 +- .../assets/classpath/style.scss | 13 ++--- .../assets/classpath/utils.ts | 4 ++ .../mainpage/features/ProjectSettingView.tsx | 30 +++++------ .../features/component}/Footer.tsx | 36 ++----------- .../features/component}/ProjectSelector.tsx | 8 +++ .../mainpage/features/component/SideBar.tsx | 43 +++++++++++++++ .../assets/mainpage/style.scss | 17 +++++- src/project-settings/assets/vscode/utils.ts | 16 +++--- .../classpath/ClasspathPanelHandler.ts | 11 ---- src/project-settings/projectSettingsView.ts | 19 ++++++- 14 files changed, 194 insertions(+), 112 deletions(-) create mode 100644 src/project-settings/assets/classpath/features/components/Hint.tsx rename src/project-settings/assets/{classpath/features/components => mainpage/features/component}/Footer.tsx (59%) rename src/project-settings/assets/{classpath/features/components => mainpage/features/component}/ProjectSelector.tsx (94%) create mode 100644 src/project-settings/assets/mainpage/features/component/SideBar.tsx diff --git a/src/project-settings/assets/classpath/features/ClasspathConfigurationView.tsx b/src/project-settings/assets/classpath/features/ClasspathConfigurationView.tsx index be9d475d..889a940f 100644 --- a/src/project-settings/assets/classpath/features/ClasspathConfigurationView.tsx +++ b/src/project-settings/assets/classpath/features/ClasspathConfigurationView.tsx @@ -5,7 +5,6 @@ import React, { useEffect } from "react"; import { useSelector, useDispatch } from "react-redux"; import { Dispatch } from "@reduxjs/toolkit"; import Output from "./components/Output"; -import ProjectSelector from "./components/ProjectSelector"; import Sources from "./components/Sources"; import Libraries from "./components/Libraries"; import Exception from "./components/Exception"; @@ -16,7 +15,7 @@ import { ClasspathRequest } from "../../vscode/utils"; import { VSCodePanelTab, VSCodePanelView, VSCodePanels, VSCodeProgressRing } from "@vscode/webview-ui-toolkit/react"; import { ProjectType } from "../../../../utils/webview"; import UnmanagedFolderSources from "./components/UnmanagedFolderSources"; -import Footer from "./components/Footer"; +import Hint from "./components/Hint"; import "../style.scss"; import { listProjects, setProjectType } from "../../mainpage/features/commonSlice"; @@ -39,35 +38,32 @@ const ClasspathConfigurationView = (): JSX.Element => { content = ; } else { content = ( -
-
- - - onClickTab("source")}>Sources - onClickTab("jdk")}>JDK Runtime - onClickTab("libraries")}>Libraries - - {[ProjectType.Gradle, ProjectType.Maven].includes(projectType) && ()} - {projectType !== ProjectType.Gradle && projectType !== ProjectType.Maven && ()} - {projectType === ProjectType.UnmanagedFolder && ()} - - - - - - - - -
-