lint after merge and fix startup of app

This commit is contained in:
Audric Ackermann 2020-01-16 12:05:09 +11:00
parent 6ebbd3d171
commit 67262c7eaa
12 changed files with 36 additions and 31 deletions

View File

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

View File

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

View File

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

View File

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

View File

@ -113,8 +113,12 @@
.module-media-grid-item__image,
.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
width: calc(22vw/3.5); //.group-settings is 22vw and we want threee rows with some space so divide it by 3.5
height: calc(
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;
}
}

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

1
ts/global.d.ts vendored
View File

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