1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

Tweak position of spinner

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
This commit is contained in:
Janne Savolainen 2022-06-07 09:04:42 +03:00
parent 3b85c74595
commit 13e3b16bf5
No known key found for this signature in database
GPG Key ID: 8C6CFB2FFFE8F68A
5 changed files with 162 additions and 50 deletions

View File

@ -406,9 +406,17 @@ exports[`activate custom helm repository in preferences when navigating to prefe
</button> </button>
</div> </div>
<div <div
class="Spinner singleColor" class="repos"
data-testid="helm-repositories-are-loading" >
/> <div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading"
/>
</div>
</div>
<div /> <div />
</div> </div>
</section> </section>
@ -5637,9 +5645,17 @@ exports[`activate custom helm repository in preferences when navigating to prefe
</button> </button>
</div> </div>
<div <div
class="Spinner singleColor" class="repos"
data-testid="helm-repositories-are-loading" >
/> <div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading"
/>
</div>
</div>
<div /> <div />
</div> </div>
</section> </section>
@ -6102,9 +6118,17 @@ exports[`activate custom helm repository in preferences when navigating to prefe
</button> </button>
</div> </div>
<div <div
class="Spinner singleColor" class="repos"
data-testid="helm-repositories-are-loading" >
/> <div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading"
/>
</div>
</div>
<div /> <div />
</div> </div>
</section> </section>

View File

@ -406,9 +406,17 @@ exports[`activate helm repository from list in preferences when navigating to pr
</button> </button>
</div> </div>
<div <div
class="Spinner singleColor" class="repos"
data-testid="helm-repositories-are-loading" >
/> <div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading"
/>
</div>
</div>
<div /> <div />
</div> </div>
</section> </section>
@ -2326,9 +2334,17 @@ exports[`activate helm repository from list in preferences when navigating to pr
</button> </button>
</div> </div>
<div <div
class="Spinner singleColor" class="repos"
data-testid="helm-repositories-are-loading" >
/> <div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading"
/>
</div>
</div>
<div /> <div />
</div> </div>
</section> </section>
@ -4340,9 +4356,17 @@ exports[`activate helm repository from list in preferences when navigating to pr
</button> </button>
</div> </div>
<div <div
class="Spinner singleColor" class="repos"
data-testid="helm-repositories-are-loading" >
/> <div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading"
/>
</div>
</div>
<div /> <div />
</div> </div>
</section> </section>

View File

@ -406,9 +406,17 @@ exports[`deactivate helm repository from list of active repositories in preferen
</button> </button>
</div> </div>
<div <div
class="Spinner singleColor" class="repos"
data-testid="helm-repositories-are-loading" >
/> <div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading"
/>
</div>
</div>
<div /> <div />
</div> </div>
</section> </section>
@ -1803,9 +1811,17 @@ exports[`deactivate helm repository from list of active repositories in preferen
</button> </button>
</div> </div>
<div <div
class="Spinner singleColor" class="repos"
data-testid="helm-repositories-are-loading" >
/> <div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading"
/>
</div>
</div>
<div /> <div />
</div> </div>
</section> </section>

View File

@ -406,9 +406,17 @@ exports[`listing active helm repositories in preferences when navigating to pref
</button> </button>
</div> </div>
<div <div
class="Spinner singleColor" class="repos"
data-testid="helm-repositories-are-loading" >
/> <div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading"
/>
</div>
</div>
<div /> <div />
</div> </div>
</section> </section>
@ -863,9 +871,17 @@ exports[`listing active helm repositories in preferences when navigating to pref
</button> </button>
</div> </div>
<div <div
class="Spinner singleColor" class="repos"
data-testid="helm-repositories-are-loading" >
/> <div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading"
/>
</div>
</div>
<div /> <div />
</div> </div>
</section> </section>
@ -1818,9 +1834,17 @@ exports[`listing active helm repositories in preferences when navigating to pref
</button> </button>
</div> </div>
<div <div
class="Spinner singleColor" class="repos"
data-testid="helm-repositories-are-loading" >
/> <div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading"
/>
</div>
</div>
<div /> <div />
</div> </div>
</section> </section>
@ -2275,9 +2299,17 @@ exports[`listing active helm repositories in preferences when navigating to pref
</button> </button>
</div> </div>
<div <div
class="Spinner singleColor" class="repos"
data-testid="helm-repositories-are-loading" >
/> <div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading"
/>
</div>
</div>
<div /> <div />
</div> </div>
</section> </section>
@ -2717,13 +2749,17 @@ exports[`listing active helm repositories in preferences when navigating to pref
</button> </button>
</div> </div>
<div <div
class="notice" class="repos"
> >
<div <div
class="flex-grow text-center" class="notice"
data-testid="no-helm-repositories"
> >
The repositories have not been added yet <div
class="flex-grow text-center"
data-testid="no-helm-repositories"
>
The repositories have not been added yet
</div>
</div> </div>
</div> </div>
<div /> <div />
@ -3165,13 +3201,17 @@ exports[`listing active helm repositories in preferences when navigating to pref
</button> </button>
</div> </div>
<div <div
class="notice" class="repos"
> >
<div <div
class="flex-grow text-center" class="notice"
data-testid="no-helm-repositories"
> >
The repositories have not been added yet <div
class="flex-grow text-center"
data-testid="no-helm-repositories"
>
The repositories have not been added yet
</div>
</div> </div>
</div> </div>
<div /> <div />

View File

@ -25,18 +25,26 @@ interface Dependencies {
const NonInjectedActiveHelmRepositories = observer(({ activeHelmRepositories, deactivateRepository }: Dependencies) => { const NonInjectedActiveHelmRepositories = observer(({ activeHelmRepositories, deactivateRepository }: Dependencies) => {
if (activeHelmRepositories.pending.get()) { if (activeHelmRepositories.pending.get()) {
return <Spinner data-testid="helm-repositories-are-loading" />; return (
<div className={styles.repos}>
<div className="pt-5 relative">
<Spinner center data-testid="helm-repositories-are-loading" />
</div>
</div>
);
} }
const repositories = activeHelmRepositories.value.get(); const repositories = activeHelmRepositories.value.get();
if (isEmpty(repositories)) { if (isEmpty(repositories)) {
return ( return (
<Notice> <div className={styles.repos}>
<div className="flex-grow text-center" data-testid="no-helm-repositories"> <Notice>
The repositories have not been added yet <div className="flex-grow text-center" data-testid="no-helm-repositories">
</div> The repositories have not been added yet
</Notice> </div>
</Notice>
</div>
); );
} }