mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-14 23:06:34 +00:00
parent
671d2eabd4
commit
364f8b8e51
@ -181,10 +181,10 @@ export class AdditionalUrlsDialog extends AbstractDialog<string[]> {
|
|||||||
);
|
);
|
||||||
this.contentNode.appendChild(anchor);
|
this.contentNode.appendChild(anchor);
|
||||||
|
|
||||||
this.appendAcceptButton(nls.localize('vscode/issueMainService/ok', 'OK'));
|
|
||||||
this.appendCloseButton(
|
this.appendCloseButton(
|
||||||
nls.localize('vscode/issueMainService/cancel', 'Cancel')
|
nls.localize('vscode/issueMainService/cancel', 'Cancel')
|
||||||
);
|
);
|
||||||
|
this.appendAcceptButton(nls.localize('vscode/issueMainService/ok', 'OK'));
|
||||||
}
|
}
|
||||||
|
|
||||||
get value(): string[] {
|
get value(): string[] {
|
||||||
|
@ -126,13 +126,13 @@ export class LibraryListWidget extends ListWidget<
|
|||||||
),
|
),
|
||||||
message,
|
message,
|
||||||
buttons: [
|
buttons: [
|
||||||
nls.localize('arduino/library/installAll', 'Install all'),
|
nls.localize('vscode/issueMainService/cancel', 'Cancel'),
|
||||||
nls.localize(
|
nls.localize(
|
||||||
'arduino/library/installOnly',
|
'arduino/library/installOnly',
|
||||||
'Install {0} only',
|
'Install {0} only',
|
||||||
item.name
|
item.name
|
||||||
),
|
),
|
||||||
nls.localize('vscode/issueMainService/cancel', 'Cancel'),
|
nls.localize('arduino/library/installAll', 'Install all'),
|
||||||
],
|
],
|
||||||
maxWidth: 740, // Aligned with `settings-dialog.css`.
|
maxWidth: 740, // Aligned with `settings-dialog.css`.
|
||||||
}).open();
|
}).open();
|
||||||
@ -201,7 +201,9 @@ class MessageBoxDialog extends AbstractDialog<MessageBoxDialog.Result> {
|
|||||||
options.buttons || [nls.localize('vscode/issueMainService/ok', 'OK')]
|
options.buttons || [nls.localize('vscode/issueMainService/ok', 'OK')]
|
||||||
).forEach((text, index) => {
|
).forEach((text, index) => {
|
||||||
const button = this.createButton(text);
|
const button = this.createButton(text);
|
||||||
button.classList.add(index === 0 ? 'main' : 'secondary');
|
const isPrimaryButton =
|
||||||
|
index === (options.buttons ? options.buttons.length - 1 : 0);
|
||||||
|
button.classList.add(isPrimaryButton ? 'main' : 'secondary');
|
||||||
this.controlPanel.appendChild(button);
|
this.controlPanel.appendChild(button);
|
||||||
this.toDisposeOnDetach.push(
|
this.toDisposeOnDetach.push(
|
||||||
addEventListener(button, 'click', () => {
|
addEventListener(button, 'click', () => {
|
||||||
|
@ -93,4 +93,5 @@
|
|||||||
|
|
||||||
.p-Widget.dialogOverlay .dialogBlock .dialogContent.additional-urls-dialog {
|
.p-Widget.dialogOverlay .dialogBlock .dialogContent.additional-urls-dialog {
|
||||||
display: block;
|
display: block;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,8 @@ export class WorkspaceInputDialog extends TheiaWorkspaceInputDialog {
|
|||||||
constructor(
|
constructor(
|
||||||
@inject(WorkspaceInputDialogProps)
|
@inject(WorkspaceInputDialogProps)
|
||||||
protected override readonly props: WorkspaceInputDialogProps,
|
protected override readonly props: WorkspaceInputDialogProps,
|
||||||
@inject(LabelProvider) protected override readonly labelProvider: LabelProvider
|
@inject(LabelProvider)
|
||||||
|
protected override readonly labelProvider: LabelProvider
|
||||||
) {
|
) {
|
||||||
super(props, labelProvider);
|
super(props, labelProvider);
|
||||||
this.appendCloseButton(
|
this.appendCloseButton(
|
||||||
@ -41,4 +42,14 @@ export class WorkspaceInputDialog extends TheiaWorkspaceInputDialog {
|
|||||||
this.errorMessageNode.innerText = DialogError.getMessage(error);
|
this.errorMessageNode.innerText = DialogError.getMessage(error);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override appendCloseButton(text: string): HTMLButtonElement {
|
||||||
|
this.closeButton = this.createButton(text);
|
||||||
|
this.controlPanel.insertBefore(
|
||||||
|
this.closeButton,
|
||||||
|
this.controlPanel.lastChild
|
||||||
|
);
|
||||||
|
this.closeButton.classList.add('secondary');
|
||||||
|
return this.closeButton;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user