mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 10:02:05 +00:00
fix(editor): Set workflow name width at different breakpoints (#18956)
This commit is contained in:
@@ -62,8 +62,13 @@ import { computed, ref, useCssModule, useTemplateRef, watch } from 'vue';
|
|||||||
import { I18nT } from 'vue-i18n';
|
import { I18nT } from 'vue-i18n';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
|
|
||||||
const WORKFLOW_NAME_MAX_WIDTH_SMALL_SCREENS = 150;
|
const WORKFLOW_NAME_BP_TO_WIDTH: { [key: string]: number } = {
|
||||||
const WORKFLOW_NAME_MAX_WIDTH_WIDE_SCREENS = 200;
|
XS: 150,
|
||||||
|
SM: 200,
|
||||||
|
MD: 250,
|
||||||
|
LG: 500,
|
||||||
|
XL: 1000,
|
||||||
|
};
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
readOnly?: boolean;
|
readOnly?: boolean;
|
||||||
@@ -736,11 +741,7 @@ const onBreadcrumbsItemSelected = (item: PathItem) => {
|
|||||||
class="name"
|
class="name"
|
||||||
:model-value="name"
|
:model-value="name"
|
||||||
:max-length="MAX_WORKFLOW_NAME_LENGTH"
|
:max-length="MAX_WORKFLOW_NAME_LENGTH"
|
||||||
:max-width="
|
:max-width="WORKFLOW_NAME_BP_TO_WIDTH[bp]"
|
||||||
['XS', 'SM'].includes(bp)
|
|
||||||
? WORKFLOW_NAME_MAX_WIDTH_SMALL_SCREENS
|
|
||||||
: WORKFLOW_NAME_MAX_WIDTH_WIDE_SCREENS
|
|
||||||
"
|
|
||||||
:read-only="readOnly || isArchived || (!isNewWorkflow && !workflowPermissions.update)"
|
:read-only="readOnly || isArchived || (!isNewWorkflow && !workflowPermissions.update)"
|
||||||
:disabled="readOnly || isArchived || (!isNewWorkflow && !workflowPermissions.update)"
|
:disabled="readOnly || isArchived || (!isNewWorkflow && !workflowPermissions.update)"
|
||||||
@update:model-value="onNameSubmit"
|
@update:model-value="onNameSubmit"
|
||||||
|
|||||||
Reference in New Issue
Block a user