mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-03-21 21:29:20 +01:00
Add loading state to filter bar
This commit is contained in:
parent
7145c20136
commit
106cd16e41
3 changed files with 15 additions and 2 deletions
|
@ -2116,6 +2116,13 @@ ul.link-list li a .icon {
|
||||||
transparent
|
transparent
|
||||||
);
|
);
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
transition: opacity 0.3s ease-out;
|
||||||
|
|
||||||
|
&.loading,
|
||||||
|
.loading > & {
|
||||||
|
pointer-events: none;
|
||||||
|
opacity: 0.5;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.filter-bar.centered {
|
.filter-bar.centered {
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
|
@ -334,7 +334,13 @@ function Timeline({
|
||||||
</button>
|
</button>
|
||||||
)}
|
)}
|
||||||
</header>
|
</header>
|
||||||
{!!timelineStart && <div class="timeline-start">{timelineStart}</div>}
|
{!!timelineStart && (
|
||||||
|
<div
|
||||||
|
class={`timeline-start ${uiState === 'loading' ? 'loading' : ''}`}
|
||||||
|
>
|
||||||
|
{timelineStart}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
{!!items.length ? (
|
{!!items.length ? (
|
||||||
<>
|
<>
|
||||||
<ul class="timeline">
|
<ul class="timeline">
|
||||||
|
|
|
@ -152,7 +152,7 @@ function Search(props) {
|
||||||
</header>
|
</header>
|
||||||
<main>
|
<main>
|
||||||
{!!q && (
|
{!!q && (
|
||||||
<div class="filter-bar">
|
<div class={`filter-bar ${uiState === 'loading' ? 'loading' : ''}`}>
|
||||||
{!!type && (
|
{!!type && (
|
||||||
<Link to={`/search${q ? `?q=${encodeURIComponent(q)}` : ''}`}>
|
<Link to={`/search${q ? `?q=${encodeURIComponent(q)}` : ''}`}>
|
||||||
‹ All
|
‹ All
|
||||||
|
|
Loading…
Reference in a new issue