Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add shared resources directory with html for scan summary panel #761

Merged
merged 3 commits into from
Feb 6, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
55 changes: 55 additions & 0 deletions shared_ide_resources/ui/html/ScanSummaryInit.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!DOCTYPE html>
<html>
<head>
<meta http-equiv='Content-Type' content='text/html; charset=unicode' />
<meta http-equiv='X-UA-Compatible' content='IE=edge' />
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="Content-Security-Policy"
content="style-src 'self' 'nonce-${nonce}' 'nonce-ideNonce' https://fonts.googleapis.com;
script-src 'nonce-${nonce}' https://fonts.googleapis.com;
font-src 'self' https://fonts.gstatic.com;" />
<style nonce=${nonce}>
@import url('https://fonts.googleapis.com/css2?family=Inter&display=swap');

:root {
font-size: var(--main-font-size);
--default-font: "SF Pro Text", "Segoe UI", "Ubuntu", Geneva, Verdana, Tahoma, sans-serif;
--ide-background-color: var(--vscode-sideBar-background);
--text-color: var(--vscode-foreground);
--input-border: var(--vscode-input-border);
}
p { font-size:1.3rem; margin: .8rem 0; }
hr { margin: 2rem 0; }
body { background-color:var(--ide-background-color); color: var(--text-color); font-family: var(--default-font); }
.snx-loader { display:inline-block; width: 12px; height: 12px; border: 2px solid rgba(125,125,125,.65); border-bottom-color: transparent; border-radius: 50%; margin-right:.8rem; animation: spin 1s linear infinite;
}
.size-s { width: 12px; height: 12px; border-width:2px }

@keyframes spin {
from { transform: rotate(0deg); }
to { transform: rotate(360deg); }
}

.snx-h1 { font-size: 2rem; font-weight: 600; margin: .8rem 0; }

.snx-status { display:flex; align-items:center; padding: .4rem 1.2rem; background-color: rgba(255,255,255,.1); border-radius: 1rem; }

.snx-header { display: flex; gap:1.6rem; }
.snx-message { display: flex; align-items: center }
</style>
${ideStyle}
</head>
<body>

<div class="snx-header">
<h1 class="snx-title snx-h1">Snyk Security is loading...</h1>
</div>
<div class="snx-summary">
<div class="snx-status">
<span class="snx-loader size-s"></span>
<p class="snx-message">Waiting for the Snyk CLI to be downloaded and the Language Server to be initialized. </p>
</div>
</div>
</body>
</html>