chore(prettier): fix all files

This commit is contained in:
Elian Doran
2025-01-09 18:07:02 +02:00
parent 19ee861699
commit 4cbb529fd4
571 changed files with 23226 additions and 23940 deletions

View File

@@ -4,11 +4,11 @@ import AbstractButtonWidget, { AbstractButtonWidgetSettings } from "./abstract_b
let actions: Action[];
keyboardActionsService.getActions().then(as => actions = as);
keyboardActionsService.getActions().then((as) => (actions = as));
// TODO: Is this actually used?
export type ClickHandler = (widget: CommandButtonWidget, e: JQuery.ClickEvent<any, any, any, any>) => void;
type CommandOrCallback = (CommandNames | (() => CommandNames));
type CommandOrCallback = CommandNames | (() => CommandNames);
interface CommandButtonWidgetSettings extends AbstractButtonWidgetSettings {
command?: CommandOrCallback;
@@ -16,11 +16,10 @@ interface CommandButtonWidgetSettings extends AbstractButtonWidgetSettings {
}
export default class CommandButtonWidget extends AbstractButtonWidget<CommandButtonWidgetSettings> {
constructor() {
super();
this.settings = {
titlePlacement: 'right',
titlePlacement: "right",
title: null,
icon: null,
onContextMenu: null
@@ -46,7 +45,7 @@ export default class CommandButtonWidget extends AbstractButtonWidget<CommandBut
getTitle() {
const title = super.getTitle();
const action = actions.find(act => act.actionName === this._command);
const action = actions.find((act) => act.actionName === this._command);
if (action && action.effectiveShortcuts.length > 0) {
return `${title} (${action.effectiveShortcuts.join(", ")})`;
@@ -66,8 +65,6 @@ export default class CommandButtonWidget extends AbstractButtonWidget<CommandBut
}
get _command() {
return typeof this.settings.command === "function"
? this.settings.command()
: this.settings.command;
return typeof this.settings.command === "function" ? this.settings.command() : this.settings.command;
}
}