feat(editor): Make workflows, credentials, executions and new canvas usable on mobile and touch devices (#12372)

This commit is contained in:
Alex Grozav
2025-01-06 17:09:32 +02:00
committed by GitHub
parent 1b9100032f
commit 06c9473210
25 changed files with 294 additions and 29 deletions

View File

@@ -93,7 +93,7 @@ const props = withDefaults(
},
);
const { controlKeyCode } = useDeviceSupport();
const { isMobileDevice, controlKeyCode } = useDeviceSupport();
const vueFlow = useVueFlow({ id: props.id, deleteKeyCode: null });
const {
@@ -143,9 +143,10 @@ const disableKeyBindings = computed(() => !props.keyBindings);
/**
* @see https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values#whitespace_keys
*/
const panningKeyCode = ref<string[]>([' ', controlKeyCode]);
const panningMouseButton = ref<number[]>([1]);
const selectionKeyCode = ref<true | null>(true);
const panningKeyCode = ref<string[] | true>(isMobileDevice ? true : [' ', controlKeyCode]);
const panningMouseButton = ref<number[] | true>(isMobileDevice ? true : [1]);
const selectionKeyCode = ref<string | true | null>(isMobileDevice ? 'Shift' : true);
onKeyDown(panningKeyCode.value, () => {
selectionKeyCode.value = null;