Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/oauth visual issues #730

Merged
merged 3 commits into from
Apr 16, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import * as React from "react";
import { AppSettings } from "../../../common/models/app-settings/app-settings";
import { Unary } from "../../../common/utils/functional/functional";
import { Loader } from "../../components/loader/loader";
import { MessagePanel } from "../../components/message-panel/message-panel";
import { Ajax } from "../../utils/ajax/ajax";

enum SettingsResourceStatus { LOADED, LOADING, ERROR }
Expand Down Expand Up @@ -83,7 +84,9 @@ export class AppSettingsProvider extends React.Component<AppSettingsProviderProp
const { appSettings } = this.state;
switch (appSettings.status) {
case SettingsResourceStatus.LOADING:
return <Loader/>;
return <MessagePanel title="Loading data sources...">
<Loader/>
</MessagePanel>;
case SettingsResourceStatus.ERROR:
throw appSettings.error;
case SettingsResourceStatus.LOADED:
Expand Down
14 changes: 4 additions & 10 deletions src/client/components/message-panel/message-panel.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,8 @@
font-size: 14px;
}

.message-panel__action {
@include css-variable(color, brand);
margin-top: 24px;
font-size: 18px;
cursor: pointer;
text-align: center;

&:hover {
text-decoration: underline;
}
.message-panel__children {
margin-top: 36px;
display: flex;
justify-content: center;
}
7 changes: 5 additions & 2 deletions src/client/components/message-panel/message-panel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

import * as React from "react";
import { Nullary } from "../../../common/utils/functional/functional";
import { Button } from "../button/button";
import "./message-panel.scss";

interface ErrorViewActionProps {
Expand All @@ -24,7 +25,7 @@ interface ErrorViewActionProps {
}

export const MessagePanelAction: React.SFC<ErrorViewActionProps> = ({ action, label }) =>
<div className="message-panel__action" onClick={action}>{label}</div>;
<Button type="primary" onClick={action} title={label} />;

interface ErrorViewProps {
message?: string;
Expand All @@ -36,7 +37,9 @@ export const MessagePanel: React.SFC<ErrorViewProps> = ({ message, title, childr
<div className="message-panel__container">
<div className="message-panel__title">{title}</div>
{message && <div className="message-panel__message">{message}</div>}
{children}
{React.Children.count(children) > 0 && <div className="message-panel__children">
{children}
</div>}
</div>
</div>;
};