Skip to content

Commit

Permalink
windows: Turn off start at login by default.
Browse files Browse the repository at this point in the history
Fixes: #960.
  • Loading branch information
akashnimare authored Jun 16, 2020
1 parent b6f4e2b commit 2f70621
Showing 1 changed file with 17 additions and 17 deletions.
34 changes: 17 additions & 17 deletions app/renderer/js/main.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import {ipcRenderer, remote, clipboard} from 'electron';
import {feedbackHolder} from './feedback';
import { ipcRenderer, remote, clipboard } from 'electron';
import { feedbackHolder } from './feedback';

import path from 'path';
import escape from 'escape-html';
import isDev from 'electron-is-dev';
const {session, app, Menu, dialog} = remote;
const { session, app, Menu, dialog } = remote;

// eslint-disable-next-line import/no-unassigned-import
import './tray';
Expand All @@ -21,7 +21,7 @@ import * as CommonUtil from './utils/common-util';
import * as EnterpriseUtil from './utils/enterprise-util';
import * as LinkUtil from './utils/link-util';
import * as Messages from '../../resources/messages';
import type {DNDSettings} from './utils/dnd-util';
import type { DNDSettings } from './utils/dnd-util';

interface FunctionalTabProps {
name: string;
Expand Down Expand Up @@ -179,7 +179,7 @@ class ServerManagerView {
useSystemProxy: false,
showSidebar: true,
badgeOption: true,
startAtLogin: true,
startAtLogin: false,
startMinimized: false,
enableSpellchecker: true,
showNotification: true,
Expand Down Expand Up @@ -273,7 +273,7 @@ class ServerManagerView {
if (preAddedDomains.length > 0) {
// User already has servers added
// ask them before reloading the app
const {response} = await dialog.showMessageBox({
const { response } = await dialog.showMessageBox({
type: 'question',
buttons: ['Yes', 'Later'],
defaultId: 0,
Expand All @@ -296,7 +296,7 @@ class ServerManagerView {
failedDomains.push(org);
}

const {title, content} = Messages.enterpriseOrgError(domainsAdded.length, failedDomains);
const { title, content } = Messages.enterpriseOrgError(domainsAdded.length, failedDomains);
dialog.showErrorBox(title, content);
if (DomainUtil.getDomains().length === 0) {
// No orgs present, stop showing loading gif
Expand Down Expand Up @@ -477,7 +477,7 @@ class ServerManagerView {
// as that of its parent element.
// This needs to handled only for the add server tooltip and not others.
if (addServer) {
const {top} = SidebarButton.getBoundingClientRect();
const { top } = SidebarButton.getBoundingClientRect();
SidebarTooltip.style.top = `${top}px`;
}
});
Expand All @@ -493,7 +493,7 @@ class ServerManagerView {
// To handle position of servers' tooltip due to scrolling of list of organizations
// This could not be handled using CSS, hence the top of the tooltip is made same
// as that of its parent element.
const {top} = this.$serverIconTooltip[index].parentElement.getBoundingClientRect();
const { top } = this.$serverIconTooltip[index].parentElement.getBoundingClientRect();
this.$serverIconTooltip[index].style.top = `${top}px`;
}

Expand Down Expand Up @@ -593,7 +593,7 @@ class ServerManagerView {
const proto = Object.create(Object.getPrototypeOf(tab));
const tabClone = Object.assign(proto, tab);

tabClone.webview = {props: {}};
tabClone.webview = { props: {} };
tabClone.webview.props.name = tab.webview.props.name;
delete tabClone.props.webview;
tabs.push(tabClone);
Expand Down Expand Up @@ -751,7 +751,7 @@ class ServerManagerView {
{
label: 'Disconnect organization',
click: async () => {
const {response} = await dialog.showMessageBox({
const { response } = await dialog.showMessageBox({
type: 'warning',
buttons: ['YES', 'NO'],
defaultId: 0,
Expand All @@ -761,7 +761,7 @@ class ServerManagerView {
if (DomainUtil.removeDomain(index)) {
ipcRenderer.send('reload-full-app');
} else {
const {title, content} = Messages.orgRemovalError(DomainUtil.getDomain(index).url);
const { title, content } = Messages.orgRemovalError(DomainUtil.getDomain(index).url);
dialog.showErrorBox(title, content);
}
}
Expand All @@ -784,7 +784,7 @@ class ServerManagerView {
}
];
const contextMenu = Menu.buildFromTemplate(template);
contextMenu.popup({window: remote.getCurrentWindow()});
contextMenu.popup({ window: remote.getCurrentWindow() });
});
}

Expand Down Expand Up @@ -813,7 +813,7 @@ class ServerManagerView {

ipcRenderer.on('permission-request', (
event: Event,
{webContentsId, origin, permission}: {
{ webContentsId, origin, permission }: {
webContentsId: number | null;
origin: string;
permission: string;
Expand All @@ -823,10 +823,10 @@ class ServerManagerView {
const grant = webContentsId === null ?
origin === 'null' && permission === 'notifications' :
this.tabs.some(
({webview}) =>
({ webview }) =>
!webview.loading &&
webview.$el.getWebContentsId() === webContentsId &&
webview.props.hasPermission?.(origin, permission)
webview.props.hasPermission?.(origin, permission)
);
console.log(
grant ? 'Granted' : 'Denied', 'permissions request for',
Expand Down Expand Up @@ -1050,4 +1050,4 @@ window.addEventListener('load', async () => {
await serverManagerView.init();
});

export {};
export { };

0 comments on commit 2f70621

Please sign in to comment.