mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-04-08 13:21:50 +08:00
implements code review suggestions
This commit is contained in:
parent
1dfd7a0cee
commit
b02117ea67
7 changed files with 16 additions and 32 deletions
app/javascript/packs
app/constants
shared/actions
src/settings/components/account
styles
|
@ -7,8 +7,6 @@ export const BORDER_LIGHT_COLOR = "#e3e3e3";
|
||||||
export const WILD_SAND_COLOR = "#f5f5f5";
|
export const WILD_SAND_COLOR = "#f5f5f5";
|
||||||
export const MYSTIC_COLOR = "#eaeff2";
|
export const MYSTIC_COLOR = "#eaeff2";
|
||||||
export const ICON_GREEN_COLOR = "#8fd13f";
|
export const ICON_GREEN_COLOR = "#8fd13f";
|
||||||
export const PRIMARY_GREEN_COLOR = "#8fd13f";
|
|
||||||
export const PRIMARY_HOVER_COLOR = "#75b22b";
|
|
||||||
export const NOTIFICATION_YES = "#5a8921";
|
export const NOTIFICATION_YES = "#5a8921";
|
||||||
export const NOTIFICATION_YES_BORDER = "#4d751c";
|
export const NOTIFICATION_YES_BORDER = "#4d751c";
|
||||||
export const SIDEBAR_HOVER_GRAY_COLOR = "#D2D2D2";
|
export const SIDEBAR_HOVER_GRAY_COLOR = "#D2D2D2";
|
||||||
|
|
|
@ -83,12 +83,14 @@ export function changeAssignmentsNotification(status) {
|
||||||
payload: status
|
payload: status
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function changeAssignmentsNotificationEmail(status) {
|
export function changeAssignmentsNotificationEmail(status) {
|
||||||
return {
|
return {
|
||||||
type: CHANGE_ASSIGNMENTS_NOTIFICATION_EMAIL,
|
type: CHANGE_ASSIGNMENTS_NOTIFICATION_EMAIL,
|
||||||
payload: status
|
payload: status
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function changeRecentNotification(status) {
|
export function changeRecentNotification(status) {
|
||||||
return {
|
return {
|
||||||
type: CHANGE_RECENT_NOTIFICATION,
|
type: CHANGE_RECENT_NOTIFICATION,
|
||||||
|
|
|
@ -4,11 +4,7 @@ import styled from "styled-components";
|
||||||
import { FormattedMessage } from "react-intl";
|
import { FormattedMessage } from "react-intl";
|
||||||
import { FormGroup, FormControl, ControlLabel, Button } from "react-bootstrap";
|
import { FormGroup, FormControl, ControlLabel, Button } from "react-bootstrap";
|
||||||
|
|
||||||
import {
|
import { BORDER_LIGHT_COLOR } from "../../../../app/constants/colors";
|
||||||
BORDER_LIGHT_COLOR,
|
|
||||||
PRIMARY_GREEN_COLOR,
|
|
||||||
PRIMARY_HOVER_COLOR
|
|
||||||
} from "../../../../app/constants/colors";
|
|
||||||
|
|
||||||
const StyledInputEnabled = styled.div`
|
const StyledInputEnabled = styled.div`
|
||||||
border: 1px solid ${BORDER_LIGHT_COLOR};
|
border: 1px solid ${BORDER_LIGHT_COLOR};
|
||||||
|
@ -18,15 +14,6 @@ const StyledInputEnabled = styled.div`
|
||||||
input {
|
input {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary {
|
|
||||||
background-color: ${PRIMARY_GREEN_COLOR};
|
|
||||||
border-color: ${PRIMARY_HOVER_COLOR};
|
|
||||||
margin-right: 7px;
|
|
||||||
&:hover {
|
|
||||||
background-color: ${PRIMARY_HOVER_COLOR};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const ErrorMsg = styled.div`color: red;`;
|
const ErrorMsg = styled.div`color: red;`;
|
||||||
|
|
|
@ -47,12 +47,12 @@ const MyLinkContainer = styled(LinkContainer)`
|
||||||
const SettingsLeftTab = () =>
|
const SettingsLeftTab = () =>
|
||||||
<Nav bsStyle="pills" stacked activeKey={1}>
|
<Nav bsStyle="pills" stacked activeKey={1}>
|
||||||
<MyLinkContainer to={SETTINGS_ACCOUNT_PROFILE}>
|
<MyLinkContainer to={SETTINGS_ACCOUNT_PROFILE}>
|
||||||
<NavItem eventKey={1}>
|
<NavItem>
|
||||||
<FormattedMessage id="settings_page.profile" />
|
<FormattedMessage id="settings_page.profile" />
|
||||||
</NavItem>
|
</NavItem>
|
||||||
</MyLinkContainer>
|
</MyLinkContainer>
|
||||||
<MyLinkContainer to={SETTINGS_ACCOUNT_PREFERENCES}>
|
<MyLinkContainer to={SETTINGS_ACCOUNT_PREFERENCES}>
|
||||||
<NavItem eventKey={2}>
|
<NavItem>
|
||||||
<FormattedMessage id="settings_page.preferences" />
|
<FormattedMessage id="settings_page.preferences" />
|
||||||
</NavItem>
|
</NavItem>
|
||||||
</MyLinkContainer>
|
</MyLinkContainer>
|
||||||
|
|
|
@ -6,11 +6,7 @@ import TimezonePicker from "react-bootstrap-timezone-picker";
|
||||||
import "react-bootstrap-timezone-picker/dist/react-bootstrap-timezone-picker.min.css";
|
import "react-bootstrap-timezone-picker/dist/react-bootstrap-timezone-picker.min.css";
|
||||||
import { FormattedMessage } from "react-intl";
|
import { FormattedMessage } from "react-intl";
|
||||||
|
|
||||||
import {
|
import { BORDER_LIGHT_COLOR } from "../../../../../app/constants/colors";
|
||||||
BORDER_LIGHT_COLOR,
|
|
||||||
PRIMARY_GREEN_COLOR,
|
|
||||||
PRIMARY_HOVER_COLOR
|
|
||||||
} from "../../../../../app/constants/colors";
|
|
||||||
|
|
||||||
const Wrapper = styled.div`
|
const Wrapper = styled.div`
|
||||||
border: 1px solid ${BORDER_LIGHT_COLOR};
|
border: 1px solid ${BORDER_LIGHT_COLOR};
|
||||||
|
@ -24,15 +20,6 @@ const Wrapper = styled.div`
|
||||||
.settings-warning {
|
.settings-warning {
|
||||||
margin-bottom: 15px;
|
margin-bottom: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn-primary {
|
|
||||||
background-color: ${PRIMARY_GREEN_COLOR};
|
|
||||||
border-color: ${PRIMARY_HOVER_COLOR};
|
|
||||||
margin-right: 7px;
|
|
||||||
&:hover {
|
|
||||||
background-color: ${PRIMARY_HOVER_COLOR};
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`;
|
`;
|
||||||
|
|
||||||
class InputTimezone extends Component {
|
class InputTimezone extends Component {
|
||||||
|
|
|
@ -35,6 +35,7 @@ $color-candlelight: #ffda23;
|
||||||
$color-orange: #ff900b;
|
$color-orange: #ff900b;
|
||||||
$color-saturated-green: #008600;
|
$color-saturated-green: #008600;
|
||||||
$color-blue-yadcf: #337ab7;
|
$color-blue-yadcf: #337ab7;
|
||||||
|
$primary-hover-color: #75b22b;
|
||||||
|
|
||||||
// Red colors
|
// Red colors
|
||||||
$color-mojo: #cf4b48;
|
$color-mojo: #cf4b48;
|
||||||
|
|
|
@ -7,6 +7,15 @@ body {
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.btn-primary {
|
||||||
|
background-color: $color-theme-secondary;
|
||||||
|
border-color: $primary-hover-color;
|
||||||
|
margin-right: 7px;
|
||||||
|
&:hover {
|
||||||
|
background-color: $primary-hover-color;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.time-zone-container {
|
.time-zone-container {
|
||||||
background: $color-white;
|
background: $color-white;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
Loading…
Add table
Reference in a new issue