work on compose view

pull/712/head
Audric Ackermann 6 years ago
parent f613f27ee3
commit 28a27711e1

@ -2408,6 +2408,9 @@
"Users can share their Session ID by going into their account settings and clicking \"Share Public Key\"." "Users can share their Session ID by going into their account settings and clicking \"Share Public Key\"."
}, },
"searchByIDOrDisplayName": { "searchByIDOrDisplayName": {
"message": "Search by ID # or DIsplay Name" "message": "Search by ID # or Display Name"
},
"message": {
"message": "Message"
} }
} }

@ -52,6 +52,7 @@ $session-shade-14: #535865;
$session-shade-15: #5b6c72; $session-shade-15: #5b6c72;
$session-shade-16: #979797; $session-shade-16: #979797;
$session-shade-17: #d8d8d8; $session-shade-17: #d8d8d8;
$session-shade-18: #141414;
$session-opaque-dark-1: rgba(0, 0, 0, 0.25); $session-opaque-dark-1: rgba(0, 0, 0, 0.25);
$session-opaque-dark-2: rgba(0, 0, 0, 0.37); $session-opaque-dark-2: rgba(0, 0, 0, 0.37);
@ -109,8 +110,15 @@ div.spacer-lg {
.fullwidth { .fullwidth {
width: 100%; width: 100%;
} }
@mixin session-dark-background-gradient {
background: linear-gradient(90deg, #121212 100%, #171717 0%) !important; @mixin session-dark-background {
background-color: $session-shade-2 !important;
}
@mixin session-dark-background-lighter {
background-color: $session-shade-18 !important;
}
@mixin session-dark-background-hover {
background-color: $session-shade-7 !important;
} }
$session-transition-duration: 0.25s; $session-transition-duration: 0.25s;

@ -1,8 +1,8 @@
.session { .session {
&-fullscreen { &-fullscreen {
@include session-dark-background;
overflow-y: auto; overflow-y: auto;
height: 100%; height: 100%;
background: linear-gradient(90deg, #121212 100%, #171717 0%);
} }
&-content { &-content {
@ -102,17 +102,10 @@
@mixin registration-label-mixin { @mixin registration-label-mixin {
color: $session-color-white; color: $session-color-white;
text-align: center; font-weight: bold;
font-size: 17px;
font-weight: 700;
line-height: 17px;
padding: 12px; padding: 12px;
} }
&__or {
@include registration-label-mixin;
}
&__welcome-session { &__welcome-session {
@include registration-label-mixin; @include registration-label-mixin;
font-size: 12px; font-size: 12px;

@ -88,3 +88,9 @@ h3 {
font-size: 18px; font-size: 18px;
padding-top: 22px; padding-top: 22px;
} }
h4 {
@include session-h-title;
font-size: 17px;
text-align: center;
}

@ -1,8 +1,8 @@
.dark-theme { .dark-theme {
.module-conversation-list-item { .module-conversation-list-item {
background-color: $session-shade-4; @include session-dark-background-lighter;
&:hover { &:hover {
background-color: $session-shade-11; @include session-dark-background-hover;
} }
} }
.gutter { .gutter {
@ -69,7 +69,7 @@
} }
} }
.inbox { .inbox {
@include session-dark-background-gradient; @include session-dark-background;
} }
.module-left-pane { .module-left-pane {
@ -112,7 +112,10 @@
} }
&-compose { &-compose {
@include session-dark-background-gradient; @include session-dark-background-lighter;
display: flex;
flex-direction: column;
align-items: center;
height: -webkit-fill-available; height: -webkit-fill-available;
.session-icon .exit { .session-icon .exit {
padding: 13px; padding: 13px;
@ -128,28 +131,54 @@
} }
&-border-container { &-border-container {
width: -webkit-fill-available;
position: relative; position: relative;
margin-bottom: 50px; margin-bottom: 50px;
.green {
position: absolute;
color: $session-color-green;
background-color: $session-color-green;
height: 6px;
width: 130px;
left: 50%;
margin-left: -65px;
top: 50%;
margin-top: 6px;
}
.white {
position: absolute;
color: none;
height: 1px;
width: -webkit-fill-available;
opacity: 0.3;
}
}
.exit {
margin-top: 10px;
margin-left: 13px;
align-self: flex-start;
}
.session-search-input {
margin: 10px 20px;
width: -webkit-fill-available;
}
.session-description-long {
font-size: 14px;
margin: 0px 20px;
} }
.white { .session-id-editable {
position: absolute; margin: 0px 20px;
color: none;
height: 1px;
width: -webkit-fill-available; width: -webkit-fill-available;
opacity: 0.3;
} }
.green { .session-button {
position: absolute; width: fit-content;
color: $session-color-green; margin-top: auto;
background-color: $session-color-green; margin-bottom: 16px;
height: 6px;
width: 130px;
left: 50%;
margin-left: -65px;
top: 50%;
margin-top: 6px;
} }
} }
} }
@ -188,5 +217,5 @@
} }
.app-loading-screen { .app-loading-screen {
@include session-dark-background-gradient; @include session-dark-background;
} }

@ -9,8 +9,12 @@ import {
PropsData as SearchResultsProps, PropsData as SearchResultsProps,
SearchResults, SearchResults,
} from '../SearchResults'; } from '../SearchResults';
import { SessionButton } from './SessionButton'; import {
import { SessionConversationSearch } from './SessionConversationSearch'; SessionButton,
SessionButtonColor,
SessionButtonType,
} from './SessionButton';
import { SessionSearchInput } from './SessionSearchInput';
import { debounce } from 'lodash'; import { debounce } from 'lodash';
import { cleanSearchTerm } from '../../util/cleanSearchTerm'; import { cleanSearchTerm } from '../../util/cleanSearchTerm';
import { SearchOptions } from '../../types/Search'; import { SearchOptions } from '../../types/Search';
@ -194,11 +198,13 @@ export class LeftPaneMessageSection extends React.Component<Props, any> {
public renderCompose(): JSX.Element { public renderCompose(): JSX.Element {
return ( return (
<div className="module-left-pane-compose"> <div className="module-left-pane-compose">
<SessionIconButton <div className="exit">
iconSize={SessionIconSize.Small} <SessionIconButton
iconType={SessionIconType.Exit} iconSize={SessionIconSize.Small}
onClick={this.handleComposeClick} iconType={SessionIconType.Exit}
/> onClick={this.handleComposeClick}
/>
</div>
<h2>{window.i18n('enterRecipient')}</h2> <h2>{window.i18n('enterRecipient')}</h2>
<h3>{window.i18n('enterSessionID')}</h3> <h3>{window.i18n('enterSessionID')}</h3>
<div className="module-left-pane-compose-border-container"> <div className="module-left-pane-compose-border-container">
@ -214,6 +220,17 @@ export class LeftPaneMessageSection extends React.Component<Props, any> {
<div className="session-description-long"> <div className="session-description-long">
{window.i18n('usersCanShareTheir...')} {window.i18n('usersCanShareTheir...')}
</div> </div>
<h4>{window.i18n('or')}</h4>
<SessionSearchInput
searchString={this.props.searchTerm}
onChange={this.updateSearchBound}
placeholder={window.i18n('searchByIDOrDisplayName')}
/>
<SessionButton
buttonColor={SessionButtonColor.Green}
buttonType={SessionButtonType.BrandOutline}
text={window.i18n('message')}
/>
</div> </div>
); );
} }
@ -221,9 +238,10 @@ export class LeftPaneMessageSection extends React.Component<Props, any> {
public renderConversations() { public renderConversations() {
return ( return (
<div> <div>
<SessionConversationSearch <SessionSearchInput
searchString={this.props.searchTerm} searchString={this.props.searchTerm}
onChange={this.updateSearchBound} onChange={this.updateSearchBound}
placeholder={window.i18n('searchForAKeyPhrase')}
/> />
{this.renderList()} {this.renderList()}
</div> </div>

@ -475,7 +475,7 @@ export class RegistrationTabs extends React.Component<{}, State> {
SessionButtonType.BrandOutline, SessionButtonType.BrandOutline,
SessionButtonColor.Green SessionButtonColor.Green
)} )}
<div className="session-registration__or">{or}</div> <h4>{or}</h4>
{this.renderLinkDeviceToExistingAccountButton()} {this.renderLinkDeviceToExistingAccountButton()}
</div> </div>
); );
@ -485,7 +485,7 @@ export class RegistrationTabs extends React.Component<{}, State> {
return ( return (
<div> <div>
{this.renderContinueYourSessionButton()} {this.renderContinueYourSessionButton()}
<div className="session-registration__or">{or}</div> <h4>{or}</h4>
{this.renderRestoreUsingSeedButton( {this.renderRestoreUsingSeedButton(
SessionButtonType.BrandOutline, SessionButtonType.BrandOutline,
SessionButtonColor.Green SessionButtonColor.Green
@ -497,7 +497,7 @@ export class RegistrationTabs extends React.Component<{}, State> {
return ( return (
<div> <div>
{this.renderContinueYourSessionButton()} {this.renderContinueYourSessionButton()}
<div className="session-registration__or">{or}</div> <h4>{or}</h4>
{this.renderLinkDeviceToExistingAccountButton()} {this.renderLinkDeviceToExistingAccountButton()}
</div> </div>
); );

@ -4,9 +4,10 @@ import { SessionIconButton, SessionIconSize, SessionIconType } from './icon';
interface Props { interface Props {
searchString: string; searchString: string;
onChange: any; onChange: any;
placeholder: string;
} }
export class SessionConversationSearch extends React.Component<Props> { export class SessionSearchInput extends React.Component<Props> {
public constructor(props: Props) { public constructor(props: Props) {
super(props); super(props);
} }
@ -23,7 +24,7 @@ export class SessionConversationSearch extends React.Component<Props> {
<input <input
value={searchString} value={searchString}
onChange={e => this.props.onChange(e.target.value)} onChange={e => this.props.onChange(e.target.value)}
placeholder={window.i18n('searchForAKeyPhrase')} placeholder={this.props.placeholder}
/> />
</div> </div>
); );
Loading…
Cancel
Save