Skip to content

Commit

Permalink
fix: remove content html cause svg load failed
Browse files Browse the repository at this point in the history
  • Loading branch information
oeyoews committed Oct 24, 2024
1 parent 6a0d1c4 commit 02ce421
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"publisher": "oeyoews",
"name": "usewiki2",
"displayName": "usewiki2",
"version": "0.9.0",
"version": "0.9.1",
"private": true,
"packageManager": "[email protected]",
"description": "",
Expand Down
6 changes: 2 additions & 4 deletions packages/react/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ function App() {
<div className="relative h-screen p-3">
<h1 className="text-3xl font-bold">TiddlyWiki5</h1>
<ContextMenu>
<ContextMenuTrigger className="i-lucide-more-horizontal">
More
</ContextMenuTrigger>
<ContextMenuTrigger className="i-lucide-more-horizontal hidden"></ContextMenuTrigger>
<ContextMenuContent>
<ContextMenuItem>Coming</ContextMenuItem>
</ContextMenuContent>
Expand All @@ -64,7 +62,7 @@ function App() {
<Button
onClick={submitInput}
className="bg-green-500 hover:bg-green-600">
<span className="i-lucide-more-horizontal"></span>
<span className="i-lucide-send"></span>
Save To TiddlyWiki
</Button>
</div>
Expand Down
3 changes: 2 additions & 1 deletion src/webviews/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,13 @@ export class usewikiViewProvider implements vscode.WebviewViewProvider {
);
// const { tiddlywiki_version, username } = this._twdata;
const nonce = getNonce();
// content="default-src 'none';
return `
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; style-src ${webview.cspSource}; script-src 'nonce-${nonce}';">
<meta http-equiv="Content-Security-Policy" style-src ${webview.cspSource}; script-src 'nonce-${nonce}';">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Custom Sidebar</title>
<link href="${styleResetUri}" rel="stylesheet">
Expand Down

0 comments on commit 02ce421

Please sign in to comment.