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 props: Record<string, string> = {};
|
||||||
export let title: string;
|
export let title: string;
|
||||||
|
|
||||||
export let onChange: (event: ChangeEvent) => void;
|
export let onChange: (event: Event) => void;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
|
@ -50,13 +50,13 @@
|
|||||||
if (activatable) {
|
if (activatable) {
|
||||||
initializeButton(command);
|
initializeButton(command);
|
||||||
|
|
||||||
commandMap.subscribe((map: Record<string, boolean>): void => {
|
commandMap.subscribe((map: Map<string, boolean>): void => {
|
||||||
active = map.get(command);
|
active = map.get(command);
|
||||||
return () => map.delete(command);
|
return () => map.delete(command);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function onClick(event: ClickEvent): void {
|
function onClick(): void {
|
||||||
document.execCommand(command);
|
document.execCommand(command);
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
export let props: Record<string, string> = {};
|
export let props: Record<string, string> = {};
|
||||||
export let title: string;
|
export let title: string;
|
||||||
|
|
||||||
export let onClick: (event: ClickEvent) => void;
|
export let onClick: (event: MouseEvent) => void;
|
||||||
export let label: string;
|
export let label: string;
|
||||||
export let endLabel: string;
|
export let endLabel: string;
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<script lang="typescript">
|
<script lang="typescript">
|
||||||
|
import type { SvelteComponent } from "svelte";
|
||||||
import type { Readable } from "svelte/store";
|
import type { Readable } from "svelte/store";
|
||||||
import { setContext } from "svelte";
|
import { setContext } from "svelte";
|
||||||
import { disabledKey, nightModeKey } from "./contextKeys";
|
import { disabledKey, nightModeKey } from "./contextKeys";
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
export let title: string;
|
export let title: string;
|
||||||
|
|
||||||
export let icon = "";
|
export let icon = "";
|
||||||
export let onClick: (event: ClickEvent) => void;
|
export let onClick: (event: MouseEvent) => void;
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<SquareButton {id} {className} {props} {title} {onClick} on:mount>
|
<SquareButton {id} {className} {props} {title} {onClick} on:mount>
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
export let label: string;
|
export let label: string;
|
||||||
export let title: string;
|
export let title: string;
|
||||||
export let onClick: (event: ClickEvent) => void;
|
export let onClick: (event: MouseEvent) => void;
|
||||||
export let disables = true;
|
export let disables = true;
|
||||||
|
|
||||||
let buttonRef: HTMLButtonElement;
|
let buttonRef: HTMLButtonElement;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
<script lang="typescript">
|
<script lang="typescript">
|
||||||
import { onMount, createEventDispatcher, getContext } from "svelte";
|
import { onMount, createEventDispatcher, getContext } from "svelte";
|
||||||
import type { Readable } from "svelte/store";
|
|
||||||
import { disabledKey } from "./contextKeys";
|
import { disabledKey } from "./contextKeys";
|
||||||
import SelectOption from "./SelectOption.svelte";
|
import SelectOption from "./SelectOption.svelte";
|
||||||
|
|
||||||
@ -19,7 +18,7 @@
|
|||||||
return `form-select ${classes}`;
|
return `form-select ${classes}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export let disables;
|
export let disables = true;
|
||||||
export let options: Option[];
|
export let options: Option[];
|
||||||
|
|
||||||
let buttonRef: HTMLSelectElement;
|
let buttonRef: HTMLSelectElement;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
export let props: Record<string, string> = {};
|
export let props: Record<string, string> = {};
|
||||||
export let title: string;
|
export let title: string;
|
||||||
|
|
||||||
export let onClick: (event: ClickEvent) => void;
|
export let onClick: (event: MouseEvent) => void;
|
||||||
export let active = false;
|
export let active = false;
|
||||||
|
|
||||||
let buttonRef: HTMLButtonElement;
|
let buttonRef: HTMLButtonElement;
|
||||||
|
@ -1,6 +1,4 @@
|
|||||||
<script lang="typescript">
|
<script lang="typescript">
|
||||||
import { onMount } from "svelte";
|
|
||||||
|
|
||||||
import type { ButtonDefinition } from "./types";
|
import type { ButtonDefinition } from "./types";
|
||||||
|
|
||||||
export let button: ButtonDefinition;
|
export let button: ButtonDefinition;
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
export let nightModeKey = Symbol("nightMode");
|
export const nightModeKey = Symbol("nightMode");
|
||||||
export let disabledKey = Symbol("disabled");
|
export const disabledKey = Symbol("disabled");
|
||||||
|
Loading…
Reference in New Issue
Block a user