-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix removal of loading indicators (#152)
- Loading branch information
Showing
6 changed files
with
68 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'astro-vtbot': patch | ||
--- | ||
|
||
Fixes an issue where the loading indicator was not removed when the browser decided to download the target of a link. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
--- | ||
import Layout from '../../layouts/Layout.astro'; | ||
import LoadingIndicator from 'astro-vtbot/components/LoadingIndicator.astro'; | ||
import BrakePad from 'astro-vtbot/components/BrakePad.astro'; | ||
--- | ||
|
||
<Layout title="Load1"> | ||
<LoadingIndicator slot="head" /> | ||
<BrakePad duration={500} slot="head" /> | ||
<h1>Loading One</h1> | ||
<a href="/loading/two/" id="click">Click</a> | ||
<a href="/x.zip" id="download">Download</a> | ||
</Layout> | ||
<script> | ||
const obs = new MutationObserver((records) => { | ||
records.forEach( | ||
(record) => | ||
record.attributeName === 'class' && | ||
console.log('test:' + document.documentElement.getAttribute('class')) | ||
); | ||
}); | ||
obs.observe(document.documentElement, { attributes: true }); | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
import Layout from '../../layouts/Layout.astro'; | ||
import LoadingIndicator from 'astro-vtbot/components/LoadingIndicator.astro'; | ||
--- | ||
|
||
<Layout title="Load2"> | ||
<LoadingIndicator slot="head" /> | ||
<h1>Loading Two</h1> | ||
<a href="/loading/one/" id="click">Click</a> | ||
</Layout> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters