Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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[] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,4 +93,5 @@

.p-Widget.dialogOverlay .dialogBlock .dialogContent.additional-urls-dialog {
display: block;
overflow: hidden;
}
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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;
}
}