Skip to content

Commit cf8072f

Browse files
committed
Enhance release notes page
1 parent d545d19 commit cf8072f

File tree

1 file changed

+49
-23
lines changed

1 file changed

+49
-23
lines changed

src/release-notes.js

Lines changed: 49 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export default class PIOReleaseNotes {
4949
this._currentPanel = await this.newPanel();
5050
}
5151

52-
async newPanel(startUrl) {
52+
async newPanel() {
5353
const panel = vscode.window.createWebviewPanel(
5454
'pioReleaseNotes',
5555
'PlatformIO IDE: Release Notes',
@@ -59,16 +59,34 @@ export default class PIOReleaseNotes {
5959
retainContextWhenHidden: true,
6060
}
6161
);
62+
panel.iconPath = vscode.Uri.file(
63+
path.join(
64+
extension.context.extensionPath,
65+
'assets',
66+
'images',
67+
'platformio-mini-logo.svg'
68+
)
69+
);
6270
panel.onDidDispose(
6371
() => (this._currentPanel = undefined),
6472
undefined,
6573
this.subscriptions
6674
);
67-
panel.webview.html = await this.getWebviewContent(startUrl);
75+
const logoSrc = panel.webview.asWebviewUri(
76+
vscode.Uri.file(
77+
path.join(
78+
extension.context.extensionPath,
79+
'assets',
80+
'images',
81+
'platformio-logo.png'
82+
)
83+
)
84+
);
85+
panel.webview.html = await this.getWebviewContent(logoSrc);
6886
return panel;
6987
}
7088

71-
async getWebviewContent() {
89+
async getWebviewContent(logoSrc) {
7290
const releaseNotes = await this.readReleaseNotes();
7391
return `
7492
<!DOCTYPE html>
@@ -77,28 +95,36 @@ export default class PIOReleaseNotes {
7795
<meta charset="UTF-8">
7896
<meta name="viewport" content="width=device-width, initial-scale=1.0">
7997
<title>PlatformIO IDE: Release Notes</title>
98+
<style>ul { padding-top: 5px; } li { padding-bottom: 4px; }</style>
8099
</head>
81100
<body>
82-
<div id="content">Loading...</div>
83-
<textarea id="pioRNMarkdown" hidden="hidden">
84-
# PlatformIO IDE Release Notes
85-
86-
Welcome to the ${this.version} release of PlatformIO IDE.
87-
There are many updates in this version that we hope you'll like.
88-
89-
**PlatformIO Core**: If you would like to read the PlatformIO Core release notes, go to the [Release Notes](https://docs.platformio.org/en/latest/core/history.html) on [docs.platformio.org](https://docs.platformio.org/).
90-
91-
${releaseNotes}
92-
93-
## Stay in touch with us
94-
95-
Please follow us on [LinkedIn](https://www.linkedin.com/company/platformio) and Twitter [@PlatformIO_Org](https://twitter.com/PlatformIO_Org) to keep up to date with the latest news, articles and tips!
96-
97-
-----
98-
99-
**Release History**: Want to read release notes for the previous versions? Please visit [PlatformIO IDE Changelog](https://github.com/platformio/platformio-vscode-ide/blob/develop/CHANGELOG.md) for more detailed information.
100-
101-
</textarea>
101+
<table border="0">
102+
<tr>
103+
<td><img src="${logoSrc}" width="28px" height="28px"></td>
104+
<td style="padding-left: 10px"><h1>PlatformIO IDE Release Notes</h1></td>
105+
</tr>
106+
</table>
107+
<div>
108+
Welcome to the ${this.version} release of PlatformIO IDE.
109+
There are many updates in this version that we hope you'll like.
110+
</div>
111+
<p>
112+
<b>Release History</b>: Want to read release notes for the previous versions?
113+
Please visit <a href="https://github.com/platformio/platformio-vscode-ide/blob/develop/CHANGELOG.md">PlatformIO IDE Changelog</a>
114+
for more detailed information.
115+
</p>
116+
<p id="content">Loading...</p>
117+
<h2>Stay in touch with us</h2>
118+
<p>
119+
Please follow us on <a href="https://www.linkedin.com/company/platformio">LinkedIn</a> and Twitter <a href="https://twitter.com/PlatformIO_Org">@PlatformIO_Org]</a>
120+
to keep up to date with the latest news, articles and tips!
121+
</p>
122+
<hr />
123+
<p>
124+
<b>PlatformIO Core</b>: If you would like to read the PlatformIO Core release notes,
125+
go to the <a href="https://docs.platformio.org/en/latest/core/history.html">Release Notes</a> on <a href="https://docs.platformio.org/">docs.platformio.org</a>).
126+
</p>
127+
<textarea id="pioRNMarkdown" hidden="hidden">${releaseNotes}</textarea>
102128
<script src="https://cdn.jsdelivr.net/npm/marked/marked.min.js"></script>
103129
<script>
104130
document.getElementById('content').innerHTML =

0 commit comments

Comments
 (0)