mirror of
https://github.com/cheeaun/phanpy.git
synced 2025-01-23 00:56:23 +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
|
||||
);
|
||||
align-items: center;
|
||||
transition: opacity 0.3s ease-out;
|
||||
|
||||
&.loading,
|
||||
.loading > & {
|
||||
pointer-events: none;
|
||||
opacity: 0.5;
|
||||
}
|
||||
}
|
||||
.filter-bar.centered {
|
||||
justify-content: center;
|
||||
|
|
|
@ -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">
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue