mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-11 04:45:02 +00:00
Dashboard work. Move configs to DB. Some script reorganization. Add nodemon configs.
This commit is contained in:
parent
168d82a966
commit
2adc5af8d7
39 changed files with 8441 additions and 2915 deletions
3
dashboard/src/components/App.vue
Normal file
3
dashboard/src/components/App.vue
Normal file
|
@ -0,0 +1,3 @@
|
|||
<template>
|
||||
<router-view></router-view>
|
||||
</template>
|
36
dashboard/src/components/Dashboard.vue
Normal file
36
dashboard/src/components/Dashboard.vue
Normal file
|
@ -0,0 +1,36 @@
|
|||
<template>
|
||||
<div v-if="loading">
|
||||
Loading...
|
||||
</div>
|
||||
<div v-else>
|
||||
<h1>Guilds</h1>
|
||||
<table v-for="guild in guilds">
|
||||
<tr>
|
||||
<td>{{ guild.id }}</td>
|
||||
<td>{{ guild.name }}</td>
|
||||
<td>
|
||||
<a v-bind:href="'/dashboard/guilds/' + guild.id + '/config'">Config</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {mapGetters, mapState} from "vuex";
|
||||
import {LoadStatus} from "../store/types";
|
||||
|
||||
export default {
|
||||
mounted() {
|
||||
this.$store.dispatch("guilds/loadAvailableGuilds");
|
||||
},
|
||||
computed: {
|
||||
loading() {
|
||||
return this.$state.guilds.availableGuildsLoadStatus !== LoadStatus.Done;
|
||||
},
|
||||
...mapState({
|
||||
guilds: 'guilds/available',
|
||||
}),
|
||||
},
|
||||
};
|
||||
</script>
|
11
dashboard/src/components/Index.vue
Normal file
11
dashboard/src/components/Index.vue
Normal file
|
@ -0,0 +1,11 @@
|
|||
<template>
|
||||
<p>Redirecting...</p>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
created() {
|
||||
this.$router.push('/login');
|
||||
}
|
||||
};
|
||||
</script>
|
14
dashboard/src/components/Login.vue
Normal file
14
dashboard/src/components/Login.vue
Normal file
|
@ -0,0 +1,14 @@
|
|||
<template>
|
||||
<a v-bind:href="env.API_URL + '/auth/login'">Login</a>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
|
||||
computed: {
|
||||
blah() {
|
||||
return this.$state.apiKey;
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue