You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

83 lines
1.9 KiB

4 years ago
import Vue from 'vue'
import App from './App.vue'
import store from '@/store/index'
4 years ago
import {ApiConfig} from "@/config/index";
4 years ago
import BootstrapVue from 'bootstrap-vue'
import 'bootstrap/dist/css/bootstrap.css'
import 'bootstrap-vue/dist/bootstrap-vue.css'
import VueSweetalert2 from 'vue-sweetalert2';
4 years ago
import 'sweetalert2/dist/sweetalert2.min.css';
4 years ago
Vue.use(VueSweetalert2);
import VueWait from 'vue-wait'
import { ValidationProvider } from 'vee-validate';
Vue.use(VueWait)
import "@/assets/css/_cards.scss";
import VueSocketIOExt from 'vue-socket.io-extended';
//import io from 'socket.io-client';
import { io } from 'socket.io-client';
//const socket = io('https://factory.swarmlab.io:55527', {
4 years ago
//const socket = io('https://localhost:3080', {
var socketurl = ApiConfig.url_80;
const socket = io(socketurl, {
4 years ago
autoConnect: false,
reconnection: true,
reconnectionDelay: 500,
maxReconnectionAttempts: Infinity,
pingInterval: 25000,
pingTimeout: 60000,
transports: [ 'websocket', 'polling' ],
4 years ago
secure: true,
rejectUnauthorized: false
4 years ago
});
//const socket = io('http://localhost:3000', { autoConnect: false });
Vue.use(VueSocketIOExt, socket);
//Vue.use(VueSocketIOExt, socket);
Vue.use(BootstrapVue);
const config = {
aria: true,
classNames: {
valid: "is-valid",
invalid: "is-invalid"
},
classes: true,
delay: 0,
dictionary: null,
errorBagName: 'vErrors', // change if property conflicts
events: 'input|blur',
fieldsBagName: 'vFields',
i18n: null, // the vue-i18n plugin instance
i18nRootKey: 'validations', // the nested key under which the validation messages will be located
inject: true,
locale: 'en',
validity: false,
useConstraintAttrs: true
};
//Vue.use(ValidationProvider,config);
Vue.component('ValidationProvider', ValidationProvider);
Vue.config.productionTip = false
new Vue({
el: '#app',
store,
wait: new VueWait(),
render: h => h(App)
})