8000 Move button to primary toolbar actions · arduino/lab-micropython-editor@851b10e · GitHub
[go: up one dir, main page]

Skip to content

Commit 851b10e

Browse files
committed
Move button to primary toolbar actions
1 parent 3f2636e commit 851b10e

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

ui/arduino/views/components/toolbar.js

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,17 @@ function Toolbar(state, emit) {
6969
disabled: !_canSave,
7070
onClick: () => emit('save')
7171
})}
72+
73+
<div class="separator"></div>
74+
75+
${!window.BridgeWindow.isLinux() ? Button({
76+
icon: 'install-package.svg',
77+
label: `Add Package`,
78+
onClick: () => {
79+
if(state.isConnected) emit('disconnect') // Package installer requires exclusive access to the serial port
80+
emit('launch-app', 'micropython-package-installer: 8000 //', 'https://github.com/arduino/lab-micropython-package-installer/releases/latest')
81+
}
82+
}) : '' }
7283
</div>
7384
7485
<div id="app-views">
@@ -88,19 +99,6 @@ function Toolbar(state, emit) {
8899
square: true,
89100
onClick: () => emit('change-view', 'file-manager')
90101
})}
91-
92-
</div>
93-
94-
<div>
95-
${!window.BridgeWindow.isLinux() ? Button({
96-
icon: 'install-package.svg',
97-
label: `Install Package`,
98-
active: true,
99-
onClick: () => {
100-
if(state.isConnected) emit('disconnect') // Package installer requires exclusive access to the serial port
101-
emit('launch-app', 'micropython-package-installer://', 'https://github.com/arduino/lab-micropython-package-installer/releases/latest')
102-
}
103-
}) : '' }
104102
</div>
105103
</div>
106104
`

0 commit comments

Comments
 (0)
0