Archived
1
0

Merge pull request #2801 from cdr/disappearing-dismiss

This commit is contained in:
Asher 2021-03-02 10:14:19 -06:00 committed by GitHub
commit 3e081ea66c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -466,11 +466,14 @@ export class ExtensionsViewPaneContainer extends ViewPaneContainer implements IE
helperHeader.style.fontWeight = '600'; helperHeader.style.fontWeight = '600';
helperHeader.style.padding = 'padding: 5px 16px'; helperHeader.style.padding = 'padding: 5px 16px';
helperHeader.style.position = 'relative'; helperHeader.style.position = 'relative';
const helperText = append(helperHeader, $('div'));
// We call this function because it gives us access to the current theme // We call this function because it gives us access to the current theme
// Then we can apply the link color to the links in the helper header // Then we can apply the link color to the links in the helper header
registerThemingParticipant((theme) => { registerThemingParticipant((theme) => {
const linkColor = theme.getColor(textLinkForeground); const linkColor = theme.getColor(textLinkForeground);
helperHeader.innerHTML = ` helperText.innerHTML = `
<div style="margin-bottom: 8px;"> <div style="margin-bottom: 8px;">
<p style="margin-bottom: 0; display: flex; align-items: center"><span class="codicon codicon-warning" style="margin-right: 2px; color: #C4A103"></span>WARNING</p> <p style="margin-bottom: 0; display: flex; align-items: center"><span class="codicon codicon-warning" style="margin-right: 2px; color: #C4A103"></span>WARNING</p>
<p style="margin-top: 0; margin-bottom: 4px"> <p style="margin-top: 0; margin-bottom: 4px">
@ -481,11 +484,13 @@ export class ExtensionsViewPaneContainer extends ViewPaneContainer implements IE
</div> </div>
`; `;
}); });
const dismiss = append(helperHeader, $('span')); const dismiss = append(helperHeader, $('span'));
dismiss.innerHTML = 'Dismiss'; dismiss.innerHTML = 'Dismiss';
dismiss.style.display = 'block'; dismiss.style.display = 'block';
dismiss.style.textAlign = 'right'; dismiss.style.textAlign = 'right';
dismiss.style.cursor = 'pointer'; dismiss.style.cursor = 'pointer';
dismiss.tabIndex = 0;
dismiss.onclick = () => { dismiss.onclick = () => {
helperHeader.remove(); helperHeader.remove();
localStorage.setItem(extensionHelperLocalStorageKey, 'viewed'); localStorage.setItem(extensionHelperLocalStorageKey, 'viewed');