Skip to content

Commit c212c38

Browse files
committed
Add button to launch package installer
1 parent 3ce9217 commit c212c38

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed

ui/arduino/media/install-package.svg

+33
Loading

ui/arduino/views/components/toolbar.js

+10
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,16 @@ function Toolbar(state, emit) {
7070
active: state.view === 'file-manager',
7171
onClick: () => emit('change-view', 'file-manager')
7272
})}
73+
74+
${Button({
75+
icon: 'install-package.svg',
76+
tooltip: `Install Package`,
77+
active: true,
78+
onClick: () => {
79+
if(state.isConnected) emit('disconnect') // Package installer requires exclusive access to the serial port
80+
emit('launch-app', 'micropython-package-installer://', 'https://github.com/arduino/lab-micropython-package-installer/releases/latest')
81+
}
82+
})}
7383
</div>
7484
`
7585
}

0 commit comments

Comments
 (0)