Fix some code quality issues
This commit is contained in:
parent
96feba7a3e
commit
37ed3e8209
19
qt/aqt/data/web/imgs/vendor/BUILD.bazel
vendored
19
qt/aqt/data/web/imgs/vendor/BUILD.bazel
vendored
@ -1,19 +0,0 @@
|
||||
load("//ts:vendor.bzl", "copy_bootstrap_icons", "copy_fontawesome_icons")
|
||||
|
||||
copy_bootstrap_icons(name = "bootstrap-icons")
|
||||
|
||||
copy_fontawesome_icons(name = "fontawesome-icons")
|
||||
|
||||
files = [
|
||||
"bootstrap-icons",
|
||||
"fontawesome-icons",
|
||||
]
|
||||
|
||||
directories = []
|
||||
|
||||
filegroup(
|
||||
name = "vendor",
|
||||
srcs = ["//qt/aqt/data/web/imgs/vendor:{}".format(file) for file in files] +
|
||||
["//qt/aqt/data/web/imgs/vendor/{}".format(dir) for dir in directories],
|
||||
visibility = ["//qt:__subpackages__"],
|
||||
)
|
@ -4,7 +4,7 @@
|
||||
export let props: Record<string, string> = {};
|
||||
export let title: string;
|
||||
|
||||
export let onChange: (event: ChangeEvent) => void;
|
||||
export let onChange: (event: Event) => void;
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
|
@ -50,13 +50,13 @@
|
||||
if (activatable) {
|
||||
initializeButton(command);
|
||||
|
||||
commandMap.subscribe((map: Record<string, boolean>): void => {
|
||||
commandMap.subscribe((map: Map<string, boolean>): void => {
|
||||
active = map.get(command);
|
||||
return () => map.delete(command);
|
||||
});
|
||||
}
|
||||
|
||||
function onClick(event: ClickEvent): void {
|
||||
function onClick(): void {
|
||||
document.execCommand(command);
|
||||
}
|
||||
</script>
|
||||
|
@ -4,7 +4,7 @@
|
||||
export let props: Record<string, string> = {};
|
||||
export let title: string;
|
||||
|
||||
export let onClick: (event: ClickEvent) => void;
|
||||
export let onClick: (event: MouseEvent) => void;
|
||||
export let label: string;
|
||||
export let endLabel: string;
|
||||
</script>
|
||||
|
@ -1,4 +1,5 @@
|
||||
<script lang="typescript">
|
||||
import type { SvelteComponent } from "svelte";
|
||||
import type { Readable } from "svelte/store";
|
||||
import { setContext } from "svelte";
|
||||
import { disabledKey, nightModeKey } from "./contextKeys";
|
||||
|
@ -7,7 +7,7 @@
|
||||
export let title: string;
|
||||
|
||||
export let icon = "";
|
||||
export let onClick: (event: ClickEvent) => void;
|
||||
export let onClick: (event: MouseEvent) => void;
|
||||
</script>
|
||||
|
||||
<SquareButton {id} {className} {props} {title} {onClick} on:mount>
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
export let label: string;
|
||||
export let title: string;
|
||||
export let onClick: (event: ClickEvent) => void;
|
||||
export let onClick: (event: MouseEvent) => void;
|
||||
export let disables = true;
|
||||
|
||||
let buttonRef: HTMLButtonElement;
|
||||
|
@ -1,6 +1,5 @@
|
||||
<script lang="typescript">
|
||||
import { onMount, createEventDispatcher, getContext } from "svelte";
|
||||
import type { Readable } from "svelte/store";
|
||||
import { disabledKey } from "./contextKeys";
|
||||
import SelectOption from "./SelectOption.svelte";
|
||||
|
||||
@ -19,7 +18,7 @@
|
||||
return `form-select ${classes}`;
|
||||
}
|
||||
|
||||
export let disables;
|
||||
export let disables = true;
|
||||
export let options: Option[];
|
||||
|
||||
let buttonRef: HTMLSelectElement;
|
||||
|
@ -8,7 +8,7 @@
|
||||
export let props: Record<string, string> = {};
|
||||
export let title: string;
|
||||
|
||||
export let onClick: (event: ClickEvent) => void;
|
||||
export let onClick: (event: MouseEvent) => void;
|
||||
export let active = false;
|
||||
|
||||
let buttonRef: HTMLButtonElement;
|
||||
|
@ -1,6 +1,4 @@
|
||||
<script lang="typescript">
|
||||
import { onMount } from "svelte";
|
||||
|
||||
import type { ButtonDefinition } from "./types";
|
||||
|
||||
export let button: ButtonDefinition;
|
||||
|
@ -1,2 +1,2 @@
|
||||
export let nightModeKey = Symbol("nightMode");
|
||||
export let disabledKey = Symbol("disabled");
|
||||
export const nightModeKey = Symbol("nightMode");
|
||||
export const disabledKey = Symbol("disabled");
|
||||
|
Loading…
Reference in New Issue
Block a user