Add loading state to filter bar

This commit is contained in:
Lim Chee Aun 2023-10-19 10:13:53 +08:00
parent 7145c20136
commit 106cd16e41
3 changed files with 15 additions and 2 deletions

View file

@ -2116,6 +2116,13 @@ ul.link-list li a .icon {
transparent
);
align-items: center;
transition: opacity 0.3s ease-out;
&.loading,
.loading > & {
pointer-events: none;
opacity: 0.5;
}
}
.filter-bar.centered {
justify-content: center;

View file

@ -334,7 +334,13 @@ function Timeline({
</button>
)}
</header>
{!!timelineStart && <div class="timeline-start">{timelineStart}</div>}
{!!timelineStart && (
<div
class={`timeline-start ${uiState === 'loading' ? 'loading' : ''}`}
>
{timelineStart}
</div>
)}
{!!items.length ? (
<>
<ul class="timeline">

View file

@ -152,7 +152,7 @@ function Search(props) {
</header>
<main>
{!!q && (
<div class="filter-bar">
<div class={`filter-bar ${uiState === 'loading' ? 'loading' : ''}`}>
{!!type && (
<Link to={`/search${q ? `?q=${encodeURIComponent(q)}` : ''}`}>
All