mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-17 18:12:04 +00:00
* ✅ Added title changes based on workflow execution * ⚡ Title changes on workflow open, reset on workflow delete, fixed not showing when page refreshed * ⚡ Title icons
25 lines
643 B
TypeScript
25 lines
643 B
TypeScript
type Status = 'EXECUTING' | 'IDLE' | 'ERROR';
|
|
|
|
export default {
|
|
/**
|
|
* Change title of n8n tab
|
|
* @param workflow Name of workflow
|
|
* @param status Status of workflow
|
|
*/
|
|
set (workflow : string, status : Status) {
|
|
if (status === 'EXECUTING') {
|
|
window.document.title = `n8n - 🔄 ${workflow}}`;
|
|
}
|
|
else if (status === 'IDLE') {
|
|
window.document.title = `n8n - ▶️ ${workflow}`;
|
|
}
|
|
else {
|
|
window.document.title = `n8n - ⚠️ ${workflow}`;
|
|
}
|
|
|
|
},
|
|
|
|
reset () {
|
|
document.title = `n8n - Workflow Automation`;
|
|
}
|
|
}; |