mirror of
https://github.com/n8n-io/n8n.git
synced 2025-01-06 10:27:28 -08:00
20 lines
433 B
TypeScript
20 lines
433 B
TypeScript
|
import { WorkflowTitleStatus } from '@/Interface';
|
||
|
|
||
|
export function useTitleChange() {
|
||
|
return {
|
||
|
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';
|
||
|
},
|
||
|
};
|
||
|
}
|