Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 16ba1a2

Browse files
author
Alberto Iannaccone
committed
fix url to open sketch in cloud editor
1 parent d790266 commit 16ba1a2

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

‎arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-contributions.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ export class CloudSketchbookContribution extends Contribution {
176176
registry.registerCommand(CloudSketchbookCommands.OPEN_IN_CLOUD_EDITOR, {
177177
execute: (arg) => {
178178
this.windowService.openNewWindow(
179-
`https://create.arduino.cc/editor/${arg.node.sketchId}`,
179+
`https://create.arduino.cc/editor/${arg.username}/${arg.node.sketchId}`,
180180
{ external: true }
181181
);
182182
},

‎arduino-ide-extension/src/browser/widgets/cloud-sketchbook/cloud-sketchbook-tree-widget.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,9 @@ export class CloudSketchbookTreeWidget extends SketchbookTreeWidget {
9494
this.currentSketchUri === node.uri.toString())
9595
) {
9696
return Array.from(new Set(node.commands)).map((command) =>
97-
this.renderInlineCommand(command.id, node)
97+
this.renderInlineCommand(command.id, node, {
98+
username: this.authenticationService.session?.account?.label,
99+
})
98100
);
99101
}
100102
return undefined;

‎arduino-ide-extension/src/browser/widgets/sketchbook/sketchbook-tree-widget.tsx‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,11 +125,12 @@ export class SketchbookTreeWidget extends FileTreeWidget {
125125

126126
protected renderInlineCommand(
127127
commandId: string,
128-
node: SketchbookTree.SketchDirNode
128+
node: SketchbookTree.SketchDirNode,
129+
options?: any
129130
): React.ReactNode {
130131
const command = this.commandRegistry.getCommand(commandId);
131132
const icon = command?.iconClass;
132-
const args = { model: this.model, node: node };
133+
const args = { model: this.model, node: node, ...options };
133134
if (
134135
command &&
135136
icon &&

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /