Skip to content

Commit

Permalink
Merge branch 'dev' into KXI-38329
Browse files Browse the repository at this point in the history
  • Loading branch information
Philip-Carneiro committed Oct 16, 2024
2 parents f1fe869 + 62bf740 commit 7326eec
Show file tree
Hide file tree
Showing 8 changed files with 1,292 additions and 624 deletions.
120 changes: 120 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -964,6 +964,7 @@
"bracketSameLine": true
},
"devDependencies": {
"@shoelace-style/shoelace": "^2.17.1",
"@types/extract-zip": "^2.0.1",
"@types/fs-extra": "^11.0.4",
"@types/glob": "^8.1.0",
Expand Down
19 changes: 12 additions & 7 deletions src/services/dataSourceEditorProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/

import {
ColorThemeKind,
CustomTextEditorProvider,
Disposable,
ExtensionContext,
Expand Down Expand Up @@ -223,23 +224,27 @@ export class DataSourceEditorProvider implements CustomTextEditorProvider {
}

private getWebviewContent(webview: Webview) {
const webviewUri = getUri(webview, this.context.extensionUri, [
"out",
"webview.js",
]);
const nonce = getNonce();
const getResource = (resource: string) =>
getUri(webview, this.context.extensionUri, ["out", resource]);

return /* html */ `
<!DOCTYPE html>
<html lang="en">
<html lang="en" class="${
window.activeColorTheme.kind === ColorThemeKind.Light ||
window.activeColorTheme.kind === ColorThemeKind.HighContrastLight
? "sl-theme-light"
: "sl-theme-dark"
}">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="${getResource("light.css")}" />
<link rel="stylesheet" href="${getResource("style.css")}" />
<script type="module" nonce="${getNonce()}" src="${getResource("webview.js")}"></script>
<title>DataSource</title>
</head>
<body>
<kdb-data-source-view></kdb-data-source-view>
<script type="module" nonce="${nonce}" src="${webviewUri}"></script>
</body>
</html>
`;
Expand Down
Loading

0 comments on commit 7326eec

Please sign in to comment.