From d7ce62c0473d03b46999996f627203f49617cf64 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 3 Feb 2019 14:49:04 -0800 Subject: [PATCH] Re-add socket mixin, works fine? --- .../scripts/components/server/Server.ts | 23 +++++++++++-------- webpack.config.js | 1 + 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/resources/assets/scripts/components/server/Server.ts b/resources/assets/scripts/components/server/Server.ts index 9d712ac84..cbcb78aa8 100644 --- a/resources/assets/scripts/components/server/Server.ts +++ b/resources/assets/scripts/components/server/Server.ts @@ -1,16 +1,21 @@ import Vue from 'vue'; -import Navigation from '../core/Navigation'; +import Navigation from '@/components/core/Navigation'; import ProgressBar from './components/ProgressBar'; import { mapState } from 'vuex'; import * as io from 'socket.io-client'; +import { Socketio } from "@/mixins/socketio"; +import Icon from "@/components/core/Icon"; +import PowerButtons from "@/components/server/components/PowerButtons"; export default Vue.component('server', { - components: { ProgressBar, Navigation }, + components: { ProgressBar, PowerButtons, Navigation, Icon }, computed: { ...mapState('server', ['server', 'credentials']), ...mapState('socket', ['connected', 'connectionError']), }, + mixins: [ Socketio ], + // Watch for route changes that occur with different server parameters. This occurs when a user // uses the search bar. Because of the way vue-router works, it won't re-mount the server component // so we will end up seeing the wrong server data if we don't perform this watch. @@ -83,25 +88,25 @@ export default Vue.component('server', {
- Console + Console - Files + Files - Subusers + Subusers - Schedules + Schedules - Databases + Databases - Allocations + Allocations - Settings + Settings
diff --git a/webpack.config.js b/webpack.config.js index 6ef2fd69a..d27f35443 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -164,6 +164,7 @@ module.exports = { extensions: ['.ts', '.js', '.vue', '.json'], alias: { 'vue$': 'vue/dist/vue.esm.js', + '@': path.join(__dirname, 'resources/assets/scripts'), }, symlinks: false, },