mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-22 03:48:11 +08:00
Disallow snake_case variable names in frontend
This commit is contained in:
@@ -13,8 +13,7 @@ const state = reactive({
|
||||
});
|
||||
|
||||
export async function selectDocument(tabIndex: number) {
|
||||
const { select_document } = await wasm;
|
||||
select_document(tabIndex);
|
||||
(await wasm).select_document(tabIndex);
|
||||
}
|
||||
|
||||
export async function closeDocumentWithConfirmation(tabIndex: number) {
|
||||
|
||||
@@ -34,9 +34,8 @@ export function shouldRedirectKeyboardEventToBackend(e: KeyboardEvent): boolean
|
||||
export async function handleKeyDown(e: KeyboardEvent) {
|
||||
if (shouldRedirectKeyboardEventToBackend(e)) {
|
||||
e.preventDefault();
|
||||
const { on_key_down } = await wasm;
|
||||
const modifiers = makeModifiersBitfield(e.ctrlKey, e.shiftKey, e.altKey);
|
||||
on_key_down(e.key, modifiers);
|
||||
(await wasm).on_key_down(e.key, modifiers);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -52,9 +51,8 @@ export async function handleKeyDown(e: KeyboardEvent) {
|
||||
export async function handleKeyUp(e: KeyboardEvent) {
|
||||
if (shouldRedirectKeyboardEventToBackend(e)) {
|
||||
e.preventDefault();
|
||||
const { on_key_up } = await wasm;
|
||||
const modifiers = makeModifiersBitfield(e.ctrlKey, e.shiftKey, e.altKey);
|
||||
on_key_up(e.key, modifiers);
|
||||
(await wasm).on_key_up(e.key, modifiers);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { reactive } from "vue";
|
||||
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
/* eslint-disable camelcase */
|
||||
|
||||
import { reactive } from "vue";
|
||||
|
||||
type ResponseCallback = (responseData: Response) => void;
|
||||
type ResponseMap = {
|
||||
|
||||
Reference in New Issue
Block a user