Skip to content
Open
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
2 changes: 0 additions & 2 deletions src/components/App/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import Header from 'components/Header';
import LeftPanel from 'components/LeftPanel';
import Request from 'components/Request';
import Response from 'components/Response';
import Footer from 'components/Footer';
import Modal from 'components/Modal';
import updateTheme from 'utils/updateTheme';
import updateHighlightStyle from 'utils/updateHighlightStyle';
Expand Down Expand Up @@ -80,7 +79,6 @@ class App extends React.Component {
</main>
</RightCol>
</MainContent>
<Footer />
<Modal />
</Wrapper>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/Fonticon/StyledComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const StyledFonticon = styled(Clearfix)`
display: inline-block;
}
i {
margin-right: 2px;
margin-right: 4px;
}
`;

12 changes: 0 additions & 12 deletions src/components/Footer/StyledComponents.js

This file was deleted.

30 changes: 0 additions & 30 deletions src/components/Footer/index.js

This file was deleted.

20 changes: 11 additions & 9 deletions src/components/Header/StyledComponents.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,23 @@ import styled, { css } from 'styled-components';

/* eslint-disable import/prefer-default-export */
export const StyledHeader = styled.header`
margin-top: 20px;
margin-bottom: 30px;
margin: 20px 0px 0px 0px;
color: black;

img {
margin-top: -7px;
margin-right: 10px;
.navbar-brand {
display: flex;
alignItems: center;
gap: 8px;
}

h1 {
color: black;
h3, li a {
color: rgb(51, 51, 51) !important;
margin: 0;
}

${props => props.darkMode && css`
h1 {
color: white;
h3, li a {
color: white !important;
}
img {
filter: invert(100%);
Expand Down
46 changes: 34 additions & 12 deletions src/components/Header/index.js
Original file line number Diff line number Diff line change
@@ -1,21 +1,44 @@
import React, { PropTypes } from 'react';
import { connect } from 'react-redux';
import { Nav, Navbar, NavItem } from 'react-bootstrap';

import { isDarkTheme } from 'store/options/selectors';
import { showOptionsModal } from 'utils/modal';
import Fonticon from 'components/Fonticon';
import * as modalActions from 'store/modal/actions';

import { StyledHeader } from './StyledComponents';

export function Header({ darkMode }) {
export function Header({ darkMode, ...props }) {
return (
<StyledHeader darkMode={darkMode}>
<h1>
<img
className="logo"
role="presentation"
height="40"
src="img/rested-logo.png"
/>
<span>RESTED</span>
</h1>
<Navbar fluid inverse={darkMode}>
<Navbar.Header>
<Navbar.Brand>
<img
className="logo"
role="presentation"
height="30"
src="img/rested-logo.png"
/>
<h3>RESTED</h3>
</Navbar.Brand>
</Navbar.Header>
<Nav pullRight>
<NavItem onClick={() => showOptionsModal(props)}>
<Fonticon icon="cog" />
Options
</NavItem>
<NavItem
href="https://github.com/RESTEDClient/RESTED"
target="_blank"
rel="noopener noreferrer"
>
<Fonticon icon="github" />
GitHub
</NavItem>
</Nav>
</Navbar>
</StyledHeader>
);
}
Expand All @@ -28,5 +51,4 @@ const mapStateToProps = state => ({
darkMode: isDarkTheme(state),
});

export default connect(mapStateToProps)(Header);

export default connect(mapStateToProps, modalActions)(Header);
8 changes: 1 addition & 7 deletions src/components/Request/Titlebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import UUID from 'uuid-js';

import { immutableCollectionShape } from 'propTypes/collection';
import IconButton from 'components/IconButton';
import { showChooseCollectionModal, showOptionsModal } from 'utils/modal';
import { showChooseCollectionModal } from 'utils/modal';
import { getCollections } from 'store/collections/selectors';
import { getCollectionsMinimized } from 'store/options/selectors';
import { getEditingRequest, isEditMode } from 'store/config/selectors';
Expand Down Expand Up @@ -86,12 +86,6 @@ function Titlebar(props) {
icon="plus"
className="pull-right hidden-xs"
/>
<IconButton
onClick={() => showOptionsModal(props)}
tooltip="Options"
icon="cog"
className="pull-right"
/>
<IconButton
onClick={() => toggleCollectionsExpanded(props)}
tooltip={`${collectionsMinimized ? 'Show' : 'Hide'} collections`}
Expand Down
4 changes: 4 additions & 0 deletions src/constants/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,10 +132,14 @@ export const THEMES = [
* being darker than the others
*/
export const DARK_THEMES = [
'cosmo',
'cyborg',
'darkly',
'flatly',
'sandstone',
'slate',
'superhero',
'yeti'
];

/**
Expand Down