mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-13 06:16:33 +00:00
fix url to open sketch in cloud editor (#452)
This commit is contained in:
parent
d790266cc8
commit
5897f379a4
@ -176,7 +176,7 @@ export class CloudSketchbookContribution extends Contribution {
|
||||
registry.registerCommand(CloudSketchbookCommands.OPEN_IN_CLOUD_EDITOR, {
|
||||
execute: (arg) => {
|
||||
this.windowService.openNewWindow(
|
||||
`https://create.arduino.cc/editor/${arg.node.sketchId}`,
|
||||
`https://create.arduino.cc/editor/${arg.username}/${arg.node.sketchId}`,
|
||||
{ external: true }
|
||||
);
|
||||
},
|
||||
|
@ -94,7 +94,9 @@ export class CloudSketchbookTreeWidget extends SketchbookTreeWidget {
|
||||
this.currentSketchUri === node.uri.toString())
|
||||
) {
|
||||
return Array.from(new Set(node.commands)).map((command) =>
|
||||
this.renderInlineCommand(command.id, node)
|
||||
this.renderInlineCommand(command.id, node, {
|
||||
username: this.authenticationService.session?.account?.label,
|
||||
})
|
||||
);
|
||||
}
|
||||
return undefined;
|
||||
|
@ -125,11 +125,12 @@ export class SketchbookTreeWidget extends FileTreeWidget {
|
||||
|
||||
protected renderInlineCommand(
|
||||
commandId: string,
|
||||
node: SketchbookTree.SketchDirNode
|
||||
node: SketchbookTree.SketchDirNode,
|
||||
options?: any
|
||||
): React.ReactNode {
|
||||
const command = this.commandRegistry.getCommand(commandId);
|
||||
const icon = command?.iconClass;
|
||||
const args = { model: this.model, node: node };
|
||||
const args = { model: this.model, node: node, ...options };
|
||||
if (
|
||||
command &&
|
||||
icon &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user