lint after merge and fix startup of app

pull/715/head
Audric Ackermann 6 years ago
parent 6ebbd3d171
commit 67262c7eaa

@ -821,8 +821,6 @@
}; };
window.showSeedDialog = window.owsDesktopApp.appView.showSeedDialog; window.showSeedDialog = window.owsDesktopApp.appView.showSeedDialog;
window.showAddServerDialog =
window.owsDesktopApp.appView.showAddServerDialog;
window.generateID = () => window.generateID = () =>
Math.random() Math.random()

@ -260,6 +260,7 @@ exports.setup = (options = {}) => {
ContactName, ContactName,
ConversationHeader, ConversationHeader,
SessionChannelSettings, SessionChannelSettings,
SessionSettings,
EmbeddedContact, EmbeddedContact,
Emojify, Emojify,
FriendRequest, FriendRequest,

@ -17,7 +17,6 @@
this.applyHideMenu(); this.applyHideMenu();
this.showSeedDialog = this.showSeedDialog.bind(this); this.showSeedDialog = this.showSeedDialog.bind(this);
this.showAddServerDialog = this.showAddServerDialog.bind(this);
}, },
events: { events: {
'click .openInstaller': 'openInstaller', // NetworkStatusView has this button 'click .openInstaller': 'openInstaller', // NetworkStatusView has this button

@ -423,7 +423,6 @@ $session_message-container-border-radius: 5px;
fill: $session-color-white; fill: $session-color-white;
} }
$session-separator-element-border: 1px solid $session-shade-6; $session-separator-element-border: 1px solid $session-shade-6;
$session-element-border-green: 4px solid $session-color-green; $session-element-border-green: 4px solid $session-color-green;
@ -1094,26 +1093,25 @@ input {
transition: $session-transition-duration; transition: $session-transition-duration;
.module-avatar, .module-avatar,
.name-part { .name-part {
margin: auto $session-margin-md; margin: auto $session-margin-md;
} }
.check-mark{ .check-mark {
margin: auto $session-margin-xs; margin: auto $session-margin-xs;
} }
.name-part { .name-part {
flex-grow: 1; flex-grow: 1;
} }
} }
.dark-theme .modal .content{ .dark-theme .modal .content {
background-color: $session-shade-4; background-color: $session-shade-4;
} }
.loki-dialog button { .loki-dialog button {
border:none; border: none;
} }
.friend-selection-list { .friend-selection-list {

@ -113,8 +113,12 @@
.module-media-grid-item__image, .module-media-grid-item__image,
.module-media-grid-item { .module-media-grid-item {
height: calc(22vw/3.5); //.group-settings is 22vw and we want threee rows with some space so divide it by 3.5 height: calc(
width: calc(22vw/3.5); //.group-settings is 22vw and we want threee rows with some space so divide it by 3.5 22vw / 3.5
); //.group-settings is 22vw and we want threee rows with some space so divide it by 3.5
width: calc(
22vw / 3.5
); //.group-settings is 22vw and we want threee rows with some space so divide it by 3.5
margin-right: 0; margin-right: 0;
} }
} }

