Skip to content
Open
Show file tree
Hide file tree
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
5 changes: 5 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/).

---

## [Unreleased]

### Added
- Announcement banner at the top of LaunchMap visualizer with localStorage persistence

## [0.2.0] - 2025-08-23

### Added
Expand Down
4 changes: 4 additions & 0 deletions src/panel/getWebviewHtml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ export function getWebviewHtml(
<link href="${styleUri}" rel="stylesheet">
</head>
<body>
<div id="announcement-banner" class="announcement-banner">
<span class="announcement-text">💬 Join our Discord</span>
<button id="dismiss-banner" class="dismiss-btn" aria-label="Dismiss announcement">❌</button>
</div>
<button id="export-btn">💾 Export JSON</button>
<div id="editor"></div>
<div id="watermark">
Expand Down
16 changes: 16 additions & 0 deletions webview/script.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,19 @@ const vscode = acquireVsCodeApi();
document.getElementById('export-btn')?.addEventListener('click', () => {
vscode.postMessage({ type: 'export-json' });
});

// Announcement Banner Logic
const announcementBanner = document.getElementById('announcement-banner');
const dismissButton = document.getElementById('dismiss-banner');

// Check if banner was previously dismissed
const bannerDismissed = localStorage.getItem('announcementBannerDismissed');
if (bannerDismissed === 'true') {
announcementBanner?.classList.add('hidden');
}

// Handle dismiss button click
dismissButton?.addEventListener('click', () => {
announcementBanner?.classList.add('hidden');
localStorage.setItem('announcementBannerDismissed', 'true');
});
75 changes: 41 additions & 34 deletions webview/styles/base.css
Original file line number Diff line number Diff line change
@@ -1,45 +1,52 @@
#editor {
width: 100%;
height: 100vh;
background-color: #1e1e1e;
color: white;
position: relative;
overflow: scroll;
font-family: monospace;
margin-top: 40px;
}

#export-btn {
/* Announcement Banner */
.announcement-banner {
position: fixed;
top: 12px;
right: 12px;
z-index: 1000;
background: linear-gradient(145deg, #0e61a9, #0a3f6b);
color: #ffffff;
border: 2px solid #1c90f3;
border-radius: 8px;
top: 0;
left: 0;
right: 0;
z-index: 1001;
background: linear-gradient(145deg, #f0f4f8, #e1e8ed);
color: #2c3e50;
padding: 12px 20px;
display: flex;
align-items: center;
justify-content: center;
border-bottom: 1px solid #b0c4d4;
border-radius: 0 0 8px 8px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
font-size: 14px;
font-weight: bold;
padding: 8px 14px;
box-shadow: 0 0 8px rgba(28, 144, 243, 0.4);
transition: all 0.2s ease;
cursor: pointer;
font-weight: 500;
transition: opacity 0.3s ease, transform 0.3s ease;
}

#export-btn:hover {
background: linear-gradient(145deg, #1287e2, #0b5185);
box-shadow: 0 0 12px rgba(28, 144, 243, 0.6);
transform: translateY(-1px);
.announcement-banner.hidden {
display: none;
}

#export-btn:active {
transform: translateY(0);
box-shadow: 0 0 6px rgba(28, 144, 243, 0.3);
.announcement-text {
flex: 1;
text-align: center;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#zoom-layer {
transform-origin: 0 0;
will-change: transform;
.dismiss-btn {
background: transparent;
border: none;
color: #95a5a6;
font-size: 16px;
cursor: pointer;
padding: 4px 8px;
transition: color 0.2s ease, transform 0.2s ease;
margin-left: 12px;
}

.dismiss-btn:hover {
color: #e74c3c;
transform: scale(1.1);
}

.dismiss-btn:active {
transform: scale(0.95);
}

#editor {
Expand Down