Skip to content

Commit

Permalink
Merge pull request #2736 from bjoernricks/update-login-page
Browse files Browse the repository at this point in the history
Update login page
  • Loading branch information
bjoernricks authored Feb 24, 2021
2 parents 97d65d9 + 5a0c476 commit 93269c3
Show file tree
Hide file tree
Showing 10 changed files with 444 additions and 189 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed
- Refactored useFormValidation hook [#2704](https://github.com/greenbone/gsa/pull/2704)
- Updated copyright and footer layout [#2687](https://github.com/greenbone/gsa/pull/2687)
- New login page layout [#2683](https://github.com/greenbone/gsa/pull/2683)
- New login page layout [#2683](https://github.com/greenbone/gsa/pull/2683), [#2736](https://github.com/greenbone/gsa/pull/2736)
- CVE Tables Page can now be used with the updated xml-format and CVSSv3(.1). [#2583](https://github.com/greenbone/gsa/pull/2583)
- The CVSS v2 BaseScore calculator calculates the score on the client side now. [#2536](https://github.com/greenbone/gsa/pull/2536)

Expand Down
Binary file modified gsa/public/img/login-label.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions gsa/public/img/login-label.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion gsa/public/locales/gsa-de.json
Original file line number Diff line number Diff line change
Expand Up @@ -888,7 +888,6 @@
"Login": "Login",
"Login Failed. Invalid password or username.": "Anmeldung fehlgeschlagen. Ungültiger Benutzername oder ungültiges Passwort.",
"Login Name": "Loginname",
"Login as Guest": "Als Gast anmelden",
"Low": "Niedrig",
"MD5 Fingerprint": "MD5-Fingerabdruck",
"Mandatory": "Erforderlich",
Expand Down Expand Up @@ -1483,6 +1482,9 @@
"Show all Hosts with IP {{ip}}": "Zeige alle Hosts mit IP {{ip}}",
"Show all Identifiers": "Alle Identifikatoren anzeigen",
"Show latest Identifiers": "Die letzten Identifikatoren anzeigen",
"Sign In": "Anmelden",
"Sign In as Guest": "Als Gast anmelden",
"Sign in to your account": "Anmelden",
"Simple Notice": "Einfache Notiz",
"Single": "Einzeln",
"Software": "Software",
Expand Down
124 changes: 124 additions & 0 deletions gsa/src/web/components/icon/svg/greenbone-power.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ exports[`ProductImage tests should render 1`] = `
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
height: 95px;
height: 180px;
}
<img
Expand Down
30 changes: 30 additions & 0 deletions gsa/src/web/components/img/powered.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/* Copyright (C) 2017-2021 Greenbone Networks GmbH
*
* SPDX-License-Identifier: AGPL-3.0-or-later
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Affero General Public License
* as published by the Free Software Foundation, either version 3
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

import React from 'react';

import Logo from 'web/components/icon/svg/greenbone-power.svg';

const PoweredByGreenbone = props => (
// eslint-disable-next-line react/jsx-no-target-blank
<a href="https://www.greenbone.net" target="_blank" rel="noopener">
<img alt="Powered By Greenbone Networks" {...props} src={Logo} />
</a>
);

export default PoweredByGreenbone;
34 changes: 16 additions & 18 deletions gsa/src/web/components/img/product.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,32 +24,30 @@ import _ from 'gmp/locale';

import {isDefined} from 'gmp/utils/identity';

import withGmp from 'web/utils/withGmp';
import PropTypes from 'web/utils/proptypes';
import useGmp from 'web/utils/useGmp';

import Img from './img';

const Image = styled(Img)`
display: flex;
height: 95px;
height: 180px;
`;

const ProductImage = ({gmp, ...props}) => (
<Image
alt={_('Greenbone Security Assistant')}
{...props}
src={
isDefined(gmp.settings) && isDefined(gmp.settings.vendorLabel)
? gmp.settings.vendorLabel
: 'login-label.png'
}
/>
);

ProductImage.propTypes = {
gmp: PropTypes.gmp.isRequired,
const ProductImage = props => {
const {settings} = useGmp();
return (
<Image
alt={_('Greenbone Security Assistant')}
{...props}
src={
isDefined(settings) && isDefined(settings.vendorLabel)
? settings.vendorLabel
: 'login-label.png'
}
/>
);
};

export default withGmp(ProductImage);
export default ProductImage;

// vim: set ts=2 sw=2 tw=80:
Loading

0 comments on commit 93269c3

Please sign in to comment.