diff --git a/src/components/dev/apps/ApplicationsIndex.js b/src/components/dev/apps/ApplicationsIndex.js index 54cddb9..9616fae 100644 --- a/src/components/dev/apps/ApplicationsIndex.js +++ b/src/components/dev/apps/ApplicationsIndex.js @@ -1,6 +1,7 @@ // @flow import type { OauthAppResponse } from 'services/api/oauth'; import React, { Component } from 'react'; +import classNames from 'classnames'; import { FormattedMessage as Message } from 'react-intl'; import { Helmet } from 'react-helmet'; import { LinkButton } from 'components/ui/form'; @@ -85,11 +86,7 @@ export default class ApplicationsIndex extends Component { resetClientId } = this.props; - if (displayForGuest) { - return ; - } else if (isLoading) { - return ; - } else if (applications.length > 0) { + if (applications.length > 0) { return ( { resetClientId={resetClientId} /> ); + } else if (displayForGuest) { + return ; } - return ; + return ; } } -function Loader() { +function Loader({ noApps }: { noApps: bool }) { return ( -
- +
+ + +
+
+
+ +
+
+ +
+
+ + +
); } @@ -135,27 +158,3 @@ function Guest() {
); } - -function NoApps() { - return ( -
- -
-
- -
-
- -
-
- - -
- ); -} diff --git a/src/components/dev/apps/applicationsIndex.scss b/src/components/dev/apps/applicationsIndex.scss index 7f0b89a..b4a1432 100644 --- a/src/components/dev/apps/applicationsIndex.scss +++ b/src/components/dev/apps/applicationsIndex.scss @@ -72,20 +72,30 @@ font-size: 16px; margin-bottom: 20px; line-height: 20px; - - > div { - &:nth-child(1) { - @include emptyStateAnimation(0); - } - - &:nth-child(2) { - @include emptyStateAnimation(1); - } - } } -.emptyStateActionButton { - @include emptyStateAnimation(2); +.noAppsContainer { + visibility: hidden; +} + +.noAppsAnimating { + visibility: visible; + + .emptyStateText { + > div { + &:nth-child(1) { + @include emptyStateAnimation(0); + } + + &:nth-child(2) { + @include emptyStateAnimation(1); + } + } + } + + .emptyStateActionButton { + @include emptyStateAnimation(2); + } } @keyframes slide-in-bottom { @@ -100,12 +110,6 @@ } } -.loadingStateIcon { - composes: emptyStateIcon; - - margin-bottom: 130px; // TODO: this is needed to render empty state without height jumping. Maybe it can be done more dynamically? -} - .appsListTitleContainer { display: flex; align-items: center;