Skip to content

Commit d7ce62c

Browse files
committed
Re-add socket mixin, works fine?
1 parent 1c6fa6c commit d7ce62c

File tree

2 files changed

+15
-9
lines changed

2 files changed

+15
-9
lines changed

resources/assets/scripts/components/server/Server.ts

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,21 @@
11
import Vue from 'vue';
2-
import Navigation from '../core/Navigation';
2+
import Navigation from '@/components/core/Navigation';
33
import ProgressBar from './components/ProgressBar';
44
import { mapState } from 'vuex';
55
import * as io from 'socket.io-client';
6+
import { Socketio } from "@/mixins/socketio";
7+
import Icon from "@/components/core/Icon";
8+
import PowerButtons from "@/components/server/components/PowerButtons";
69

710
export default Vue.component('server', {
8-
components: { ProgressBar, Navigation },
11+
components: { ProgressBar, PowerButtons, Navigation, Icon },
912
computed: {
1013
...mapState('server', ['server', 'credentials']),
1114
...mapState('socket', ['connected', 'connectionError']),
1215
},
1316

17+
mixins: [ Socketio ],
18+
1419
// Watch for route changes that occur with different server parameters. This occurs when a user
1520
// uses the search bar. Because of the way vue-router works, it won't re-mount the server component
1621
// 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', {
8388
</div>
8489
<div class="mt-6 sidenav mr-6 bg-white border rounded">
8590
<router-link :to="{ name: 'server', params: { id: $route.params.id } }">
86-
<terminal-icon class="h-4"></terminal-icon> Console
91+
<icon name="terminal" class="h-4"></icon> Console
8792
</router-link>
8893
<router-link :to="{ name: 'server-files' }">
89-
<folder-icon class="h-4"></folder-icon> Files
94+
<icon name="folder" class="h-4"></icon> Files
9095
</router-link>
9196
<router-link :to="{ name: 'server-subusers' }">
92-
<users-icon class="h-4"></users-icon> Subusers
97+
<icon name="users" class="h-4"></icon> Subusers
9398
</router-link>
9499
<router-link :to="{ name: 'server-schedules' }">
95-
<calendar-icon class="h-4"></calendar-icon> Schedules
100+
<icon name="calendar" class="h-4"></icon> Schedules
96101
</router-link>
97102
<router-link :to="{ name: 'server-databases' }">
98-
<database-icon class="h-4"></database-icon> Databases
103+
<icon name="database" class="h-4"></icon> Databases
99104
</router-link>
100105
<router-link :to="{ name: 'server-allocations' }">
101-
<globe-icon class="h-4"></globe-icon> Allocations
106+
<icon name="globe" class="h-4"></icon> Allocations
102107
</router-link>
103108
<router-link :to="{ name: 'server-settings' }">
104-
<settings-icon class="h-4"></settings-icon> Settings
109+
<icon name="settings" class="h-4"></icon> Settings
105110
</router-link>
106111
</div>
107112
</div>

webpack.config.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ module.exports = {
164164
extensions: ['.ts', '.js', '.vue', '.json'],
165165
alias: {
166166
'vue$': 'vue/dist/vue.esm.js',
167+
'@': path.join(__dirname, 'resources/assets/scripts'),
167168
},
168169
symlinks: false,
169170
},

0 commit comments

Comments
 (0)