mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 18:41:14 +00:00
feat(editor): Migrate deviceSupportHelpers mixin to useDeviceSupport composable (no-changelog) (#8289)
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
:class="{
|
||||
'node-default': true,
|
||||
'touch-active': isTouchActive,
|
||||
'is-touch-device': isTouchDevice,
|
||||
'is-touch-device': deviceSupport.isTouchDevice,
|
||||
'menu-open': isContextMenuOpen,
|
||||
'disable-pointer-events': disablePointerEvents,
|
||||
}"
|
||||
@@ -187,6 +187,7 @@ import { type ContextMenuTarget, useContextMenu } from '@/composables/useContext
|
||||
import { useNodeHelpers } from '@/composables/useNodeHelpers';
|
||||
import { useExternalHooks } from '@/composables/useExternalHooks';
|
||||
import { usePinnedData } from '@/composables/usePinnedData';
|
||||
import { useDeviceSupport } from 'n8n-design-system';
|
||||
import { useDebounce } from '@/composables/useDebounce';
|
||||
|
||||
export default defineComponent({
|
||||
@@ -218,9 +219,17 @@ export default defineComponent({
|
||||
const nodeHelpers = useNodeHelpers();
|
||||
const node = workflowsStore.getNodeByName(props.name);
|
||||
const pinnedData = usePinnedData(node);
|
||||
const deviceSupport = useDeviceSupport();
|
||||
const { callDebounced } = useDebounce();
|
||||
|
||||
return { contextMenu, externalHooks, nodeHelpers, pinnedData, callDebounced };
|
||||
return {
|
||||
contextMenu,
|
||||
externalHooks,
|
||||
nodeHelpers,
|
||||
pinnedData,
|
||||
deviceSupport,
|
||||
callDebounced,
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapStores(useNodeTypesStore, useNDVStore, useUIStore, useWorkflowsStore),
|
||||
@@ -698,7 +707,7 @@ export default defineComponent({
|
||||
this.pinDataDiscoveryTooltipVisible = false;
|
||||
},
|
||||
touchStart() {
|
||||
if (this.isTouchDevice === true && !this.isMacOs && !this.isTouchActive) {
|
||||
if (this.deviceSupport.isTouchDevice && !this.deviceSupport.isMacOs && !this.isTouchActive) {
|
||||
this.isTouchActive = true;
|
||||
setTimeout(() => {
|
||||
this.isTouchActive = false;
|
||||
|
||||
Reference in New Issue
Block a user