mirror of
https://github.com/withastro/astro.git
synced 2025-01-20 22:12:38 -05:00
Small polish to the overlay (#9214)
This commit is contained in:
parent
c0383ea0c1
commit
4fe523b006
2 changed files with 14 additions and 5 deletions
5
.changeset/tricky-dragons-explain.md
Normal file
5
.changeset/tricky-dragons-explain.md
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
'astro': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
Fixes a number of small user experience bugs with the dev overlay
|
|
@ -324,13 +324,13 @@ export default {
|
||||||
(window as DevOverlayMetadata).__astro_dev_overlay__.version
|
(window as DevOverlayMetadata).__astro_dev_overlay__.version
|
||||||
}</astro-dev-overlay-badge>
|
}</astro-dev-overlay-badge>
|
||||||
</section>
|
</section>
|
||||||
<astro-dev-overlay-button id="copy-debug-button">Get debug info <astro-dev-overlay-icon icon="copy" /></astro-dev-overlay-button>
|
<astro-dev-overlay-button id="copy-debug-button">Copy debug info <astro-dev-overlay-icon icon="copy" /></astro-dev-overlay-button>
|
||||||
</header>
|
</header>
|
||||||
<hr />
|
<hr />
|
||||||
|
|
||||||
<div id="main-container">
|
<div id="main-container">
|
||||||
<div>
|
<div>
|
||||||
<header><h2>Top integrations</h2><a href="https://astro.build/integrations/">View all</a></header>
|
<header><h2>Top integrations</h2><a href="https://astro.build/integrations/" target="_blank">View all</a></header>
|
||||||
<div id="integration-list-wrapper">
|
<div id="integration-list-wrapper">
|
||||||
<section id="integration-list">
|
<section id="integration-list">
|
||||||
<div class="integration-skeleton" style="--i:0;"></div>
|
<div class="integration-skeleton" style="--i:0;"></div>
|
||||||
|
@ -345,7 +345,7 @@ export default {
|
||||||
${links
|
${links
|
||||||
.map(
|
.map(
|
||||||
(link) =>
|
(link) =>
|
||||||
`<a href="${link.link}"><astro-dev-overlay-icon ${
|
`<a href="${link.link}" target="_blank"><astro-dev-overlay-icon ${
|
||||||
isDefinedIcon(link.icon) ? `icon="${link.icon}">` : `>${link.icon}`
|
isDefinedIcon(link.icon) ? `icon="${link.icon}">` : `>${link.icon}`
|
||||||
}</astro-dev-overlay-icon>${link.name}</a>`
|
}</astro-dev-overlay-icon>${link.name}</a>`
|
||||||
)
|
)
|
||||||
|
@ -362,7 +362,11 @@ export default {
|
||||||
navigator.clipboard.writeText(
|
navigator.clipboard.writeText(
|
||||||
'```\n' + (window as DevOverlayMetadata).__astro_dev_overlay__.debugInfo + '\n```'
|
'```\n' + (window as DevOverlayMetadata).__astro_dev_overlay__.debugInfo + '\n```'
|
||||||
);
|
);
|
||||||
copyDebugButton.textContent = 'Copied to clipboard';
|
copyDebugButton.textContent = 'Copied to clipboard!';
|
||||||
|
|
||||||
|
setTimeout(() => {
|
||||||
|
resetDebugButton();
|
||||||
|
}, 3500);
|
||||||
});
|
});
|
||||||
|
|
||||||
canvas.append(windowComponent);
|
canvas.append(windowComponent);
|
||||||
|
@ -372,7 +376,7 @@ export default {
|
||||||
const copyDebugButton = canvas.querySelector<HTMLButtonElement>('#copy-debug-button');
|
const copyDebugButton = canvas.querySelector<HTMLButtonElement>('#copy-debug-button');
|
||||||
if (!copyDebugButton) return;
|
if (!copyDebugButton) return;
|
||||||
|
|
||||||
copyDebugButton.innerHTML = 'Get debug info <astro-dev-overlay-icon icon="copy" />';
|
copyDebugButton.innerHTML = 'Copy debug info <astro-dev-overlay-icon icon="copy" />';
|
||||||
}
|
}
|
||||||
|
|
||||||
function refreshIntegrationList() {
|
function refreshIntegrationList() {
|
||||||
|
|
Loading…
Add table
Reference in a new issue