mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 23:12:21 -04:00
Satisfy prettier
This commit is contained in:
parent
f9565cbb80
commit
12c0a26dc9
7 changed files with 15 additions and 8 deletions
|
@ -51,7 +51,7 @@
|
|||
if (activatable) {
|
||||
updateButton(command);
|
||||
|
||||
commandMap.subscribe((map: Map<string, boolean>): () => void => {
|
||||
commandMap.subscribe((map: Map<string, boolean>): (() => void) => {
|
||||
active = map.get(command);
|
||||
return () => map.delete(command);
|
||||
});
|
||||
|
|
|
@ -32,7 +32,8 @@
|
|||
* be displayed outside of the visible area
|
||||
*/
|
||||
const dropdown = new Dropdown(button);
|
||||
const menu = (button.getRootNode() as Document /* or shadow root */).getElementById(menuId);
|
||||
const menu = (button.getRootNode() as Document) /* or shadow root */
|
||||
.getElementById(menuId);
|
||||
|
||||
if (!menu) {
|
||||
console.log(`Could not find menu "${menuId}" for dropdown menu.`);
|
||||
|
|
|
@ -35,7 +35,8 @@ function onCloze(event: MouseEvent): void {
|
|||
|
||||
const iconButton = dynamicComponent<typeof IconButton, IconButtonProps>(IconButton);
|
||||
|
||||
export function getClozeButton(): DynamicSvelteComponent<typeof IconButton> & IconButtonProps {
|
||||
export function getClozeButton(): DynamicSvelteComponent<typeof IconButton> &
|
||||
IconButtonProps {
|
||||
return iconButton({
|
||||
id: "cloze",
|
||||
icon: bracketsIcon,
|
||||
|
|
|
@ -29,7 +29,8 @@ const iconButton = dynamicComponent<typeof IconButton, IconButtonProps>(IconButt
|
|||
const colorPicker = dynamicComponent<typeof ColorPicker, ColorPickerProps>(ColorPicker);
|
||||
const buttonGroup = dynamicComponent<typeof ButtonGroup, ButtonGroupProps>(ButtonGroup);
|
||||
|
||||
export function getColorGroup(): DynamicSvelteComponent<typeof ButtonGroup> & ButtonGroupProps {
|
||||
export function getColorGroup(): DynamicSvelteComponent<typeof ButtonGroup> &
|
||||
ButtonGroupProps {
|
||||
const forecolorButton = iconButton({
|
||||
icon: squareFillIcon,
|
||||
className: "forecolor",
|
||||
|
|
|
@ -19,7 +19,8 @@ const commandIconButton = dynamicComponent<
|
|||
>(CommandIconButton);
|
||||
const buttonGroup = dynamicComponent<typeof ButtonGroup, ButtonGroupProps>(ButtonGroup);
|
||||
|
||||
export function getFormatGroup(): DynamicSvelteComponent<typeof ButtonGroup> & ButtonGroupProps {
|
||||
export function getFormatGroup(): DynamicSvelteComponent<typeof ButtonGroup> &
|
||||
ButtonGroupProps {
|
||||
const boldButton = commandIconButton({
|
||||
icon: boldIcon,
|
||||
command: "bold",
|
||||
|
|
|
@ -10,7 +10,8 @@ import * as tr from "anki/i18n";
|
|||
const labelButton = dynamicComponent<typeof LabelButton, LabelButtonProps>(LabelButton);
|
||||
const buttonGroup = dynamicComponent<typeof ButtonGroup, ButtonGroupProps>(ButtonGroup);
|
||||
|
||||
export function getNotetypeGroup(): DynamicSvelteComponent<typeof ButtonGroup> & ButtonGroupProps {
|
||||
export function getNotetypeGroup(): DynamicSvelteComponent<typeof ButtonGroup> &
|
||||
ButtonGroupProps {
|
||||
const fieldsButton = labelButton({
|
||||
onClick: () => bridgeCommand("fields"),
|
||||
disables: false,
|
||||
|
|
|
@ -47,7 +47,8 @@ const dropdownItem = dynamicComponent<typeof DropdownItem, DropdownItemProps>(
|
|||
);
|
||||
const buttonGroup = dynamicComponent<typeof ButtonGroup, ButtonGroupProps>(ButtonGroup);
|
||||
|
||||
export function getTemplateGroup(): DynamicSvelteComponent<typeof ButtonGroup> & ButtonGroupProps {
|
||||
export function getTemplateGroup(): DynamicSvelteComponent<typeof ButtonGroup> &
|
||||
ButtonGroupProps {
|
||||
const attachmentButton = iconButton({
|
||||
icon: paperclipIcon,
|
||||
onClick: onAttachment,
|
||||
|
@ -88,7 +89,8 @@ export function getTemplateGroup(): DynamicSvelteComponent<typeof ButtonGroup> &
|
|||
});
|
||||
}
|
||||
|
||||
export function getTemplateMenus(): (DynamicSvelteComponent<typeof DropdownMenu> & DropdownMenuProps)[] {
|
||||
export function getTemplateMenus(): (DynamicSvelteComponent<typeof DropdownMenu> &
|
||||
DropdownMenuProps)[] {
|
||||
const mathjaxMenu = dropdownMenu({
|
||||
id: mathjaxMenuId,
|
||||
menuItems: [
|
||||
|
|
Loading…
Reference in a new issue