From 67262c7eaa2fcb05b9f388f49c5cdc0eaf5c9ba5 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 16 Jan 2020 12:05:09 +1100 Subject: [PATCH] lint after merge and fix startup of app --- js/background.js | 2 -- js/modules/signal.js | 1 + js/views/app_view.js | 1 - stylesheets/_session.scss | 10 ++++------ stylesheets/_session_group_panel.scss | 8 ++++++-- ts/components/LeftPane.tsx | 3 +-- ts/components/MainViewController.tsx | 11 ++++------- .../conversation/InviteFriendsDialog.tsx | 18 +++++++++++------- .../session/LeftPaneSettingSection.tsx | 4 +++- .../settings/SessionSettingListItem.tsx | 4 +++- .../session/settings/SessionSettings.tsx | 4 +++- ts/global.d.ts | 1 - 12 files changed, 36 insertions(+), 31 deletions(-) diff --git a/js/background.js b/js/background.js index 44bacfea9..65647f2eb 100644 --- a/js/background.js +++ b/js/background.js @@ -821,8 +821,6 @@ }; window.showSeedDialog = window.owsDesktopApp.appView.showSeedDialog; - window.showAddServerDialog = - window.owsDesktopApp.appView.showAddServerDialog; window.generateID = () => Math.random() diff --git a/js/modules/signal.js b/js/modules/signal.js index 6fef05b2e..8554f1c32 100644 --- a/js/modules/signal.js +++ b/js/modules/signal.js @@ -260,6 +260,7 @@ exports.setup = (options = {}) => { ContactName, ConversationHeader, SessionChannelSettings, + SessionSettings, EmbeddedContact, Emojify, FriendRequest, diff --git a/js/views/app_view.js b/js/views/app_view.js index e1804c4ba..636740f0a 100644 --- a/js/views/app_view.js +++ b/js/views/app_view.js @@ -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 diff --git a/stylesheets/_session.scss b/stylesheets/_session.scss index 320a8b568..5d95e421d 100644 --- a/stylesheets/_session.scss +++ b/stylesheets/_session.scss @@ -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 { diff --git a/stylesheets/_session_group_panel.scss b/stylesheets/_session_group_panel.scss index 2b698855a..6748041b1 100644 --- a/stylesheets/_session_group_panel.scss +++ b/stylesheets/_session_group_panel.scss @@ -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; } } diff --git a/ts/components/LeftPane.tsx b/ts/components/LeftPane.tsx index d9ff7fc2a..babd60a8e 100644 --- a/ts/components/LeftPane.tsx +++ b/ts/components/LeftPane.tsx @@ -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 { case SectionType.Contact: return this.renderContactSection(); case SectionType.Channel: - return this.renderChannelSection(); + return this.renderChannelSection(); case SectionType.Settings: return this.renderSettingSection(); case SectionType.Moon: diff --git a/ts/components/MainViewController.tsx b/ts/components/MainViewController.tsx index db80fa560..2696ded0c 100644 --- a/ts/components/MainViewController.tsx +++ b/ts/components/MainViewController.tsx @@ -8,7 +8,9 @@ import { export const MainViewController = { renderMessageView: () => { - ReactDOM.render(, document.getElementById('main-view')); + if(document.getElementById('main-view')) { + ReactDOM.render(, document.getElementById('main-view')); + } }, renderSettingsView: (category: SessionSettingCategory) => { @@ -27,12 +29,7 @@ export class MessageView extends React.Component {
- Brand -

SESSION

+ full-brand-logo
diff --git a/ts/components/conversation/InviteFriendsDialog.tsx b/ts/components/conversation/InviteFriendsDialog.tsx index ddf3d6e1e..622c0ad87 100644 --- a/ts/components/conversation/InviteFriendsDialog.tsx +++ b/ts/components/conversation/InviteFriendsDialog.tsx @@ -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; @@ -65,12 +69,12 @@ export class InviteFriendsDialog extends React.Component { return (
- -
+ +

{titleText}

{ item.id === this.state.settingCategory ? 'active' : '' )} role="link" - onClick={(): void => this.setCategory(item.id)} + onClick={(): void => { + this.setCategory(item.id); + }} >
{item.title} diff --git a/ts/components/session/settings/SessionSettingListItem.tsx b/ts/components/session/settings/SessionSettingListItem.tsx index 54d466775..4366faa35 100644 --- a/ts/components/session/settings/SessionSettingListItem.tsx +++ b/ts/components/session/settings/SessionSettingListItem.tsx @@ -81,6 +81,8 @@ export class SessionSettingListItem extends React.Component { } private handleClick() { - this.props.onClick && this.props.onClick(); + if (this.props.onClick) { + this.props.onClick(); + } } } diff --git a/ts/components/session/settings/SessionSettings.tsx b/ts/components/session/settings/SessionSettings.tsx index 8719ec966..0e60d896c 100644 --- a/ts/components/session/settings/SessionSettings.tsx +++ b/ts/components/session/settings/SessionSettings.tsx @@ -87,7 +87,9 @@ export class SettingsView extends React.Component { 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', diff --git a/ts/global.d.ts b/ts/global.d.ts index 9c44ffb1d..407c4ab23 100644 --- a/ts/global.d.ts +++ b/ts/global.d.ts @@ -23,7 +23,6 @@ interface Window { pushToast: any; confirmationDialog: any; showSeedDialog: any; - showAddServerDialog: any; deleteAccount: any; toggleTheme: any; toggleMenuBar: any;