mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-07-12 22:06:34 +00:00
parent
671d2eabd4
commit
364f8b8e51
@ -181,10 +181,10 @@ export class AdditionalUrlsDialog extends AbstractDialog<string[]> {
|
||||
);
|
||||
this.contentNode.appendChild(anchor);
|
||||
|
||||
this.appendAcceptButton(nls.localize('vscode/issueMainService/ok', 'OK'));
|
||||
this.appendCloseButton(
|
||||
nls.localize('vscode/issueMainService/cancel', 'Cancel')
|
||||
);
|
||||
this.appendAcceptButton(nls.localize('vscode/issueMainService/ok', 'OK'));
|
||||
}
|
||||
|
||||
get value(): string[] {
|
||||
|
@ -126,13 +126,13 @@ export class LibraryListWidget extends ListWidget<
|
||||
),
|
||||
message,
|
||||
buttons: [
|
||||
nls.localize('arduino/library/installAll', 'Install all'),
|
||||
nls.localize('vscode/issueMainService/cancel', 'Cancel'),
|
||||
nls.localize(
|
||||
'arduino/library/installOnly',
|
||||
'Install {0} only',
|
||||
item.name
|
||||
),
|
||||
nls.localize('vscode/issueMainService/cancel', 'Cancel'),
|
||||
nls.localize('arduino/library/installAll', 'Install all'),
|
||||
],
|
||||
maxWidth: 740, // Aligned with `settings-dialog.css`.
|
||||
}).open();
|
||||
@ -201,7 +201,9 @@ class MessageBoxDialog extends AbstractDialog<MessageBoxDialog.Result> {
|
||||
options.buttons || [nls.localize('vscode/issueMainService/ok', 'OK')]
|
||||
).forEach((text, index) => {
|
||||
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.toDisposeOnDetach.push(
|
||||
addEventListener(button, 'click', () => {
|
||||
|
@ -93,4 +93,5 @@
|
||||
|
||||
.p-Widget.dialogOverlay .dialogBlock .dialogContent.additional-urls-dialog {
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
@ -14,7 +14,8 @@ export class WorkspaceInputDialog extends TheiaWorkspaceInputDialog {
|
||||
constructor(
|
||||
@inject(WorkspaceInputDialogProps)
|
||||
protected override readonly props: WorkspaceInputDialogProps,
|
||||
@inject(LabelProvider) protected override readonly labelProvider: LabelProvider
|
||||
@inject(LabelProvider)
|
||||
protected override readonly labelProvider: LabelProvider
|
||||
) {
|
||||
super(props, labelProvider);
|
||||
this.appendCloseButton(
|
||||
@ -41,4 +42,14 @@ export class WorkspaceInputDialog extends TheiaWorkspaceInputDialog {
|
||||
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