Merge branch 'master' into sda-2947

This commit is contained in:
Johan Kwarnmark 2021-02-02 09:28:36 +01:00 committed by GitHub
commit 7d377cc477
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 74 additions and 35 deletions

View File

@ -45,6 +45,11 @@ class CrashHandler {
crashCause: _killed ? 'killed' : 'crashed', crashCause: _killed ? 'killed' : 'crashed',
}; };
analytics.track(eventData); analytics.track(eventData);
logger.info(
`crash-handler: GPU process crash event processed with data ${JSON.stringify(
eventData,
)}`,
);
}); });
} }
@ -65,6 +70,11 @@ class CrashHandler {
crashCause: lastCrash.id, crashCause: lastCrash.id,
}; };
analytics.track(eventData); analytics.track(eventData);
logger.info(
`crash-handler: Main process crash event processed with data ${JSON.stringify(
eventData,
)}`,
);
} }
constructor() { constructor() {
@ -96,6 +106,11 @@ class CrashHandler {
case 'oom': case 'oom':
await CrashHandler.showMessageToUser(browserWindow); await CrashHandler.showMessageToUser(browserWindow);
analytics.track(eventData); analytics.track(eventData);
logger.info(
`crash-handler: Renderer process crash event processed with data ${JSON.stringify(
eventData,
)}`,
);
break; break;
default: default:
break; break;

View File

@ -41,8 +41,8 @@ type mouseEventButton =
type keyboardEvent = React.KeyboardEvent<HTMLInputElement>; type keyboardEvent = React.KeyboardEvent<HTMLInputElement>;
// Notification container height // Notification container height
const CONTAINER_HEIGHT = 100; const CONTAINER_HEIGHT = 88;
const CONTAINER_HEIGHT_WITH_INPUT = 132; const CONTAINER_HEIGHT_WITH_INPUT = 120;
export default class NotificationComp extends React.Component<{}, IState> { export default class NotificationComp extends React.Component<{}, IState> {
private readonly eventHandlers = { private readonly eventHandlers = {
@ -137,11 +137,17 @@ export default class NotificationComp extends React.Component<{}, IState> {
const containerClass = classNames('container', { const containerClass = classNames('container', {
'external-border': isExternal, 'external-border': isExternal,
}); });
const actionButtonContainer = classNames('rte-button-container', {
'action-container-margin': !isInputHidden,
});
return ( return (
<div <div
className={containerClass} className={containerClass}
style={{ height: containerHeight }} style={{
height: containerHeight,
backgroundColor: bgColor.backgroundColor,
}}
lang={i18n.getLocale()} lang={i18n.getLocale()}
> >
<div <div
@ -188,7 +194,7 @@ export default class NotificationComp extends React.Component<{}, IState> {
</div> </div>
<div <div
style={{ style={{
...{ display: isInputHidden ? 'none' : 'flex' }, ...{ display: isInputHidden ? 'none' : 'block' },
...bgColor, ...bgColor,
}} }}
className='rte-container' className='rte-container'
@ -218,7 +224,7 @@ export default class NotificationComp extends React.Component<{}, IState> {
ref={this.input} ref={this.input}
/> />
</div> </div>
<div className='rte-button-container'> <div className={actionButtonContainer}>
<button <button
className={`rte-thumbsup-button ${themeClassName}`} className={`rte-thumbsup-button ${themeClassName}`}
onClick={this.eventHandlers.onThumbsUp()} onClick={this.eventHandlers.onThumbsUp()}

View File

@ -26,8 +26,8 @@ interface ICorner {
} }
type startCorner = 'upper-right' | 'upper-left' | 'lower-right' | 'lower-left'; type startCorner = 'upper-right' | 'upper-left' | 'lower-right' | 'lower-left';
const NEXT_INSERT_POSITION = 108; const NEXT_INSERT_POSITION = 96;
const NEXT_INSERT_POSITION_WITH_INPUT = 140; const NEXT_INSERT_POSITION_WITH_INPUT = 128;
export default class NotificationHandler { export default class NotificationHandler {
public settings: ISettings; public settings: ISettings;

View File

@ -16,7 +16,7 @@ import NotificationHandler from './notification-handler';
// const MAX_QUEUE_SIZE = 30; // const MAX_QUEUE_SIZE = 30;
const CLEAN_UP_INTERVAL = 60 * 1000; // Closes inactive notification const CLEAN_UP_INTERVAL = 60 * 1000; // Closes inactive notification
const animationQueue = new AnimationQueue(); const animationQueue = new AnimationQueue();
const CONTAINER_HEIGHT_WITH_INPUT = 132; // Notification container height const CONTAINER_HEIGHT_WITH_INPUT = 120; // Notification container height
interface ICustomBrowserWindow extends Electron.BrowserWindow { interface ICustomBrowserWindow extends Electron.BrowserWindow {
winName: string; winName: string;
@ -31,7 +31,7 @@ const notificationSettings = {
startCorner: 'upper-right' as startCorner, startCorner: 'upper-right' as startCorner,
display: '', display: '',
width: 344, width: 344,
height: 100, height: 88,
totalHeight: 0, totalHeight: 0,
totalWidth: 0, totalWidth: 0,
corner: { corner: {
@ -607,7 +607,7 @@ class Notification extends NotificationHandler {
private getNotificationOpts(): Electron.BrowserWindowConstructorOptions { private getNotificationOpts(): Electron.BrowserWindowConstructorOptions {
return { return {
width: 344, width: 344,
height: 100, height: 88,
alwaysOnTop: true, alwaysOnTop: true,
skipTaskbar: true, skipTaskbar: true,
resizable: isWindowsOS, resizable: isWindowsOS,

View File

@ -1,22 +1,27 @@
@import "theme"; @import 'theme';
@inputWidth: 270px; @inputWidth: 270px;
.blackText { .blackText {
--text-color: #000000; --text-color: #000000;
--button-bg-color: #52575f; --button-bg-color: #52575f;
--button-test-color: #FFFFFF; --button-test-color: #ffffff;
--logo-bg: url('../assets/symphony-logo.png'); --logo-bg: url('../assets/symphony-logo.png');
} }
.light { .light {
--text-color: #525760; --text-color: #525760;
--button-bg-color: linear-gradient(0deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.72)), #525760; --button-bg-color: linear-gradient(
0deg,
rgba(255, 255, 255, 0.72),
rgba(255, 255, 255, 0.72)
),
#525760;
--button-test-color: #000000; --button-test-color: #000000;
--logo-bg: url('../assets/symphony-logo.png'); --logo-bg: url('../assets/symphony-logo.png');
} }
.dark { .dark {
--text-color: #FFFFFF; --text-color: #ffffff;
--button-bg-color: #52575f; --button-bg-color: #52575f;
--button-test-color: #FFFFFF; --button-test-color: #ffffff;
--logo-bg: url('../assets/symphony-logo.png'); --logo-bg: url('../assets/symphony-logo.png');
} }
@ -37,9 +42,8 @@ body {
.container { .container {
width: 344px; width: 344px;
height: 100px; height: 88px;
display: flex; display: flex;
justify-content: center;
background-color: #ffffff; background-color: #ffffff;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
@ -58,13 +62,14 @@ body {
} }
.main-container { .main-container {
height: 100px; height: 88px;
display: flex; display: flex;
justify-content: center; justify-content: center;
background-color: #ffffff; background-color: #ffffff;
overflow: hidden; overflow: hidden;
position: relative; position: relative;
line-height: 15px; line-height: 15px;
align-items: flex-start;
} }
.ext-border { .ext-border {
@ -78,7 +83,7 @@ body {
.header { .header {
width: 232px; width: 232px;
min-width: 215px; min-width: 215px;
margin: auto; margin-top: 10px;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: flex-start; align-items: flex-start;
@ -101,10 +106,10 @@ body {
display: flex; display: flex;
height: 40px; height: 40px;
border-radius: 4px; border-radius: 4px;
border: 1px solid rgba(82, 87, 96, .32); border: 1px solid rgba(82, 87, 96, 0.32);
margin: 12px; margin: 12px;
width: 40px; width: 40px;
background: #FFFFFF; background: #ffffff;
} }
.user-name-text { .user-name-text {
@ -113,7 +118,7 @@ body {
align-items: center; align-items: center;
margin: auto; margin: auto;
text-align: center; text-align: center;
color: #008EFF; color: #008eff;
} }
.ext-badge-container { .ext-badge-container {
@ -135,6 +140,11 @@ body {
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
z-index: 5; z-index: 5;
margin-top: 4px;
}
.action-container-margin {
margin-top: 8px;
} }
.action-button { .action-button {
@ -159,7 +169,7 @@ body {
} }
.action-button:hover { .action-button:hover {
background: #A5A8AC; background: #a5a8ac;
} }
.action-button:lang(fr-FR) { .action-button:lang(fr-FR) {
@ -167,16 +177,19 @@ body {
} }
.action-button:lang(ja-JP) { .action-button:lang(ja-JP) {
width: 60px; width: 60px;
} }
.rte-container { .rte-container {
width: 100%; width: 100%;
display: flex; height: 38px;
position: absolute;
bottom: 0;
} }
.input-container { .input-container {
width: 100%; width: 100%;
height: 38px;
outline: none; outline: none;
} }
@ -185,7 +198,7 @@ body {
left: 8px; left: 8px;
right: 8px; right: 8px;
top: 0; top: 0;
background: #008EFF; background: #008eff;
margin: 0 8px; margin: 0 8px;
} }
@ -259,11 +272,13 @@ input {
color: var(--text-color); color: var(--text-color);
} }
.rte-thumbsup-button:focus, .rte-send-button:focus { .rte-thumbsup-button:focus,
.rte-send-button:focus {
outline: none; outline: none;
} }
.rte-send-button:focus:not(:hover):not(:active), .rte-thumbsup-button:focus:not(:hover):not(:active) { .rte-send-button:focus:not(:hover):not(:active),
outline: #008EFF auto 1px; .rte-thumbsup-button:focus:not(:hover):not(:active) {
outline: #008eff auto 1px;
} }
.rte-send-button { .rte-send-button {
@ -271,13 +286,15 @@ input {
height: 25px; height: 25px;
align-self: center; align-self: center;
padding: 3px; padding: 3px;
background: url('../assets/notification-send-button-enabled.svg') no-repeat center; background: url('../assets/notification-send-button-enabled.svg') no-repeat
center;
border: none; border: none;
color: var(--text-color); color: var(--text-color);
} }
.rte-send-button:disabled { .rte-send-button:disabled {
background: url('../assets/notification-send-button-disabled.svg') no-repeat center; background: url('../assets/notification-send-button-disabled.svg') no-repeat
center;
} }
.title { .title {
@ -333,7 +350,7 @@ input {
} }
.logo-container { .logo-container {
margin: 10px; margin: 12px;
display: flex; display: flex;
align-items: center; align-items: center;
} }
@ -344,10 +361,11 @@ input {
} }
@-webkit-keyframes blink { @-webkit-keyframes blink {
from, to { from,
to {
background: transparent; background: transparent;
} }
50% { 50% {
background: #008EFF; background: #008eff;
} }
} }