Skip to content

Commit a77e4ea

Browse files
committed
chore(ext): improvement on icons
Use more suited icons and add icon to the preview tab
1 parent 372112d commit a77e4ea

File tree

8 files changed

+37
-7
lines changed

8 files changed

+37
-7
lines changed

packages/dbml-vs-code-extension/assets/icons/eye.svg

Lines changed: 0 additions & 5 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
26.2 KB
Loading

packages/dbml-vs-code-extension/extension/views/panel.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {
22
Disposable,
33
ExtensionContext,
44
TextDocument,
5+
Uri,
56
ViewColumn,
67
WebviewPanel,
78
window,
@@ -95,9 +96,25 @@ export class MainPanel {
9596
previewColumn,
9697
{
9798
enableScripts: true,
99+
retainContextWhenHidden: true,
98100
},
99101
);
100102

103+
panel.iconPath = {
104+
dark: Uri.joinPath(
105+
context.extensionUri,
106+
"assets",
107+
"icons",
108+
"preview-dark.svg",
109+
),
110+
light: Uri.joinPath(
111+
context.extensionUri,
112+
"assets",
113+
"icons",
114+
"preview.svg",
115+
),
116+
};
117+
101118
MainPanel.currentPanel = new MainPanel(
102119
panel,
103120
context,

packages/dbml-vs-code-extension/package.json

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
"displayName": "DBML Entity-Relationship Diagrams visualizer",
44
"description": "An Vscode extension to visualize the database schema in ERD ( Entity Relationship Diagram ) from dbml or prisma file in your vscode.",
55
"version": "0.0.1",
6+
"icon": "assets/logo.png",
67
"engines": {
78
"vscode": "^1.87.0"
89
},
@@ -17,8 +18,8 @@
1718
"command": "dbml-erd-visualizer.previewDiagrams",
1819
"title": "Show diagram",
1920
"icon": {
20-
"light": "./assets/icons/eye.svg",
21-
"dark": "./assets/icons/eye.svg"
21+
"light": "./assets/icons/open-preview.svg",
22+
"dark": "./assets/icons/open-preview-dark.svg"
2223
}
2324
}
2425
],
@@ -57,6 +58,7 @@
5758
"lint": "eslint src --ext ts",
5859
"test": "vscode-test",
5960
"build": "vite build && yarn run generate:css",
61+
"package":"yarn run build",
6062
"preview": "vite preview",
6163
"generate:css": "cd ../json-table-schema-visualizer && npx tailwindcss -i ./src/styles/index.css > ../dbml-vs-code-extension/dist/webview/assets/index.css --minify"
6264
},
@@ -85,5 +87,9 @@
8587
"react": "^18.2.0",
8688
"react-dom": "^18.2.0",
8789
"shared": "0.0.0"
90+
},
91+
"repository": {
92+
"type": "git",
93+
"url": "https://github.com/BOCOVO/db-schema-visualizer"
8894
}
8995
}

0 commit comments

Comments
 (0)