Skip to content

Commit

Permalink
wording update
Browse files Browse the repository at this point in the history
  • Loading branch information
martrapp committed Sep 8, 2024
1 parent 82de459 commit 20671d6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/wise-bulldogs-hear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro-vtbot': patch
---

Updates the wording of the devToolbar integration.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ Animation Style ✨| ~0.1k
AutoNameSelected 📛 | ~0.3k
BorderControl 🛂 | ~0.1k
BrakePad 🦥 | ~0.2k
ElementCrossing 🚸 | ~1.2K
InspectionChamber 🔬 | ~27k
Linter 🧹 | ~1.9k
LoadingIndicator ⏳ | ~0.4k
Move 🚟 | ~0.2k
Expand Down
12 changes: 6 additions & 6 deletions devToolbar/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default defineToolbarApp({
mask-image: radial-gradient(ellipse at center, white 35%, transparent 71%);"
src=${imgSrc.src} alt="Reopen the Inspection Chamber" />
<p>Put your view transitions through their paces!</p><hr>
<p><span id="inspection-chamber-status">If you see this text, bad things happened. If you got here in a web-container, like e.g. Stackblitz, try to open the preview of your project in a new tab. If this does not help, <a href="https://github.com/martrapp/astro-vtbot/issues/new/choose">please file a bug report</a> with the related errors from the browser's console.</span></p><p>You notice a little sign near the power button of The Chamber:
<p><span id="inspection-chamber-status">If you see this text, bad things happened. If you got here in a web-container, like e.g. Stackblitz, try to open the preview of your project in a new tab. If this does not help, <a href="https://github.com/martrapp/astro-vtbot/issues/new/choose">please file a bug report</a> with the related errors from the browser's console.</span></p><p>You notice a little sign near the Inspection Chamber's power button:
<astro-dev-toolbar-button id="inspection-chamber-button">Out of Order</astro-dev-toolbar-button></p>
<style>
a {
Expand Down Expand Up @@ -75,35 +75,35 @@ export default defineToolbarApp({
const button = me.querySelector<HTMLButtonElement>('#inspection-chamber-button')!;

if (!document.startViewTransition) {
status.textContent = 'Your browser does not support view transitions. You notice a little sign near the power button of The Chamber:';
status.textContent = 'Your browser does not support view transitions.';
button.textContent = 'Out of Order';
button.disabled = true;
} else if (top!.document.querySelector(VTBAG_REOPEN)) {
status.textContent = 'The Chamber is currently in standby mode.';
button.textContent = 'Reactivate the Inspection Chamber';
button.textContent = 'Reactivate';
button.addEventListener('click', () => {
top!.sessionStorage.removeItem('vtbag-ui-standby');
top!.location.reload();
});
} else if (top!.document.querySelector('body > #vtbag-main-frame')
&& top!.sessionStorage.getItem(DTB_TOKEN) !== 'true') {
status.innerHTML = 'This page has an <code>&lt;InspectionChamber /></code> component.';
button.textContent = 'Switch Inspection Chamber to standby mode';
button.textContent = 'Switch to standby mode';
button.addEventListener('click', () => {
top!.sessionStorage.setItem('vtbag-ui-standby', 'true');
top!.location.reload();
});
} else if (top!.sessionStorage.getItem(DTB_TOKEN) === 'true') {
status.textContent = 'Chamber was activated via Dev Toolbar.';
button.textContent = 'Turn off the Inspection Chamber';
button.textContent = 'Turn off';

button.addEventListener('click', () => {
top!.sessionStorage.removeItem(DTB_TOKEN);
top!.location.reload();
});
} else {
status.textContent = 'There is an Inspection Chamber here.';
button.textContent = 'Go ahead and power up the Inspection Chamber';
button.textContent = 'Power up';
button.addEventListener('click', () => {
top!.sessionStorage.removeItem('vtbag-ui-closed');
top!.sessionStorage.setItem(DTB_TOKEN, 'true');
Expand Down

0 comments on commit 20671d6

Please sign in to comment.