mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
refactor(editor): Change document title function to be easier to update (no-changelog) (#17627)
This commit is contained in:
@@ -1,15 +1,18 @@
|
||||
import { useSettingsStore } from '@/stores/settings.store';
|
||||
|
||||
const DEFAULT_TITLE = 'Workflow Automation';
|
||||
const DEFAULT_TITLE = 'n8n';
|
||||
const DEFAULT_TAGLINE = 'Workflow Automation';
|
||||
|
||||
export function useDocumentTitle() {
|
||||
const settingsStore = useSettingsStore();
|
||||
const { releaseChannel } = settingsStore.settings;
|
||||
const suffix =
|
||||
!releaseChannel || releaseChannel === 'stable' ? 'n8n' : `n8n[${releaseChannel.toUpperCase()}]`;
|
||||
!releaseChannel || releaseChannel === 'stable'
|
||||
? DEFAULT_TITLE
|
||||
: `${DEFAULT_TITLE}[${releaseChannel.toUpperCase()}]`;
|
||||
|
||||
const set = (title: string) => {
|
||||
const sections = [title || DEFAULT_TITLE, suffix];
|
||||
const sections = [title || DEFAULT_TAGLINE, suffix];
|
||||
document.title = sections.join(' - ');
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user