Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
Sekhmet committed Aug 14, 2018
2 parents c861ce0 + 1bbd8c9 commit d85beaf
Show file tree
Hide file tree
Showing 77 changed files with 1,001 additions and 45 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "busy",
"version": "2.5.4",
"version": "2.5.5",
"engines": {
"node": ">=7.10.1",
"npm": "=5.3.0"
Expand Down
15 changes: 10 additions & 5 deletions src/client/Wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,14 @@ export default class Wrapper extends React.PureComponent {
}
}

componentDidUpdate() {
if (this.props.nightmode) {
document.body.classList.add('nightmode');
} else {
document.body.classList.remove('nightmode');
}
}

async loadLocale(locale) {
let activeLocale = locale;
if (activeLocale === 'auto') {
Expand Down Expand Up @@ -205,17 +213,14 @@ export default class Wrapper extends React.PureComponent {
}

render() {
const { user, usedLocale, translations, nightmode } = this.props;
const { user, usedLocale, translations } = this.props;

const language = findLanguage(usedLocale);

return (
<IntlProvider key={language.id} locale={language.localeData} messages={translations}>
<LocaleProvider locale={enUS}>
<Layout
className={nightmode ? 'dark' : ''}
data-dir={language && language.rtl ? 'rtl' : 'ltr'}
>
<Layout data-dir={language && language.rtl ? 'rtl' : 'ltr'}>
<Layout.Header style={{ position: 'fixed', width: '100%', zIndex: 1050 }}>
<Topnav username={user.name} onMenuItemClick={this.handleMenuItemClick} />
</Layout.Header>
Expand Down
72 changes: 72 additions & 0 deletions src/client/activity/UserActivityActions-nightmode.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
@import (reference) '../styles/custom.less';
@import (reference) '../styles/mixins.less';
@import (reference) '../styles/modules/variables.less';

.nightmode {
.UserActivityActions {
background-color: @grey-nero;

&__action {
color: @grey-nightRider;
border-bottom: @border-width-base @border-style-base @normal-grey;

&:nth-of-type(2) {
border-top: @border-width-base @border-style-base @normal-grey;
}

@media @small {
border-right: @border-width-base @border-style-base @normal-grey;
border-left: @border-width-base @border-style-base @normal-grey;
}
}

&__loader {
border-bottom: @border-width-base @border-style-base @normal-grey;

@media @small {
border-right: @border-width-base @border-style-base @normal-grey;
border-left: @border-width-base @border-style-base @normal-grey;
}
}

&__icon {
&__container {
color: @blue-heather;
background-color: @blue-solitude;
}
}

&__content {
&__message {
color: @white-gainsboro;
}
}

&__contents {
background: @grey-gondola;
border: @border-width-base @border-style-base @normal-grey;
color: @blue-heather;

&__item {
border: @border-width-base @border-style-base @normal-grey;
}

&__value {
border-top: @border-width-base @border-style-base @normal-grey;
}

&__label {
background: @grey-gondola;
border-top: @border-width-base @border-style-base @normal-grey;
}
}

@media @small {
&__contents {
&__label {
border-top: @border-width-base @border-style-base @normal-grey;
}
}
}
}
}
2 changes: 2 additions & 0 deletions src/client/activity/UserActivityActions.less
Original file line number Diff line number Diff line change
Expand Up @@ -191,3 +191,5 @@ div[data-dir='rtl'] .UserActivityActions {
padding-right: 10px;
}
}

@import 'UserActivityActions-nightmode';
23 changes: 23 additions & 0 deletions src/client/activity/UserActivitySearch-nightmode.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@import (reference) '../styles/custom.less';

.nightmode {
.UserActivitySearch {
&__filters {
&__title {
color: @white-smoke;

&__icon {
color: @blue-botticelli;
}
}

&__content {
color: @grey-mortar;
}

&__divider {
background-color: @white-gainsboro;
}
}
}
}
2 changes: 2 additions & 0 deletions src/client/activity/UserActivitySearch.less
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,5 @@ div[data-dir='rtl'] .UserActivitySearch {
}
}
}

@import 'UserActivitySearch-nightmode';
7 changes: 7 additions & 0 deletions src/client/components/Avatar-nightmode.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@import (reference) '../styles/custom.less';

.nightmode {
.Avatar {
border: @border-width-base @border-style-base @normal-grey;
}
}
2 changes: 2 additions & 0 deletions src/client/components/Avatar.less
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,5 @@
background-position: 50% 50%;
border: @base-border;
}

@import 'Avatar-nightmode';
3 changes: 3 additions & 0 deletions src/client/components/BBackTop.less
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,9 @@
line-height: 40px;
background-color: white;
border-radius: 50%;
height: 37px;
display: block;
width: 37px;

&:hover {
color: @blue-navyBlue !important;
Expand Down
9 changes: 9 additions & 0 deletions src/client/components/Editor/Editor-nightmode.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
@import (reference) '../../styles/custom.less';

.nightmode {
.Editor {
&__label {
color: @white-smoke;
}
}
}
2 changes: 2 additions & 0 deletions src/client/components/Editor/Editor.less
Original file line number Diff line number Diff line change
Expand Up @@ -120,3 +120,5 @@ div[data-dir='rtl'] .Editor {
float: left;
}
}

@import 'Editor-nightmode';
23 changes: 23 additions & 0 deletions src/client/components/Editor/EditorToolbar-nightmode.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
@import (reference) '../../styles/custom.less';
@import (reference) '../../styles/modules/variables.less';

.nightmode {
.EditorToolbar {
background: @grey-nero;

&__button {
background: @grey-nero;
color: @blue-heather;
&:hover {
background: @normal-grey;
color: @white-smoke;
}
}
}

.EditorToolbar__container {
border: @border-width-base @border-style-base @normal-grey;
border-bottom: 0;
background: @grey-nero;
}
}
2 changes: 2 additions & 0 deletions src/client/components/Editor/EditorToolbar.less
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,5 @@
overflow-y: hidden !important;
background: @component-background;
}

@import 'EditorToolbar-nightmode';
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
@import (reference) '../../../styles/custom.less';

.nightmode {
.Notification {
background-color: @grey-nero;
border-bottom: @border-width-base @border-style-base @normal-grey;

&--unread {
background-color: #32373c;
}

&__text {
&__message {
color: @grey-darkGrey;
}
}

&__empty {
border-bottom: @base-border;
color: @black;
justify-content: center;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@
border-bottom: 0 !important;
}
}

@import 'Notification-nightmode';
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
@import (reference) '../../../styles/custom.less';
@import (reference) '../../../styles/modules/variables.less';

.nightmode {
.Notifications {
&__footer {
border-top: @border-width-base @border-style-base @normal-grey;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,5 @@
}
}
}

@import 'Notifications-nightmode';
22 changes: 22 additions & 0 deletions src/client/components/Navigation/Sidenav-nightmode.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
@import (reference) '../../styles/custom.less';

.nightmode {
.Sidenav {
& > li {
& > a {
&:hover {
color: @white-smoke;
}
}
}
}

.Sidenav__item--active {
background: @grey-nero;
border: @border-width-base @border-style-base @normal-grey !important;
color: @white-smoke !important;
& > i {
color: @primary-color;
}
}
}
2 changes: 2 additions & 0 deletions src/client/components/Navigation/Sidenav.less
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,5 @@ div[data-dir='rtl'] .Sidenav {
color: @primary-color;
}
}

@import 'Sidenav-nightmode';
37 changes: 0 additions & 37 deletions src/client/components/Navigation/Topnav-dark.less

This file was deleted.

Loading

0 comments on commit d85beaf

Please sign in to comment.