mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-13 16:14:07 -08:00
874c735d0a
* feat(editor): Load workflow sharedWith info only when opening share modal (#5125) * feat(editor): load workflow sharedWith info only when opening share modal * fix(editor): update workflow share modal loading state at the end of initialize fn * feat: initial recycle scroller commit * feat: prepare recycle scroller for dynamic item sizes (no-changelog) * feat: add recycle scroller with variable size support and caching * feat: integrated recycle scroller with existing resources list * feat: improve recycle scroller performance * fix: fix recycle-scroller storybook * fix: update recycle-scroller styles to fix scrollbar size * chore: undo vite config changes * chore: undo installed packages * chore: remove commented code * chore: remove vue-virtual-scroller code. * feat: update size cache updating mechanism * chore: remove console.log * fix: adjust code for e2e tests * fix: fix linting issues
87 lines
2.3 KiB
TypeScript
87 lines
2.3 KiB
TypeScript
// @ts-nocheck
|
|
|
|
import Vue from 'vue';
|
|
import Fragment from 'vue-fragment';
|
|
import VueAgile from 'vue-agile';
|
|
|
|
import 'regenerator-runtime/runtime';
|
|
|
|
import ElementUI from 'element-ui';
|
|
import { Loading, MessageBox, Message, Notification } from 'element-ui';
|
|
import { designSystemComponents } from 'n8n-design-system';
|
|
import { ElMessageBoxOptions } from 'element-ui/types/message-box';
|
|
import EnterpriseEdition from '@/components/EnterpriseEdition.ee.vue';
|
|
|
|
Vue.use(Fragment.Plugin);
|
|
Vue.use(VueAgile);
|
|
|
|
Vue.use(ElementUI);
|
|
Vue.use(designSystemComponents);
|
|
|
|
Vue.component('enterprise-edition', EnterpriseEdition);
|
|
|
|
Vue.use(Loading.directive);
|
|
|
|
Vue.prototype.$loading = Loading.service;
|
|
Vue.prototype.$msgbox = MessageBox;
|
|
|
|
Vue.prototype.$alert = async (
|
|
message: string,
|
|
configOrTitle: string | ElMessageBoxOptions | undefined,
|
|
config: ElMessageBoxOptions | undefined,
|
|
) => {
|
|
let temp = config || (typeof configOrTitle === 'object' ? configOrTitle : {});
|
|
temp = {
|
|
...temp,
|
|
cancelButtonClass: 'btn--cancel',
|
|
confirmButtonClass: 'btn--confirm',
|
|
};
|
|
|
|
if (typeof configOrTitle === 'string') {
|
|
return await MessageBox.alert(message, configOrTitle, temp);
|
|
}
|
|
return await MessageBox.alert(message, temp);
|
|
};
|
|
|
|
Vue.prototype.$confirm = async (
|
|
message: string,
|
|
configOrTitle: string | ElMessageBoxOptions | undefined,
|
|
config: ElMessageBoxOptions | undefined,
|
|
) => {
|
|
let temp = config || (typeof configOrTitle === 'object' ? configOrTitle : {});
|
|
temp = {
|
|
...temp,
|
|
cancelButtonClass: 'btn--cancel',
|
|
confirmButtonClass: 'btn--confirm',
|
|
distinguishCancelAndClose: true,
|
|
showClose: config.showClose || false,
|
|
closeOnClickModal: false,
|
|
};
|
|
|
|
if (typeof configOrTitle === 'string') {
|
|
return await MessageBox.confirm(message, configOrTitle, temp);
|
|
}
|
|
return await MessageBox.confirm(message, temp);
|
|
};
|
|
|
|
Vue.prototype.$prompt = async (
|
|
message: string,
|
|
configOrTitle: string | ElMessageBoxOptions | undefined,
|
|
config: ElMessageBoxOptions | undefined,
|
|
) => {
|
|
let temp = config || (typeof configOrTitle === 'object' ? configOrTitle : {});
|
|
temp = {
|
|
...temp,
|
|
cancelButtonClass: 'btn--cancel',
|
|
confirmButtonClass: 'btn--confirm',
|
|
};
|
|
|
|
if (typeof configOrTitle === 'string') {
|
|
return await MessageBox.prompt(message, configOrTitle, temp);
|
|
}
|
|
return await MessageBox.prompt(message, temp);
|
|
};
|
|
|
|
Vue.prototype.$notify = Notification;
|
|
Vue.prototype.$message = Message;
|