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.

89 lines
2.0 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', {
3 years ago
//
//allowUpgrades: false
//
//
4 years ago
var socketurl = ApiConfig.url_80;
const socket = io(socketurl, {
4 years ago
autoConnect: false,
reconnection: true,
3 years ago
reconnectionDelay: 5000,
reconnectionDelayMax: 5000,
4 years ago
maxReconnectionAttempts: Infinity,
pingInterval: 25000,
3 years ago
pingTimeout: 90000,
timeout: 70000,
4 years ago
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)
})