started fixing veevalidate (migrating to v3)
This commit is contained in:
32
src/main.ts
32
src/main.ts
@@ -11,7 +11,7 @@ import VueLogger from 'vuejs-logger';
|
||||
import VueSocketIOExt from 'vue-socket.io-extended';
|
||||
import io from 'socket.io-client';
|
||||
import i18n from '@/plugins/i18n';
|
||||
import { ValidationProvider } from 'vee-validate';
|
||||
import { ValidationObserver, ValidationProvider, extend, localize } from 'vee-validate';
|
||||
// @ts-ignore
|
||||
import FlagIcon from 'vue-flag-icon';
|
||||
// @ts-ignore
|
||||
@@ -34,6 +34,7 @@ import {
|
||||
faPencilAlt,
|
||||
faCogs,
|
||||
faAt,
|
||||
faIdBadge,
|
||||
faUser,
|
||||
faEnvelope,
|
||||
faHome,
|
||||
@@ -57,6 +58,11 @@ import {
|
||||
|
||||
import { faOpenid,
|
||||
} from '@fortawesome/free-brands-svg-icons';
|
||||
|
||||
import {
|
||||
faDotCircle,
|
||||
} from '@fortawesome/free-regular-svg-icons';
|
||||
|
||||
import {FontAwesomeIcon} from '@fortawesome/vue-fontawesome';
|
||||
|
||||
|
||||
@@ -71,7 +77,8 @@ Vue.prototype.$isProduction = isProduction;
|
||||
|
||||
library.add(faCoffee, faTrash, faPencilAlt, faScroll, faCheck, faCircle, faList, faPlus, faDoorOpen, faCogs, faAt,
|
||||
faUser, faEnvelope, faUserTag, faExternalLinkAlt, faSync, faHome, faCode, faBarcode, faTag, faTags, faVideo, faLock,
|
||||
faLockOpen, faArrowCircleLeft, faArrowCircleRight, faWrench, faPlay, faFrown, faSmile, faThumbsUp, faThumbsDown, faOpenid);
|
||||
faLockOpen, faArrowCircleLeft, faArrowCircleRight, faWrench, faPlay, faFrown, faSmile, faThumbsUp, faThumbsDown,
|
||||
faOpenid, faDotCircle, faIdBadge);
|
||||
|
||||
Vue.component('font-awesome-icon', FontAwesomeIcon);
|
||||
|
||||
@@ -92,9 +99,24 @@ Vue.use(BootstrapVue);
|
||||
Vue.use(FlagIcon);
|
||||
Vue.use(VueCookies);
|
||||
Vue.use(VueSweetalert2);
|
||||
// Vue.use(VeeValidate);
|
||||
Vue.use(VueMoment);
|
||||
|
||||
|
||||
import en from 'vee-validate/dist/locale/en.json';
|
||||
import de from 'vee-validate/dist/locale/de.json';
|
||||
import es from 'vee-validate/dist/locale/es.json';
|
||||
import * as rules from 'vee-validate/dist/rules';
|
||||
|
||||
// install rules and localization
|
||||
Object.keys(rules).forEach((rule) => {
|
||||
// @ts-ignore
|
||||
extend(rule, rules[rule]);
|
||||
});
|
||||
|
||||
localize('de', de);
|
||||
|
||||
// Install components globally
|
||||
Vue.component('ValidationObserver', ValidationObserver);
|
||||
Vue.component('ValidationProvider', ValidationProvider);
|
||||
|
||||
// const socket = io('ws://localhost:5000',{autoConnect: false, reconnectionAttempts: 3});
|
||||
@@ -106,10 +128,6 @@ const socket = io('ws://localhost:5443', {
|
||||
Vue.use(VueSocketIOExt, socket);
|
||||
|
||||
|
||||
// setup fake backend
|
||||
// import { configureFakeBackend } from './helpers';
|
||||
// configureFakeBackend();
|
||||
|
||||
|
||||
Vue.config.productionTip = false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user