Skip to content
This repository was archived by the owner on Feb 23, 2021. It is now read-only.

Commit 0fccd70

Browse files
committed
Cross-platform bugfixes
- Switched to platform-native title bar, removed electron "traffic lights". - Removed platform default drop-down menus. - Added title bar icon. - Removed draggability from left sidebar. - Fixed Windows path to lnd binary. - Enabled autopilot.
1 parent a6756f1 commit 0fccd70

File tree

2 files changed

+13
-11
lines changed

2 files changed

+13
-11
lines changed

apps/desktop/main.dev.js

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ const runProcesses = (processes, logs) => {
3838
})
3939
.catch(() => {
4040
const plat = os.platform()
41-
const filePath = path.join(__dirname, 'bin', plat, proc.name, plat === 'win32' ? '.exe' : '')
41+
const filePath = path.join(__dirname, 'bin', plat, plat === 'win32' ? proc.name + '.exe' : proc.name)
4242

4343
try {
4444
const instance = cp.execFile(filePath, proc.args, (error) => {
@@ -75,6 +75,7 @@ const processes = [
7575
isDev ? '' : '--neutrino.connect=127.0.0.1:18333',
7676
'--debuglevel=info',
7777
'--no-macaroons',
78+
'--autopilot.active',
7879
],
7980
},
8081
]
@@ -120,18 +121,27 @@ const finishCreateWindow = () => {
120121
defaultHeight: 500,
121122
})
122123

124+
const plat = os.platform()
125+
126+
const icon = 'assets/ln-logo' + ({
127+
'darwin': '.icns',
128+
'win32': '.ico',
129+
}[plat] || '.png')
130+
123131
const { x, y, width, height } = mainWindowState
124132
mainWindow = new BrowserWindow({
125133
x,
126134
y,
127135
width,
128136
height,
137+
icon: icon,
129138
show: false,
130-
transparent: true,
131-
frame: false,
139+
frame: true,
132140
title: 'Lightning',
133141
})
134142

143+
mainWindow.setMenu(null)
144+
135145
mainWindowState.manage(mainWindow)
136146
if (isDev) {
137147
mainWindow.loadURL('http://localhost:4152')

packages/lightning-app/App.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ const App = () => {
2323
},
2424
sidebar: {
2525
direction: 'column',
26-
WebkitAppRegion: 'drag',
2726
userSelect: 'none',
2827
cursor: 'default',
2928
width: '170px',
@@ -41,13 +40,6 @@ const App = () => {
4140
return (
4241
<Box style={ styles.app }>
4342
<Box style={ styles.sidebar }>
44-
<Box style={ styles.lights }>
45-
<TrafficLights
46-
background="#666"
47-
color="#272429"
48-
minimizeOnClose
49-
/>
50-
</Box>
5143
<Sidebar />
5244
</Box>
5345
<Box style={ styles.content }>

0 commit comments

Comments
 (0)