mirror of
https://github.com/Abdulazizzn/n8n-enterprise-unlocked.git
synced 2025-12-18 02:21:13 +00:00
feat(editor): Load fixed template list as experiment (#6632)
* feat(editor): Load fixed template list as experiment Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> * Improve templates loading Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> * get rid of endResult message Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> * Do not lazy-load when fixedListExperiment Signed-off-by: Oleg Ivaniv <me@olegivaniv.com> --------- Signed-off-by: Oleg Ivaniv <me@olegivaniv.com>
This commit is contained in:
@@ -33,7 +33,6 @@ import VariablesView from '@/views/VariablesView.vue';
|
||||
import type { IPermissions } from './Interface';
|
||||
import { LOGIN_STATUS, ROLE } from '@/utils';
|
||||
import type { RouteConfigSingleView } from 'vue-router/types/router';
|
||||
import { TEMPLATE_EXPERIMENT, VIEWS } from './constants';
|
||||
import { useSettingsStore } from './stores/settings.store';
|
||||
import { useTemplatesStore } from './stores/templates.store';
|
||||
import { useSSOStore } from './stores/sso.store';
|
||||
@@ -43,7 +42,7 @@ import SignoutView from '@/views/SignoutView.vue';
|
||||
import SamlOnboarding from '@/views/SamlOnboarding.vue';
|
||||
import SettingsSourceControl from './views/SettingsSourceControl.vue';
|
||||
import SettingsAuditLogs from './views/SettingsAuditLogs.vue';
|
||||
import { usePostHog } from './stores/posthog.store';
|
||||
import { VIEWS } from '@/constants';
|
||||
|
||||
Vue.use(Router);
|
||||
|
||||
@@ -63,12 +62,8 @@ interface IRouteConfig extends RouteConfigSingleView {
|
||||
|
||||
function getTemplatesRedirect() {
|
||||
const settingsStore = useSettingsStore();
|
||||
const posthog = usePostHog();
|
||||
const isTemplatesEnabled: boolean = settingsStore.isTemplatesEnabled;
|
||||
if (
|
||||
!posthog.isVariantEnabled(TEMPLATE_EXPERIMENT.name, TEMPLATE_EXPERIMENT.variant) &&
|
||||
!isTemplatesEnabled
|
||||
) {
|
||||
if (!isTemplatesEnabled) {
|
||||
return { name: VIEWS.NOT_FOUND };
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user