Skip to content

Commit

Permalink
Components restructure
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcgroul committed Jul 1, 2021
1 parent 93bcd75 commit 1684a2b
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 16 deletions.
5 changes: 3 additions & 2 deletions src/components/ServerConfigs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@

<script lang="ts">
import { defineComponent } from 'vue'
import { GameConfig, ServerConfig } from '../interfaces'
interface DataType {
Expand Down Expand Up @@ -73,8 +74,8 @@ export default defineComponent({
},
},
async created() {
const { data } = await this.$http.get(`/games/${this.gameID}/config`);
this.rules = data;
const { data } = await this.$http.get(`/games/${this.gameID}/config`)
this.rules = data
for (const [key, field] of Object.entries(this.rules)) {
this.config[key] = field.config.default
Expand Down
1 change: 1 addition & 0 deletions src/components/ServerModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,7 @@
import { useVuelidate } from '@vuelidate/core'
import { required } from '@vuelidate/validators'
import { defineComponent } from 'vue'
import { ServerConfig } from '../interfaces'
import store from '../store'
import ServerConfigs from './ServerConfigs.vue'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@
<script lang="ts">
import { defineComponent, PropType } from 'vue'
import { Server, ServerStatus } from '../interfaces'
import settings from '../settings'
import { Server, ServerStatus } from '../../interfaces'
import settings from '../../settings'
export default defineComponent({
props: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<script lang='ts'>
import { defineComponent } from 'vue'
import store from '../store'
import store from '../../store'
import ServerItem from './ServerItem.vue'
export default defineComponent({
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/> -->
</template>

<script lang="ts">
<script lang='ts'>
import { defineComponent } from 'vue'
export default defineComponent({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<script lang='ts'>
import { defineComponent, PropType } from 'vue'
import { Server } from '../interfaces'
import { Server } from '../../interfaces'
export default defineComponent({
props: {
Expand Down
7 changes: 4 additions & 3 deletions src/components/ServerPage.vue → src/pages/Server/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,11 @@
</section>
</template>
<script lang="ts">
<script lang='ts'>
import { defineComponent } from 'vue'
import { Server, ServerStatus } from '../interfaces'
import settings from '../settings'
import { Server, ServerStatus } from '../../interfaces'
import settings from '../../settings'
import ServerLogs from './ServerLogs.vue'
import ServerRenameForm from './ServerRenameForm.vue'
Expand Down
File renamed without changes.
File renamed without changes.
11 changes: 5 additions & 6 deletions src/router.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { Component } from 'vue'
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'

import Dashboard from './components/Dashboard.vue'
import NotFound from './components/NotFound.vue'
import SignUp from './components/SignUp.vue'
import SignIn from './components/SignIn.vue'
import ServerPage from './components/ServerPage.vue'
import Dashboard from './pages/Dashboard/index.vue'
import NotFound from './pages/NotFound.vue'
import SignUp from './pages/SignUp.vue'
import SignIn from './pages/SignIn.vue'
import ServerPage from './pages/Server/index.vue'
import store from './store'


Expand Down

0 comments on commit 1684a2b

Please sign in to comment.