Skip to content

Commit

Permalink
proposal: stlye "try logging in" page like regular login page
Browse files Browse the repository at this point in the history
  • Loading branch information
hotzenklotz committed Jul 1, 2024
1 parent f1c4e4e commit ff14f5e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 19 deletions.
26 changes: 9 additions & 17 deletions frontend/javascripts/components/brain_spinner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { AsyncButton } from "components/async_clickables";
import { switchToOrganization } from "admin/admin_rest_api";
import messages from "messages";
import { Link } from "react-router-dom";
import { Button, Col, Row } from "antd";
import { Button, Card, Col, Row } from "antd";
import LoginForm from "admin/auth/login_form";

type Props = {
Expand Down Expand Up @@ -98,21 +98,13 @@ export function BrainSpinnerWithError({

export function CoverWithLogin({ onLoggedIn }: { onLoggedIn: () => void }) {
return (
<div className="cover-whole-screen">
<Row
justify="center"
style={{
padding: 50,
}}
align="middle"
>
<Col xs={22} sm={20} md={16} lg={12} xl={8}>
<span style={{ margin: "0 auto", display: "table" }}>
<h3>Try logging in to view the dataset.</h3>
<LoginForm layout="horizontal" onLoggedIn={onLoggedIn} />
</span>
</Col>
</Row>
</div>
<Row justify="center" align="middle" className="login-view">
<Col xs={22} sm={20} md={16} lg={12} xl={8}>
<Card className="login-content">
<h3>Try logging in to view the dataset.</h3>
<LoginForm layout="horizontal" onLoggedIn={onLoggedIn} />
</Card>
</Col>
</Row>
);
}
5 changes: 3 additions & 2 deletions frontend/stylesheets/main.less
Original file line number Diff line number Diff line change
Expand Up @@ -616,11 +616,12 @@ button.narrow {
min-height: calc(100vh - var(--navbar-height));
background: var(--background-blue-neurons);
}

.login-content {
max-width: 600px;
padding: 80px;

margin: 0 auto;

@media @smartphones {
padding: 20px;
margin: 20px;
Expand Down

0 comments on commit ff14f5e

Please sign in to comment.