cleanup network status view and some UI constants

pull/1387/head
Audric Ackermann 5 years ago
parent a652ec3b61
commit 6e07ee42f5
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -183,9 +183,6 @@ h4.section-toggle,
.network-status-container { .network-status-container {
.network-status { .network-status {
background: url('../images/error_red.svg') no-repeat left 10px center;
background-size: 25px 25px;
background-color: #fcd156;
padding: 10px; padding: 10px;
padding-inline-start: 2 * $button-height; padding-inline-start: 2 * $button-height;
display: none; display: none;
@ -203,16 +200,6 @@ h4.section-toggle,
padding: 0.5em 0; padding: 0.5em 0;
} }
} }
.action {
button {
border-radius: $border-radius;
border: solid 1px #ccc;
cursor: pointer;
font-family: inherit;
color: white;
background: $blue;
}
}
} }
} }

@ -1,4 +1,3 @@
@keyframes fadein { @keyframes fadein {
from { from {
opacity: 0; opacity: 0;
@ -221,7 +220,7 @@
padding: 0px $session-margin-md; padding: 0px $session-margin-md;
min-height: min-content; min-height: min-content;
@include themify($themes) { @include themify($themes) {
background: themed('inputBackground'); background: themed('composeViewBackground');
} }
& > .session-icon-button { & > .session-icon-button {

@ -169,10 +169,13 @@ h4 {
text-align: center; text-align: center;
} }
.dark-theme .network-status-container .network-status { .network-status {
background-color: rgba($session-color-green, 0.6); @include themify($themes) {
background: themed('accent');
}
h3,
.network-status-message { .network-status-message {
color: $session-color-white; color: $black;
} }
} }

@ -146,27 +146,6 @@
} }
} }
// _index
.network-status-container {
.network-status {
background: url('../images/error_red.svg') no-repeat left 10px center;
background-size: 25px 25px;
background-color: #fcd156;
.network-status-message {
color: $color-dark-85;
}
.action {
button {
border: solid 1px #ccc;
color: white;
background: $blue;
}
}
}
}
.tool-bar { .tool-bar {
color: $color-dark-05; color: $color-dark-05;

@ -359,9 +359,7 @@ export class Lightbox extends React.Component<Props> {
this.onClose(); this.onClose();
}; };
private readonly onObjectClick = ( private readonly onObjectClick = (event: any) => {
event: React.MouseEvent<HTMLImageElement | HTMLDivElement>
) => {
event.stopPropagation(); event.stopPropagation();
this.onClose(); this.onClose();
}; };

@ -129,7 +129,7 @@ export class Image extends React.Component<Props> {
{closeButton ? ( {closeButton ? (
<div <div
role="button" role="button"
onClick={(e: React.MouseEvent<{}>) => { onClick={(e: any) => {
e.stopPropagation(); e.stopPropagation();
if (onClickClose) { if (onClickClose) {
onClickClose(attachment); onClickClose(attachment);

@ -277,7 +277,7 @@ export class Quote extends React.Component<Props, State> {
// We don't want the overall click handler for the quote to fire, so we stop // We don't want the overall click handler for the quote to fire, so we stop
// propagation before handing control to the caller's callback. // propagation before handing control to the caller's callback.
const onClick = (e: React.MouseEvent<{}>): void => { const onClick = (e: any): void => {
e.stopPropagation(); e.stopPropagation();
onClose(); onClose();
}; };

@ -584,8 +584,8 @@ export class SessionConversation extends React.Component<any, State> {
const ourPK = window.textsecure.storage.user.getNumber(); const ourPK = window.textsecure.storage.user.getNumber();
const members = conversation.get('members') || []; const members = conversation.get('members') || [];
const isAdmin = conversation.isMediumGroup() const isAdmin = conversation.isMediumGroup()
? true ? true
: conversation.get('groupAdmins').includes(ourPK); : conversation.get('groupAdmins').includes(ourPK);
return { return {
id: conversation.id, id: conversation.id,
@ -609,12 +609,12 @@ export class SessionConversation extends React.Component<any, State> {
})), })),
onSetDisappearingMessages: (seconds: any) => { onSetDisappearingMessages: (seconds: any) => {
if (seconds > 0) { if (seconds > 0) {
conversation.updateExpirationTimer(seconds); conversation.updateExpirationTimer(seconds);
} else { } else {
conversation.updateExpirationTimer(null); conversation.updateExpirationTimer(null);
} }
}, },
onGoBack: () => { onGoBack: () => {
this.toggleGroupSettingsPane(); this.toggleGroupSettingsPane();
@ -872,10 +872,14 @@ export class SessionConversation extends React.Component<any, State> {
// If removable from server, we "Unsend" - otherwise "Delete" // If removable from server, we "Unsend" - otherwise "Delete"
const pluralSuffix = multiple ? 's' : ''; const pluralSuffix = multiple ? 's' : '';
const title = window.i18n( const title = window.i18n(
isServerDeletable ? `deleteMessage${pluralSuffix}ForEveryone` : `deleteMessage${pluralSuffix}` isServerDeletable
? `deleteMessage${pluralSuffix}ForEveryone`
: `deleteMessage${pluralSuffix}`
); );
const okText = window.i18n(isServerDeletable ? 'deleteForEveryone' : 'delete'); const okText = window.i18n(
isServerDeletable ? 'deleteForEveryone' : 'delete'
);
window.confirmationDialog({ window.confirmationDialog({
title, title,

@ -91,7 +91,7 @@ export class SessionRecording extends React.Component<Props, State> {
this.updateCanvasDimensions = this.updateCanvasDimensions.bind(this); this.updateCanvasDimensions = this.updateCanvasDimensions.bind(this);
const now = getTimestamp(); const now = getTimestamp();
const updateTimerInterval = setInterval(this.timerUpdate, 500); const updateTimerInterval = global.setInterval(this.timerUpdate, 500);
this.state = { this.state = {
recordDuration: 0, recordDuration: 0,

@ -45,32 +45,6 @@ export const UI = {
DARK_GREY: '#353535', DARK_GREY: '#353535',
BLACK: '#000000', BLACK: '#000000',
GREEN: '#00F782', GREEN: '#00F782',
GREEN_ALT_1: '#00F480',
GREEN_ALT_2: '#00FD73',
GREEN_ALT_3: '#00F782',
BACKGROUND: '#121212',
// SHADES
SHADE_1: '#0C0C0C',
SHADE_1_ALT: '#0F1011',
SHADE_2: '#161616',
SHADE_3: '#191818',
SHADE_4: '#1B1B1B',
SHADE_5: '#222325',
SHADE_6: '#232323',
SHADE_6_ALT: '#2C2C2C',
SHADE_7: '#2E2E2E',
SHADE_8: '#2F2F2F',
SHADE_9: '#313131',
SHADE_10: '#3E3E3E',
SHADE_11: '#3F3F3F',
SHADE_12: '#3F4146',
SHADE_13: '#474646',
SHADE_14: '#535865',
SHADE_15: '#5B6C72',
SHADE_16: '#979797',
SHADE_17: '#A0A0A0',
SHADE_18: '#141414',
// SEMANTIC COLORS // SEMANTIC COLORS
INFO: '#3F3F3F', INFO: '#3F3F3F',

@ -39,7 +39,7 @@ export async function start(
autoUpdater.logger = logger; autoUpdater.logger = logger;
autoUpdater.autoDownload = false; autoUpdater.autoDownload = false;
interval = setInterval(async () => { interval = global.setInterval(async () => {
try { try {
await checkForUpdates(getMainWindow, messages, logger); await checkForUpdates(getMainWindow, messages, logger);
} catch (error) { } catch (error) {

Loading…
Cancel
Save