hardlounge/client/components/Windows/Connect.vue
Pavel Djundik 2f635069e0 Move vuex state to a separate file and reorganize some code
Co-Authored-By: Tim Miller-Williams <timmw@users.noreply.github.com>
2019-11-25 20:12:54 +02:00

32 lines
491 B
Vue

<template>
<NetworkForm
:handle-submit="handleSubmit"
:defaults="$store.state.serverConfiguration.defaults"
:disabled="disabled"
/>
</template>
<script>
const socket = require("../../js/socket");
import NetworkForm from "../NetworkForm.vue";
export default {
name: "Connect",
components: {
NetworkForm,
},
data() {
return {
disabled: false,
};
},
methods: {
handleSubmit(data) {
this.disabled = true;
socket.emit("network:new", data);
},
},
};
</script>