fix(settings): use theme-aware Project Structure icons

Цей коміт міститься в:
l0ng-ai committed 2026-12-04 22:59:23 +08:00
1 джерело b747e81cb6
коміт a33c46465b
5 files changed
+30 -6

No files matched your search

+11
Переглянути файл
@@ -853,6 +853,17 @@ describe("Settings dialog", () => {
const nav = within(psDialog).getByRole("navigation", { name: "Project Structure sections" });
expect(within(nav).getByText("Project Settings")).toBeInTheDocument();
expect(within(nav).getByText("Platform Settings")).toBeInTheDocument();
const navIcons = within(nav)
.getAllByRole("button")
.map((button) => button.querySelector("svg")!);
expect(navIcons).toHaveLength(7);
for (const icon of navIcons) {
expect(icon).toHaveAttribute("width", "14");
expect(icon).toHaveAttribute("height", "14");
expect(icon.innerHTML).toContain("currentColor");
expect(icon.innerHTML).not.toMatch(/#[0-9a-f]{3,8}\b/i);
}
expect(new Set(navIcons.map((icon) => icon.innerHTML)).size).toBe(navIcons.length);
expect(within(nav).getByRole("button", { name: "Project" })).toHaveAttribute("aria-current", "page");
await act(async () => {
fireEvent.click(within(nav).getByRole("button", { name: "Modules" }));
+6 -6
Переглянути файл
@@ -2144,7 +2144,7 @@ const NAV_GROUPS: Array<{
{
id: "project",
label: "Project",
icon: "folder",
icon: "toolwindow-project",
searchLabels: [
"Project name",
"Project SDK",
@@ -2158,7 +2158,7 @@ const NAV_GROUPS: Array<{
{
id: "modules",
label: "Modules",
icon: "module",
icon: "module-outline",
searchLabels: [
...MODULE_SEARCH_LABELS.sources,
...MODULE_SEARCH_LABELS.paths,
@@ -2168,19 +2168,19 @@ const NAV_GROUPS: Array<{
{
id: "dependencies",
label: "Dependencies",
icon: "build-dependencies",
icon: "hierarchy",
searchLabels: ["Project Dependencies", "Add Project…"],
},
{
id: "libraries",
label: "Libraries",
icon: "folder-library",
icon: "library-outline",
searchLabels: ["Library Details", "Resolved Build & SDK Libraries", "Classes", "Sources", "Scope", "JAR"],
},
{
id: "facets",
label: "Facets",
icon: "file-config",
icon: "layers",
searchLabels: [
"Framework Facets",
"Framework",
@@ -2194,7 +2194,7 @@ const NAV_GROUPS: Array<{
{
id: "artifacts",
label: "Artifacts",
icon: "file-archive",
icon: "artifact",
searchLabels: [
"Packaging Artifacts",
"JAR",
+2
Переглянути файл
@@ -359,6 +359,8 @@ const ICONS = {
quote: "openidea/general/quote",
settings: "general/settings",
"project-structure": "openidea/general/projectStructure",
"module-outline": "openidea/general/moduleOutline",
"library-outline": "openidea/general/libraryOutline",
help: "openidea/general/help",
"page-first": "openidea/general/pageFirst",
"page-last": "openidea/general/pageLast",
+5
Переглянути файл
@@ -0,0 +1,5 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="1.5" y="3.5" width="3" height="11" rx="0.75" stroke="#6C707E"/>
<rect x="6" y="1.5" width="3" height="13" rx="0.75" stroke="#6C707E"/>
<path d="M10.5 3.5l2.5-.6 2.5 10.7-2.5.6-2.5-10.7Z" stroke="#6C707E" stroke-linejoin="round"/>
</svg>

Після

Ширина:  |  Висота:  |  Розмір: 348 B

+6
Переглянути файл
@@ -0,0 +1,6 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<rect x="1.5" y="1.5" width="5.5" height="5.5" rx="1" stroke="#6C707E"/>
<rect x="9" y="1.5" width="5.5" height="5.5" rx="1" stroke="#6C707E"/>
<rect x="1.5" y="9" width="5.5" height="5.5" rx="1" stroke="#6C707E"/>
<rect x="9" y="9" width="5.5" height="5.5" rx="1" stroke="#6C707E"/>
</svg>

Після

Ширина:  |  Висота:  |  Розмір: 395 B