* ✨ Create rule `no-unneeded-backticks` * 👕 Enable rule * ⚡ Run rule on `cli` * ⚡ Run rule on `core` * ⚡ Run rule on `workflow` * ⚡ Rule rule on `design-system` * ⚡ Run rule on `node-dev` * ⚡ Run rule on `editor-ui` * ⚡ Run rule on `nodes-base`
29 lines
622 B
TypeScript
29 lines
622 B
TypeScript
import Vue from 'vue';
|
|
|
|
import { WorkflowTitleStatus } from '@/Interface';
|
|
|
|
export const titleChange = Vue.extend({
|
|
methods: {
|
|
/**
|
|
* Change title of n8n tab
|
|
*
|
|
* @param {string} workflow Name of workflow
|
|
* @param {WorkflowTitleStatus} status Status of workflow
|
|
*/
|
|
$titleSet(workflow: string, status: WorkflowTitleStatus) {
|
|
let icon = '⚠️';
|
|
if (status === 'EXECUTING') {
|
|
icon = '🔄';
|
|
} else if (status === 'IDLE') {
|
|
icon = '▶️';
|
|
}
|
|
|
|
window.document.title = `n8n - ${icon} ${workflow}`;
|
|
},
|
|
|
|
$titleReset() {
|
|
document.title = 'n8n - Workflow Automation';
|
|
},
|
|
},
|
|
});
|