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"
>
<div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading" 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"
>
<div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading" 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"
>
<div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading" 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"
>
<div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading" 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"
>
<div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading" 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"
>
<div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading" 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"
>
<div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading" 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"
>
<div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading" 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"
>
<div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading" 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"
>
<div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading" 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"
>
<div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading" 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"
>
<div
class="pt-5 relative"
>
<div
class="Spinner singleColor center"
data-testid="helm-repositories-are-loading" data-testid="helm-repositories-are-loading"
/> />
</div>
</div>
<div /> <div />
</div> </div>
</section> </section>
@ -2716,6 +2748,9 @@ exports[`listing active helm repositories in preferences when navigating to pref
Add Custom Helm Repo Add Custom Helm Repo
</button> </button>
</div> </div>
<div
class="repos"
>
<div <div
class="notice" class="notice"
> >
@ -2726,6 +2761,7 @@ exports[`listing active helm repositories in preferences when navigating to pref
The repositories have not been added yet The repositories have not been added yet
</div> </div>
</div> </div>
</div>
<div /> <div />
</div> </div>
</section> </section>
@ -3164,6 +3200,9 @@ exports[`listing active helm repositories in preferences when navigating to pref
Add Custom Helm Repo Add Custom Helm Repo
</button> </button>
</div> </div>
<div
class="repos"
>
<div <div
class="notice" class="notice"
> >
@ -3174,6 +3213,7 @@ exports[`listing active helm repositories in preferences when navigating to pref
The repositories have not been added yet The repositories have not been added yet
</div> </div>
</div> </div>
</div>
<div /> <div />
</div> </div>
</section> </section>

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 (
<div className={styles.repos}>
<Notice> <Notice>
<div className="flex-grow text-center" data-testid="no-helm-repositories"> <div className="flex-grow text-center" data-testid="no-helm-repositories">
The repositories have not been added yet The repositories have not been added yet
</div> </div>
</Notice> </Notice>
</div>
); );
} }