@ -1,6 +1,5 @@
import React from 'react'; import React from 'react';
import { ActionsPanel, SectionType } from './session/ActionsPanel'; import { ActionsPanel, SectionType } from './session/ActionsPanel';
import { LeftPaneMessageSection } from './session/LeftPaneMessageSection'; import { LeftPaneMessageSection } from './session/LeftPaneMessageSection';
@ -102,7 +101,7 @@ export class LeftPane extends React.Component<Props, State> {
case SectionType.Contact: case SectionType.Contact:
return this.renderContactSection(); return this.renderContactSection();
case SectionType.Channel: case SectionType.Channel:
return this.renderChannelSection(); return this.renderChannelSection();
case SectionType.Settings: case SectionType.Settings:
return this.renderSettingSection(); return this.renderSettingSection();
case SectionType.Moon: case SectionType.Moon:

@ -8,7 +8,9 @@ import {
export const MainViewController = { export const MainViewController = {
renderMessageView: () => { renderMessageView: () => {
ReactDOM.render(<MessageView />, document.getElementById('main-view')); if(document.getElementById('main-view')) {
ReactDOM.render(<MessageView />, document.getElementById('main-view'));
}
}, },
renderSettingsView: (category: SessionSettingCategory) => { renderSettingsView: (category: SessionSettingCategory) => {
@ -27,12 +29,7 @@ export class MessageView extends React.Component {
<div className="conversation-header" /> <div className="conversation-header" />
<div className="container"> <div className="container">
<div className="content"> <div className="content">
<img <img src="images/session/full-logo.svg" className="session-full-logo" alt="full-brand-logo"/>
src="images/session/brand.svg"
className="session-filter-color-green session-logo-128"
alt="Brand"
/>
<p className="session-logo-text">SESSION</p>
</div> </div>
</div> </div>
</div> </div>

@ -1,6 +1,10 @@
import React from 'react'; import React from 'react';
import { Contact, MemberList } from './MemberList'; import { Contact, MemberList } from './MemberList';
import { SessionIconButton, SessionIconType, SessionIconSize } from '../session/icon'; import {
SessionIconButton,
SessionIconSize,
SessionIconType,
} from '../session/icon';
interface Props { interface Props {
friendList: Array<any>; friendList: Array<any>;
@ -65,12 +69,12 @@ export class InviteFriendsDialog extends React.Component<Props, State> {
return ( return (
<div className="content"> <div className="content">
<div className="session-modal__header__close"> <div className="session-modal__header__close">
<SessionIconButton <SessionIconButton
iconType={SessionIconType.Exit} iconType={SessionIconType.Exit}
iconSize={SessionIconSize.Small} iconSize={SessionIconSize.Small}
onClick={this.closeDialog} onClick={this.closeDialog}
/> />
</div> </div>
<p className="titleText">{titleText}</p> <p className="titleText">{titleText}</p>
<div className="friend-selection-list"> <div className="friend-selection-list">
<MemberList <MemberList

@ -71,7 +71,9 @@ export class LeftPaneSettingSection extends React.Component<any, State> {
item.id === this.state.settingCategory ? 'active' : '' item.id === this.state.settingCategory ? 'active' : ''
)} )}
role="link" role="link"
onClick={(): void => this.setCategory(item.id)} onClick={(): void => {
this.setCategory(item.id);
}}
> >
<div> <div>
<strong>{item.title}</strong> <strong>{item.title}</strong>

@ -81,6 +81,8 @@ export class SessionSettingListItem extends React.Component<Props> {
} }
private handleClick() { private handleClick() {
this.props.onClick && this.props.onClick(); if (this.props.onClick) {
this.props.onClick();
}
} }
} }

@ -87,7 +87,9 @@ export class SettingsView extends React.Component<SettingsViewProps> {
title: window.i18n('notificationSettingsDialog'), title: window.i18n('notificationSettingsDialog'),
type: SessionSettingType.Options, type: SessionSettingType.Options,
category: SessionSettingCategory.Notifications, category: SessionSettingCategory.Notifications,
setFn: () => this.setOptionsSetting('notification-setting'), setFn: () => {
this.setOptionsSetting('notification-setting');
},
content: { content: {
options: { options: {
group: 'notification-setting', group: 'notification-setting',

1
ts/global.d.ts vendored

@ -23,7 +23,6 @@ interface Window {
pushToast: any; pushToast: any;
confirmationDialog: any; confirmationDialog: any;
showSeedDialog: any; showSeedDialog: any;
showAddServerDialog: any;
deleteAccount: any; deleteAccount: any;
toggleTheme: any; toggleTheme: any;
toggleMenuBar: any; toggleMenuBar: any;

Loading…
Cancel
Save