Some style and interaction fine-tuning
This commit is contained in:
parent
a900792a06
commit
aab2a57b48
12 changed files with 107 additions and 109 deletions
|
@ -551,6 +551,16 @@
|
||||||
"description":
|
"description":
|
||||||
"Shown in toast when user attempts to send .exe file, for example"
|
"Shown in toast when user attempts to send .exe file, for example"
|
||||||
},
|
},
|
||||||
|
"stagedImageAttachment": {
|
||||||
|
"message": "Staged image attachment: $path$",
|
||||||
|
"description": "Alt text for staged attachments",
|
||||||
|
"placeholders": {
|
||||||
|
"path": {
|
||||||
|
"content": "$1",
|
||||||
|
"example": "dog.jpg"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"maxOneAttachmentToast": {
|
"maxOneAttachmentToast": {
|
||||||
"message": "The limit is one attachment per message.",
|
"message": "The limit is one attachment per message.",
|
||||||
"description":
|
"description":
|
||||||
|
|
|
@ -263,7 +263,6 @@ MessageReceiver.prototype.extend({
|
||||||
// We do the message decryption here, instead of in the ordered pending queue,
|
// We do the message decryption here, instead of in the ordered pending queue,
|
||||||
// to avoid exposing the time it took us to process messages through the time-to-ack.
|
// to avoid exposing the time it took us to process messages through the time-to-ack.
|
||||||
|
|
||||||
// TODO: handle different types of requests.
|
|
||||||
if (request.path !== '/api/v1/message') {
|
if (request.path !== '/api/v1/message') {
|
||||||
window.log.info('got request', request.verb, request.path);
|
window.log.info('got request', request.verb, request.path);
|
||||||
request.respond(200, 'OK');
|
request.respond(200, 'OK');
|
||||||
|
|
|
@ -184,15 +184,10 @@
|
||||||
// things in the composition area. A margin on an inner div won't be included in that
|
// things in the composition area. A margin on an inner div won't be included in that
|
||||||
// height calculation.
|
// height calculation.
|
||||||
.bottom-bar .quote-wrapper {
|
.bottom-bar .quote-wrapper {
|
||||||
margin-right: 5px;
|
|
||||||
margin-bottom: 6px;
|
|
||||||
margin-top: 3px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.send .quote-wrapper {
|
|
||||||
margin-left: 37px;
|
margin-left: 37px;
|
||||||
margin-right: 73px;
|
margin-right: 73px;
|
||||||
margin-bottom: 5px;
|
margin-top: 3px;
|
||||||
|
margin-bottom: -5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom-bar {
|
.bottom-bar {
|
||||||
|
@ -206,6 +201,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
form.send {
|
form.send {
|
||||||
|
margin-bottom: 0px;
|
||||||
background: $color-white;
|
background: $color-white;
|
||||||
|
|
||||||
&.video-attachment {
|
&.video-attachment {
|
||||||
|
@ -277,6 +273,7 @@
|
||||||
display: block;
|
display: block;
|
||||||
max-height: 100px;
|
max-height: 100px;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
|
margin-top: 3px;
|
||||||
margin-bottom: 6px;
|
margin-bottom: 6px;
|
||||||
border-radius: 20px;
|
border-radius: 20px;
|
||||||
background-color: $color-light-02;
|
background-color: $color-light-02;
|
||||||
|
|
|
@ -88,8 +88,10 @@ button.emoji {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
border: none;
|
border: none;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
|
margin-top: 3px;
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
|
margin-top: 4px;
|
||||||
content: '';
|
content: '';
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: $button-height;
|
width: $button-height;
|
||||||
|
@ -114,7 +116,6 @@ button.emoji {
|
||||||
|
|
||||||
.emoji-panel-container {
|
.emoji-panel-container {
|
||||||
height: 0px;
|
height: 0px;
|
||||||
margin-bottom: 3px;
|
|
||||||
|
|
||||||
.ep-emojies {
|
.ep-emojies {
|
||||||
background-color: $color-white;
|
background-color: $color-white;
|
||||||
|
|
|
@ -108,8 +108,10 @@ a {
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
border: none;
|
border: none;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
|
margin-top: 2px;
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
|
margin-top: 4px;
|
||||||
content: '';
|
content: '';
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
width: $button-height;
|
width: $button-height;
|
||||||
|
|
|
@ -31,11 +31,13 @@
|
||||||
|
|
||||||
float: left;
|
float: left;
|
||||||
width: 300px;
|
width: 300px;
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
overflow-y: scroll;
|
overflow-y: scroll;
|
||||||
max-height: calc(100% - 88px);
|
max-height: calc(100% - 88px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.network-status-container {
|
.network-status-container {
|
||||||
.network-status {
|
.network-status {
|
||||||
background: url('../images/error_red.svg') no-repeat left 10px center;
|
background: url('../images/error_red.svg') no-repeat left 10px center;
|
||||||
|
|
|
@ -784,6 +784,7 @@
|
||||||
flex: initial;
|
flex: initial;
|
||||||
min-width: 54px;
|
min-width: 54px;
|
||||||
width: 54px;
|
width: 54px;
|
||||||
|
max-height: 54px;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
img {
|
img {
|
||||||
|
@ -2297,7 +2298,7 @@
|
||||||
height: 20px;
|
height: 20px;
|
||||||
|
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
@include color-svg('../images/x-16.svg', $color-black);
|
@include color-svg('../images/x.svg', $color-black);
|
||||||
}
|
}
|
||||||
|
|
||||||
.module-attachments__rail {
|
.module-attachments__rail {
|
||||||
|
@ -2412,10 +2413,10 @@
|
||||||
|
|
||||||
top: 12px;
|
top: 12px;
|
||||||
right: 16px;
|
right: 16px;
|
||||||
width: 24px;
|
width: 30px;
|
||||||
height: 24px;
|
height: 30px;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
@include color-svg('../images/x-16.svg', $color-white);
|
@include color-svg('../images/x.svg', $color-white);
|
||||||
}
|
}
|
||||||
|
|
||||||
.module-caption-editor__media-container {
|
.module-caption-editor__media-container {
|
||||||
|
@ -2488,6 +2489,10 @@
|
||||||
&::placeholder {
|
&::placeholder {
|
||||||
color: $color-white-07;
|
color: $color-white-07;
|
||||||
}
|
}
|
||||||
|
&:focus {
|
||||||
|
border: 1px solid $color-signal-blue;
|
||||||
|
outline: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Third-party module: react-contextmenu
|
// Third-party module: react-contextmenu
|
||||||
|
|
|
@ -9,6 +9,7 @@
|
||||||
background: transparent;
|
background: transparent;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
border: none;
|
border: none;
|
||||||
|
margin-top: 2px;
|
||||||
|
|
||||||
&:focus,
|
&:focus,
|
||||||
&:hover {
|
&:hover {
|
||||||
|
@ -16,6 +17,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
&:before {
|
&:before {
|
||||||
|
margin-top: 4px;
|
||||||
content: '';
|
content: '';
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 24px;
|
height: 24px;
|
||||||
|
@ -36,6 +38,7 @@
|
||||||
opacity: 0.5;
|
opacity: 0.5;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
margin-top: 5px;
|
||||||
|
|
||||||
&:focus,
|
&:focus,
|
||||||
&:hover {
|
&:hover {
|
||||||
|
|
|
@ -230,50 +230,6 @@ body.dark-theme {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.dropoff {
|
|
||||||
outline: solid 1px $blue;
|
|
||||||
}
|
|
||||||
|
|
||||||
.avatar {
|
|
||||||
color: $color-white;
|
|
||||||
background-color: $grey;
|
|
||||||
}
|
|
||||||
|
|
||||||
.group-info-input {
|
|
||||||
background: $color-white;
|
|
||||||
|
|
||||||
.thumbnail:after {
|
|
||||||
border-bottom: 10px solid $grey;
|
|
||||||
border-left: 10px solid transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
input.name {
|
|
||||||
border: solid 1px #ccc;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.group-member-list,
|
|
||||||
.new-group-update {
|
|
||||||
.members .contact {
|
|
||||||
border-bottom: 1px solid $color-dark-60;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.banner {
|
|
||||||
// what's the right color?
|
|
||||||
background-color: $blue_l;
|
|
||||||
color: black;
|
|
||||||
box-shadow: 0px 3px 5px 0px rgba(0, 0, 0, 0.2);
|
|
||||||
|
|
||||||
.warning {
|
|
||||||
@include color-svg('../images/warning.svg', black);
|
|
||||||
}
|
|
||||||
|
|
||||||
.dismiss {
|
|
||||||
@include color-svg('../images/x.svg', black);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.contact-details {
|
.contact-details {
|
||||||
.number {
|
.number {
|
||||||
color: $color-dark-30;
|
color: $color-dark-30;
|
||||||
|
@ -318,15 +274,6 @@ body.dark-theme {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
input[type='text'],
|
|
||||||
input[type='search'],
|
|
||||||
textarea {
|
|
||||||
&:active,
|
|
||||||
&:focus {
|
|
||||||
outline: 1px solid $blue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.expiredAlert {
|
.expiredAlert {
|
||||||
background: #f3f3a7;
|
background: #f3f3a7;
|
||||||
|
|
||||||
|
@ -714,14 +661,9 @@ body.dark-theme {
|
||||||
}
|
}
|
||||||
|
|
||||||
.module-message__generic-attachment__icon {
|
.module-message__generic-attachment__icon {
|
||||||
// TODO: this will eventually be a different image
|
|
||||||
// background: url('../images/file-gradient.svg') no-repeat center;
|
// background: url('../images/file-gradient.svg') no-repeat center;
|
||||||
}
|
}
|
||||||
|
|
||||||
.module-message__generic-attachment__icon__extension {
|
|
||||||
// TODO: probably need color
|
|
||||||
}
|
|
||||||
|
|
||||||
.module-message__generic-attachment__file-name {
|
.module-message__generic-attachment__file-name {
|
||||||
color: $color-dark-05;
|
color: $color-dark-05;
|
||||||
}
|
}
|
||||||
|
@ -1012,10 +954,6 @@ body.dark-theme {
|
||||||
@include color-svg('../images/movie.svg', $color-signal-blue);
|
@include color-svg('../images/movie.svg', $color-signal-blue);
|
||||||
}
|
}
|
||||||
|
|
||||||
.module-quote__generic-file__icon {
|
|
||||||
// TODO: this will eventually be a different icon
|
|
||||||
// background: url('../images/file-gradient.svg');
|
|
||||||
}
|
|
||||||
.module-quote__generic-file__text {
|
.module-quote__generic-file__text {
|
||||||
color: $color-dark-05;
|
color: $color-dark-05;
|
||||||
}
|
}
|
||||||
|
@ -1368,6 +1306,10 @@ body.dark-theme {
|
||||||
color: $color-dark-05;
|
color: $color-dark-05;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Module: Image
|
||||||
|
|
||||||
|
// Module: Image Grid
|
||||||
|
|
||||||
// Module: Typing Animation
|
// Module: Typing Animation
|
||||||
|
|
||||||
.module-typing-animation__dot {
|
.module-typing-animation__dot {
|
||||||
|
@ -1378,6 +1320,36 @@ body.dark-theme {
|
||||||
background-color: $color-white;
|
background-color: $color-white;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Module: Attachments
|
||||||
|
|
||||||
|
.module-attachments {
|
||||||
|
border-top: 1px solid $color-gray-75;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-attachments__close-button {
|
||||||
|
@include color-svg('../images/x.svg', $color-gray-45);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Module: Staged Generic Attachment
|
||||||
|
|
||||||
|
.module-staged-generic-attachment {
|
||||||
|
box-shadow: inset 0px 0px 0px 1px $color-gray-45;
|
||||||
|
background-color: $color-gray-75;
|
||||||
|
color: $color-dark-05;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-staged-generic-attachment__close-button {
|
||||||
|
@include color-svg('../images/x.svg', $color-gray-45);
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-staged-generic-attachment__icon {
|
||||||
|
background: url('../images/file-gradient.svg') no-repeat center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.module-staged-generic-attachment__icon__extension {
|
||||||
|
color: $color-gray-90;
|
||||||
|
}
|
||||||
|
|
||||||
// Third-party module: react-contextmenu
|
// Third-party module: react-contextmenu
|
||||||
|
|
||||||
.react-contextmenu {
|
.react-contextmenu {
|
||||||
|
|
|
@ -9,18 +9,19 @@ const attachments = [
|
||||||
height: 240,
|
height: 240,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
<util.ConversationContext theme={util.theme}>
|
||||||
<AttachmentList
|
<AttachmentList
|
||||||
attachments={attachments}
|
attachments={attachments}
|
||||||
onClose={() => console.log('onClose')}
|
onClose={() => console.log('onClose')}
|
||||||
onClickAttachment={attachment => {
|
onClickAttachment={attachment => {
|
||||||
console.log('onClickAttachment', attachment);
|
console.log('onClickAttachment', attachment);
|
||||||
}}
|
}}
|
||||||
onCloseAttachment={attachment => {
|
onCloseAttachment={attachment => {
|
||||||
console.log('onCloseAttachment', attachment);
|
console.log('onCloseAttachment', attachment);
|
||||||
}}
|
}}
|
||||||
i18n={util.i18n}
|
i18n={util.i18n}
|
||||||
/>;
|
/>;
|
||||||
|
</util.ConversationContext>;
|
||||||
```
|
```
|
||||||
|
|
||||||
### Four images
|
### Four images
|
||||||
|
@ -53,7 +54,7 @@ const attachments = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
<div>
|
<util.ConversationContext theme={util.theme}>
|
||||||
<AttachmentList
|
<AttachmentList
|
||||||
attachments={attachments}
|
attachments={attachments}
|
||||||
onClose={() => console.log('onClose')}
|
onClose={() => console.log('onClose')}
|
||||||
|
@ -65,7 +66,7 @@ const attachments = [
|
||||||
}}
|
}}
|
||||||
i18n={util.i18n}
|
i18n={util.i18n}
|
||||||
/>
|
/>
|
||||||
</div>;
|
</util.ConversationContext>;
|
||||||
```
|
```
|
||||||
|
|
||||||
### A mix of attachment types
|
### A mix of attachment types
|
||||||
|
@ -90,7 +91,7 @@ const attachments = [
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
<div>
|
<util.ConversationContext theme={util.theme}>
|
||||||
<AttachmentList
|
<AttachmentList
|
||||||
attachments={attachments}
|
attachments={attachments}
|
||||||
onClose={() => console.log('onClose')}
|
onClose={() => console.log('onClose')}
|
||||||
|
@ -102,7 +103,7 @@ const attachments = [
|
||||||
}}
|
}}
|
||||||
i18n={util.i18n}
|
i18n={util.i18n}
|
||||||
/>
|
/>
|
||||||
</div>;
|
</util.ConversationContext>;
|
||||||
```
|
```
|
||||||
|
|
||||||
### No attachments provided
|
### No attachments provided
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
// import classNames from 'classnames';
|
|
||||||
|
|
||||||
import {
|
import {
|
||||||
isImageTypeSupported,
|
isImageTypeSupported,
|
||||||
|
@ -28,7 +27,6 @@ export class AttachmentList extends React.Component<Props> {
|
||||||
const {
|
const {
|
||||||
attachments,
|
attachments,
|
||||||
i18n,
|
i18n,
|
||||||
// onError,
|
|
||||||
onClickAttachment,
|
onClickAttachment,
|
||||||
onCloseAttachment,
|
onCloseAttachment,
|
||||||
onClose,
|
onClose,
|
||||||
|
@ -59,7 +57,9 @@ export class AttachmentList extends React.Component<Props> {
|
||||||
return (
|
return (
|
||||||
<Image
|
<Image
|
||||||
key={getUrl(attachment) || attachment.fileName || index}
|
key={getUrl(attachment) || attachment.fileName || index}
|
||||||
alt={`TODO: attachment number ${index}`}
|
alt={i18n('stagedImageAttachment', [
|
||||||
|
getUrl(attachment) || attachment.fileName,
|
||||||
|
])}
|
||||||
i18n={i18n}
|
i18n={i18n}
|
||||||
attachment={attachment}
|
attachment={attachment}
|
||||||
softCorners={true}
|
softCorners={true}
|
||||||
|
|
|
@ -6,11 +6,13 @@ const attachment = {
|
||||||
fileName: 'manifesto.txt',
|
fileName: 'manifesto.txt',
|
||||||
};
|
};
|
||||||
|
|
||||||
<StagedGenericAttachment
|
<util.ConversationContext theme={util.theme}>
|
||||||
attachment={attachment}
|
<StagedGenericAttachment
|
||||||
i18n={util.i18n}
|
attachment={attachment}
|
||||||
onClose={attachment => console.log('onClose', attachment)}
|
i18n={util.i18n}
|
||||||
/>;
|
onClose={attachment => console.log('onClose', attachment)}
|
||||||
|
/>
|
||||||
|
</util.ConversationContext>;
|
||||||
```
|
```
|
||||||
|
|
||||||
File with long name
|
File with long name
|
||||||
|
@ -21,11 +23,13 @@ const attachment = {
|
||||||
fileName: 'this-is-my-very-important-manifesto-you-must-read-it.txt',
|
fileName: 'this-is-my-very-important-manifesto-you-must-read-it.txt',
|
||||||
};
|
};
|
||||||
|
|
||||||
<StagedGenericAttachment
|
<util.ConversationContext theme={util.theme}>
|
||||||
attachment={attachment}
|
<StagedGenericAttachment
|
||||||
i18n={util.i18n}
|
attachment={attachment}
|
||||||
onClose={attachment => console.log('onClose', attachment)}
|
i18n={util.i18n}
|
||||||
/>;
|
onClose={attachment => console.log('onClose', attachment)}
|
||||||
|
/>
|
||||||
|
</util.ConversationContext>;
|
||||||
```
|
```
|
||||||
|
|
||||||
File with long extension
|
File with long extension
|
||||||
|
@ -36,9 +40,11 @@ const attachment = {
|
||||||
fileName: 'manifesto.reallylongtxt',
|
fileName: 'manifesto.reallylongtxt',
|
||||||
};
|
};
|
||||||
|
|
||||||
<StagedGenericAttachment
|
<util.ConversationContext theme={util.theme}>
|
||||||
attachment={attachment}
|
<StagedGenericAttachment
|
||||||
i18n={util.i18n}
|
attachment={attachment}
|
||||||
onClose={attachment => console.log('onClose', attachment)}
|
i18n={util.i18n}
|
||||||
/>;
|
onClose={attachment => console.log('onClose', attachment)}
|
||||||
|
/>
|
||||||
|
</util.ConversationContext>;
|
||||||
```
|
```
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue