mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-15 09:04:07 -08:00
390841bbf0
* WIP * WIP * Extract actions into composable * WIP: Preserve categories when searching * WIP * WIP: Tweak styles * WIP: Refactor node creator * WIP: Finish Node Creator node view/subcategories refactor * WIP: Finished actions refactor * Cleanup & Lintfix * WIP: Improve memory managment * Fix interactions * WIP * WIP: Keyboard navigation * Improve keyboard navigation and memory managment * Finished view refactor * FIx custom api calls and activation callouts * Fix actions tracking and cleanup * Product review fixes * Telemetry fixes * Fix node creator e2es * Set action name font size and actionsEmpty font weight * Fix failing credentials spec * Make sure to select first action item when switching from nodes panel to actions panel * Add actions panel e2e tests * Cleanup * Fix actions generation and cleanup * Add correct Learn More link and adjust displaying of trigger icon * Change trigger icon condition to use nodeType group * Cleanup nodeTypesUtils and snapshots and lintfixes * Lint fixes * Refine logic to show trigger icon in node creator * Add unit tests & clean up * Add `003_auto_insert_action` experiment, hide empty sections for opposite root view * Lintfix * Do not show empty category tooltips and only show activation callout in triger root view * Fix no-results node creator view * Spacings tweaks and root rendering logic adjustment * Add unit tests * Lint and e2e fixes * Revert CLI changes, fix unit tests * Remove useless comments * Sync master, replace $externalHooks mixin * Lint fix * Focus first action when panel slides in, not category * Address PR comments * Lint fix * Remove `setAddedNodeActionParameters` optional track param * Further simplify setAddedNodeActionParameters * Fix pnpn lock file * Fix types imports * Fix 13-pinning spec
66 lines
2 KiB
TypeScript
66 lines
2 KiB
TypeScript
// The Vue build version to load with the `import` command
|
|
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
|
|
import Vue from 'vue';
|
|
|
|
import './plugins';
|
|
import 'vue-json-pretty/lib/styles.css';
|
|
import '@jsplumb/browser-ui/css/jsplumbtoolkit.css';
|
|
import 'n8n-design-system/css/index.scss';
|
|
import './n8n-theme.scss';
|
|
|
|
import './styles/autocomplete-theme.scss';
|
|
|
|
import '@fontsource/open-sans/latin-400.css';
|
|
import '@fontsource/open-sans/latin-600.css';
|
|
import '@fontsource/open-sans/latin-700.css';
|
|
|
|
import App from '@/App.vue';
|
|
import router from './router';
|
|
|
|
import { runExternalHook } from '@/utils';
|
|
import { TelemetryPlugin } from './plugins/telemetry';
|
|
import { I18nPlugin, i18nInstance } from './plugins/i18n';
|
|
|
|
import { createPinia, PiniaVuePlugin } from 'pinia';
|
|
|
|
import { useWebhooksStore, useUsersStore } from '@/stores';
|
|
import { VIEWS } from '@/constants';
|
|
|
|
Vue.config.productionTip = false;
|
|
|
|
Vue.use(TelemetryPlugin);
|
|
Vue.use((vue) => I18nPlugin(vue));
|
|
Vue.use(PiniaVuePlugin);
|
|
|
|
const pinia = createPinia();
|
|
|
|
new Vue({
|
|
i18n: i18nInstance,
|
|
router,
|
|
pinia,
|
|
render: (h) => h(App),
|
|
}).$mount('#app');
|
|
|
|
router.afterEach((to, from) => {
|
|
runExternalHook('main.routeChange', useWebhooksStore(), { from, to });
|
|
const userStore = useUsersStore();
|
|
if (userStore.currentUser && to.name && to.name !== VIEWS.SIGNOUT && !to.name.includes('Modal')) {
|
|
userStore.showUserActivationSurveyModal();
|
|
}
|
|
});
|
|
|
|
if (!import.meta.env.PROD) {
|
|
// Make sure that we get all error messages properly displayed
|
|
// as long as we are not in production mode
|
|
window.onerror = (message, source, lineno, colno, error) => {
|
|
if (message.toString().includes('ResizeObserver')) {
|
|
// That error can apparently be ignored and can probably
|
|
// not do anything about it anyway
|
|
return;
|
|
}
|
|
console.error('error caught in main.ts'); // eslint-disable-line no-console
|
|
console.error(message); // eslint-disable-line no-console
|
|
console.error(error); // eslint-disable-line no-console
|
|
};
|
|
}
|