mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-16 01:24:05 -08:00
cb3bfc32f7
* ✅ Adding first batch of workflow actions tests * ✅ Adding loading handling logic and new workflow actions tests * ✅ Added workflow activation and rename tests * 👌 Addressing review feedback * 🔥 Removing leftover commented code
24 lines
544 B
Vue
24 lines
544 B
Vue
<template>
|
|
<span :title="name" :data-test-id="testId">
|
|
<slot :shortenedName="shortenedName"></slot>
|
|
</span>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import Vue from "vue";
|
|
import { shorten } from "@/utils";
|
|
|
|
const DEFAULT_WORKFLOW_NAME_LIMIT = 25;
|
|
const WORKFLOW_NAME_END_COUNT_TO_KEEP = 4;
|
|
|
|
export default Vue.extend({
|
|
name: "ShortenName",
|
|
props: ["name", "limit", "testId"],
|
|
computed: {
|
|
shortenedName(): string {
|
|
return shorten(this.name, this.limit || DEFAULT_WORKFLOW_NAME_LIMIT, WORKFLOW_NAME_END_COUNT_TO_KEEP);
|
|
},
|
|
},
|
|
});
|
|
</script>
|