mirror of
https://github.com/ansible/awx.git
synced 2026-03-01 00:38:45 -03:30
Refactor styles and remove patternfly utility classes
This commit is contained in:
63
src/app.scss
63
src/app.scss
@@ -1,3 +1,8 @@
|
|||||||
|
// https://github.com/patternfly/patternfly-react/issues/1294
|
||||||
|
#app {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// masthead overrides
|
// masthead overrides
|
||||||
//
|
//
|
||||||
@@ -44,7 +49,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.pf-c-nav__simple-list .pf-c-nav__link {
|
.pf-c-nav__simple-list .pf-c-nav__link {
|
||||||
--pf-c-nav__simple-list-link--PaddingLeft: 24px;
|
|
||||||
--pf-c-nav__simple-list-link--PaddingBottom: 6px;
|
--pf-c-nav__simple-list-link--PaddingBottom: 6px;
|
||||||
--pf-c-nav__simple-list-link--PaddingTop: 6px;
|
--pf-c-nav__simple-list-link--PaddingTop: 6px;
|
||||||
}
|
}
|
||||||
@@ -70,16 +74,6 @@
|
|||||||
padding-bottom: 10px;
|
padding-bottom: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// toolbar overrides
|
|
||||||
//
|
|
||||||
|
|
||||||
.pf-l-toolbar {
|
|
||||||
align-self: center;
|
|
||||||
height: 60px;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// data list overrides
|
// data list overrides
|
||||||
//
|
//
|
||||||
@@ -99,7 +93,7 @@
|
|||||||
|
|
||||||
.pf-c-data-list__item {
|
.pf-c-data-list__item {
|
||||||
--pf-c-data-list__item--PaddingLeft: 20px;
|
--pf-c-data-list__item--PaddingLeft: 20px;
|
||||||
--pf-c-data-list__item--PaddingRight: 0px;
|
--pf-c-data-list__item--PaddingRight: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pf-c-data-list__check {
|
.pf-c-data-list__check {
|
||||||
@@ -116,8 +110,24 @@
|
|||||||
margin-right: 20px;
|
margin-right: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.pf-c-data-list__cell a {
|
.pf-c-data-list__cell {
|
||||||
margin-right: 8px;
|
--pf-c-data-list__cell--PaddingTop: 16px;
|
||||||
|
--pf-c-data-list__cell--PaddingBottom: 16px;
|
||||||
|
--pf-c-data-list__cell-cell--PaddingTop: 16px;
|
||||||
|
|
||||||
|
a {
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//
|
||||||
|
// switch overrides
|
||||||
|
//
|
||||||
|
// https://github.com/patternfly/patternfly-next/issues/915
|
||||||
|
.pf-c-switch {
|
||||||
|
.pf-c-switch__label::before {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
@@ -143,19 +153,15 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
|
||||||
// data list overrides
|
|
||||||
//
|
|
||||||
|
|
||||||
.pf-c-data-list__item {
|
|
||||||
--pf-c-data-list__item--PaddingLeft: 20px;
|
|
||||||
--pf-c-data-list__item--PaddingRight: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// pf modal overrides
|
// pf modal overrides
|
||||||
//
|
//
|
||||||
|
|
||||||
|
.pf-c-modal-box {
|
||||||
|
--pf-c-modal-box--Width: 550px;
|
||||||
|
--pf-c-modal-box--MaxWidth: 550px;
|
||||||
|
}
|
||||||
|
|
||||||
.pf-c-modal-box__footer {
|
.pf-c-modal-box__footer {
|
||||||
--pf-c-modal-box__footer--PaddingTop: 20px;
|
--pf-c-modal-box__footer--PaddingTop: 20px;
|
||||||
--pf-c-modal-box__footer--PaddingRight: 20px;
|
--pf-c-modal-box__footer--PaddingRight: 20px;
|
||||||
@@ -189,6 +195,10 @@
|
|||||||
padding: 0;
|
padding: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.pf-c-card__body {
|
||||||
|
--pf-c-card__body--PaddingTop: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// pf empty state overrides
|
// pf empty state overrides
|
||||||
//
|
//
|
||||||
@@ -205,11 +215,10 @@
|
|||||||
|
|
||||||
.awx-lookup {
|
.awx-lookup {
|
||||||
min-height: 36px;
|
min-height: 36px;
|
||||||
}
|
|
||||||
|
|
||||||
.awx-c-modal {
|
.pf-c-form-control {
|
||||||
width: 550px;
|
--pf-c-form-control--Height: auto;
|
||||||
margin: 0;
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.awx-c-icon--remove {
|
.awx-c-icon--remove {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
|
|
||||||
border-bottom: var(--awx-toolbar--BorderWidth) solid var(--awx-toolbar--BorderColor);
|
border-bottom: var(--awx-toolbar--BorderWidth) solid var(--awx-toolbar--BorderColor);
|
||||||
background-color: var(--awx-toolbar--BackgroundColor);
|
background-color: var(--awx-toolbar--BackgroundColor);
|
||||||
|
display: flex;
|
||||||
height: 70px;
|
height: 70px;
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
|
|
||||||
@@ -13,6 +14,10 @@
|
|||||||
--pf-global--FontSize--md: 14px;
|
--pf-global--FontSize--md: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.awx-toolbar .pf-l-level {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
|
||||||
.awx-toolbar .pf-c-button.pf-m-plain {
|
.awx-toolbar .pf-c-button.pf-m-plain {
|
||||||
--pf-c-button--m-plain--PaddingLeft: 0px;
|
--pf-c-button--m-plain--PaddingLeft: 0px;
|
||||||
--pf-c-button--m-plain--PaddingRight: 0px;
|
--pf-c-button--m-plain--PaddingRight: 0px;
|
||||||
@@ -43,6 +48,7 @@
|
|||||||
height: 30px;
|
height: 30px;
|
||||||
|
|
||||||
input {
|
input {
|
||||||
|
height: 30px;
|
||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
width: 300px;
|
width: 300px;
|
||||||
}
|
}
|
||||||
@@ -60,6 +66,10 @@
|
|||||||
padding: 0 10px;
|
padding: 0 10px;
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
|
|
||||||
|
.pf-c-dropdown__toggle-text {
|
||||||
|
width: auto;
|
||||||
|
}
|
||||||
|
|
||||||
.pf-c-dropdown__toggle-icon {
|
.pf-c-dropdown__toggle-icon {
|
||||||
margin: 0px;
|
margin: 0px;
|
||||||
padding-top: 3px;
|
padding-top: 3px;
|
||||||
|
|||||||
@@ -136,7 +136,6 @@ class Lookup extends React.Component {
|
|||||||
</Button>
|
</Button>
|
||||||
<div className="pf-c-form-control">{this.wrapTags(value)}</div>
|
<div className="pf-c-form-control">{this.wrapTags(value)}</div>
|
||||||
<Modal
|
<Modal
|
||||||
className="awx-c-modal"
|
|
||||||
title={`Select ${lookupHeader}`}
|
title={`Select ${lookupHeader}`}
|
||||||
isOpen={isModalOpen}
|
isOpen={isModalOpen}
|
||||||
onClose={this.handleModalToggle}
|
onClose={this.handleModalToggle}
|
||||||
|
|||||||
@@ -28,27 +28,23 @@ class NotificationListItem extends React.Component {
|
|||||||
return (
|
return (
|
||||||
<I18n>
|
<I18n>
|
||||||
{({ i18n }) => (
|
{({ i18n }) => (
|
||||||
<li key={itemId} className="pf-c-data-list__item pf-u-flex-row pf-u-align-items-center">
|
<li key={itemId} className="pf-c-data-list__item">
|
||||||
<div className="pf-c-data-list__cell pf-u-flex-row">
|
<div className="pf-c-data-list__cell" style={{ display: 'flex' }}>
|
||||||
<div className="pf-u-display-inline-flex">
|
<Link
|
||||||
<Link
|
to={{
|
||||||
to={{
|
pathname: detailUrl
|
||||||
pathname: detailUrl
|
}}
|
||||||
}}
|
>
|
||||||
>
|
<b>{name}</b>
|
||||||
<b>{name}</b>
|
</Link>
|
||||||
</Link>
|
|
||||||
</div>
|
|
||||||
<Badge
|
<Badge
|
||||||
style={capText}
|
style={capText}
|
||||||
className="pf-u-display-inline-flex"
|
|
||||||
isRead
|
isRead
|
||||||
>
|
>
|
||||||
{notificationType}
|
{notificationType}
|
||||||
</Badge>
|
</Badge>
|
||||||
</div>
|
</div>
|
||||||
<div className="pf-c-data-list__cell" />
|
<div className="pf-c-data-list__cell" style={{ display: 'flex', justifyContent: 'flex-end' }}>
|
||||||
<div className="pf-c-data-list__cell pf-u-display-flex pf-u-justify-content-flex-end">
|
|
||||||
<Switch
|
<Switch
|
||||||
label={i18n._(t`Successful`)}
|
label={i18n._(t`Successful`)}
|
||||||
isChecked={successTurnedOn}
|
isChecked={successTurnedOn}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { Link } from 'react-router-dom';
|
|
||||||
|
|
||||||
import { t } from '@lingui/macro';
|
import { t } from '@lingui/macro';
|
||||||
import { I18n } from '@lingui/react';
|
import { I18n } from '@lingui/react';
|
||||||
@@ -55,6 +54,10 @@ class PageHeaderToolbar extends Component {
|
|||||||
const { isHelpOpen, isUserOpen } = this.state;
|
const { isHelpOpen, isUserOpen } = this.state;
|
||||||
const { isAboutDisabled, onAboutClick, onLogoutClick } = this.props;
|
const { isAboutDisabled, onAboutClick, onLogoutClick } = this.props;
|
||||||
|
|
||||||
|
const dropdownIconColor = {
|
||||||
|
color: 'white'
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<I18n>
|
<I18n>
|
||||||
{({ i18n }) => (
|
{({ i18n }) => (
|
||||||
@@ -68,6 +71,7 @@ class PageHeaderToolbar extends Component {
|
|||||||
toggle={(
|
toggle={(
|
||||||
<DropdownToggle
|
<DropdownToggle
|
||||||
onToggle={this.onHelpToggle}
|
onToggle={this.onHelpToggle}
|
||||||
|
style={dropdownIconColor}
|
||||||
>
|
>
|
||||||
<QuestionCircleIcon />
|
<QuestionCircleIcon />
|
||||||
</DropdownToggle>
|
</DropdownToggle>
|
||||||
@@ -99,15 +103,17 @@ class PageHeaderToolbar extends Component {
|
|||||||
toggle={(
|
toggle={(
|
||||||
<DropdownToggle
|
<DropdownToggle
|
||||||
onToggle={this.onUserToggle}
|
onToggle={this.onUserToggle}
|
||||||
|
style={dropdownIconColor}
|
||||||
>
|
>
|
||||||
<UserIcon />
|
<UserIcon />
|
||||||
</DropdownToggle>
|
</DropdownToggle>
|
||||||
)}
|
)}
|
||||||
dropdownItems={[
|
dropdownItems={[
|
||||||
<DropdownItem key="user">
|
<DropdownItem
|
||||||
<Link to="/home">
|
key="user"
|
||||||
{i18n._(t`User Details`)}
|
href="#/home"
|
||||||
</Link>
|
>
|
||||||
|
{i18n._(t`User Details`)}
|
||||||
</DropdownItem>,
|
</DropdownItem>,
|
||||||
<DropdownItem
|
<DropdownItem
|
||||||
key="logout"
|
key="logout"
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ const selectedRowStyling = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const selectedLabelStyling = {
|
const selectedLabelStyling = {
|
||||||
|
alignSelf: 'center',
|
||||||
fontSize: '14px',
|
fontSize: '14px',
|
||||||
fontWeight: 'bold'
|
fontWeight: 'bold'
|
||||||
};
|
};
|
||||||
@@ -37,7 +38,7 @@ class SelectedList extends Component {
|
|||||||
return (
|
return (
|
||||||
<div className="awx-selectedList">
|
<div className="awx-selectedList">
|
||||||
<div className="pf-l-split" style={selectedRowStyling}>
|
<div className="pf-l-split" style={selectedRowStyling}>
|
||||||
<div className="pf-l-split__item pf-u-align-items-center" style={selectedLabelStyling}>
|
<div className="pf-l-split__item" style={selectedLabelStyling}>
|
||||||
{label}
|
{label}
|
||||||
</div>
|
</div>
|
||||||
<div className="pf-l-split__item">
|
<div className="pf-l-split__item">
|
||||||
|
|||||||
@@ -9,28 +9,26 @@ import './tabs.scss';
|
|||||||
const Tabs = ({ children, labelText, closeButton }) => (
|
const Tabs = ({ children, labelText, closeButton }) => (
|
||||||
<div
|
<div
|
||||||
aria-label={labelText}
|
aria-label={labelText}
|
||||||
className="pf-c-tabs pf-u-flex-direction-row pf-u-justify-content-space-between"
|
className="pf-c-tabs"
|
||||||
>
|
>
|
||||||
<ul className="pf-c-tabs__list">
|
<ul className="pf-c-tabs__list">
|
||||||
{children}
|
{children}
|
||||||
</ul>
|
</ul>
|
||||||
{closeButton
|
{closeButton
|
||||||
&& (
|
&& (
|
||||||
<div className="pf-u-align-self-center">
|
<Tooltip
|
||||||
<Tooltip
|
message={closeButton.text}
|
||||||
message={closeButton.text}
|
position="top"
|
||||||
position="top"
|
>
|
||||||
>
|
<Link to={closeButton.link}>
|
||||||
<Link to={closeButton.link}>
|
<Button
|
||||||
<Button
|
variant="plain"
|
||||||
variant="plain"
|
aria-label={closeButton.text}
|
||||||
aria-label={closeButton.text}
|
>
|
||||||
>
|
<TimesIcon />
|
||||||
<TimesIcon />
|
</Button>
|
||||||
</Button>
|
</Link>
|
||||||
</Link>
|
</Tooltip>
|
||||||
</Tooltip>
|
|
||||||
</div>
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -10,7 +10,10 @@
|
|||||||
--pf-global--link--Color: #484848;
|
--pf-global--link--Color: #484848;
|
||||||
--pf-global--link--Color--hover: #484848;
|
--pf-global--link--Color--hover: #484848;
|
||||||
--pf-global--link--TextDecoration--hover: none;
|
--pf-global--link--TextDecoration--hover: none;
|
||||||
--pf-global--FontWeight--normal: 700;
|
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: row;
|
||||||
|
justify-content: space-between;
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
border-bottom: 1px solid var(--pf-c-tabs__item--BorderColor);
|
border-bottom: 1px solid var(--pf-c-tabs__item--BorderColor);
|
||||||
@@ -27,6 +30,7 @@
|
|||||||
--pf-c-tabs__button--PaddingLeft: 20px;
|
--pf-c-tabs__button--PaddingLeft: 20px;
|
||||||
--pf-c-tabs__button--PaddingRight: 20px;
|
--pf-c-tabs__button--PaddingRight: 20px;
|
||||||
display: block;
|
display: block;
|
||||||
|
font-weight: 700;
|
||||||
|
|
||||||
&:after {
|
&:after {
|
||||||
content: '';
|
content: '';
|
||||||
|
|||||||
@@ -94,7 +94,7 @@ class OrganizationDetail extends Component {
|
|||||||
return (
|
return (
|
||||||
<I18n>
|
<I18n>
|
||||||
{({ i18n }) => (
|
{({ i18n }) => (
|
||||||
<CardBody className="pf-u-pt-lg">
|
<CardBody>
|
||||||
<div className="pf-l-grid pf-m-gutter pf-m-all-12-col-on-md pf-m-all-6-col-on-lg pf-m-all-4-col-on-xl">
|
<div className="pf-l-grid pf-m-gutter pf-m-all-12-col-on-md pf-m-all-6-col-on-lg pf-m-all-4-col-on-xl">
|
||||||
<Detail
|
<Detail
|
||||||
label={i18n._(t`Name`)}
|
label={i18n._(t`Name`)}
|
||||||
@@ -135,7 +135,7 @@ class OrganizationDetail extends Component {
|
|||||||
value={modified}
|
value={modified}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div className="pf-u-display-flex pf-u-flex-direction-row-reverse pf-u-ml-auto pf-u-mt-md">
|
<div style={{ display: 'flex', flexDirection: 'row-reverse' }}>
|
||||||
<Link to={`/organizations/${match.params.id}/edit`}>
|
<Link to={`/organizations/${match.params.id}/edit`}>
|
||||||
<Button><Trans>Edit</Trans></Button>
|
<Button><Trans>Edit</Trans></Button>
|
||||||
</Link>
|
</Link>
|
||||||
|
|||||||
Reference in New Issue
Block a user