2020-01-30 06:45:49 +00:00
|
|
|
<template>
|
|
|
|
<v-app id="inspire">
|
|
|
|
|
|
|
|
<v-app-bar app>
|
2020-02-17 04:12:22 +00:00
|
|
|
<img class="mr-3" :src="require('./assets/logo.png')" height="50" alt="Wg Gen Web"/>
|
2020-02-20 03:07:13 +00:00
|
|
|
<v-toolbar-title to="/">Wg Gen Web</v-toolbar-title>
|
|
|
|
|
|
|
|
<v-spacer />
|
|
|
|
|
|
|
|
<v-toolbar-items>
|
|
|
|
<v-btn to="/clients">
|
|
|
|
Clients
|
|
|
|
<v-icon right dark>mdi-account-network-outline</v-icon>
|
|
|
|
</v-btn>
|
|
|
|
<v-btn to="/server">
|
|
|
|
Server
|
|
|
|
<v-icon right dark>mdi-vpn</v-icon>
|
|
|
|
</v-btn>
|
|
|
|
</v-toolbar-items>
|
|
|
|
|
2020-01-30 06:45:49 +00:00
|
|
|
</v-app-bar>
|
|
|
|
|
|
|
|
<v-content>
|
|
|
|
<v-container>
|
|
|
|
<router-view />
|
|
|
|
</v-container>
|
2020-02-25 08:45:44 +00:00
|
|
|
<Notification v-bind:notification="notification"/>
|
2020-01-30 06:45:49 +00:00
|
|
|
</v-content>
|
|
|
|
|
|
|
|
<v-footer app>
|
2020-03-31 05:17:51 +00:00
|
|
|
<v-row justify="start" no-gutters>
|
|
|
|
<v-col cols="12" lg="6" md="12" sm="12">
|
|
|
|
<div :align="$vuetify.breakpoint.smAndDown ? 'center' : 'left'">
|
|
|
|
<small>Copyright © {{ new Date().getFullYear() }}, Wg Gen Web.</small>
|
|
|
|
<small>This work is licensed under a <a class="pr-1 pl-1" href="http://www.wtfpl.net/" target="_blank">WTFPL License.</a></small>
|
|
|
|
</div>
|
|
|
|
</v-col>
|
|
|
|
</v-row>
|
|
|
|
<v-row justify="end" no-gutters>
|
|
|
|
<v-col cols="12" lg="6" md="12" sm="12">
|
|
|
|
<div :align="$vuetify.breakpoint.smAndDown ? 'center' : 'right'">
|
|
|
|
<small>Created with</small>
|
|
|
|
<v-icon class="pr-1 pl-1">mdi-heart</v-icon><span>by</span><a class="pr-2 pl-1" href="mailto:vx3r@127-0-0-1.fr">vx3r</a>
|
|
|
|
<a :href="'https://github.com/vx3r/wg-gen-web/commit/' + version"><kbd>Version: {{ version.substring(0,7) }}</kbd></a>
|
|
|
|
</div>
|
|
|
|
</v-col>
|
|
|
|
</v-row>
|
2020-01-30 06:45:49 +00:00
|
|
|
</v-footer>
|
|
|
|
|
|
|
|
</v-app>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-02-25 08:45:44 +00:00
|
|
|
import {ApiService} from "./services/ApiService";
|
|
|
|
import Notification from './components/Notification'
|
2020-01-30 06:45:49 +00:00
|
|
|
|
2020-02-25 08:45:44 +00:00
|
|
|
export default {
|
|
|
|
name: 'App',
|
2020-01-30 06:45:49 +00:00
|
|
|
|
2020-02-25 08:45:44 +00:00
|
|
|
components: {
|
|
|
|
Notification
|
|
|
|
},
|
2020-02-25 06:56:04 +00:00
|
|
|
|
2020-02-25 08:45:44 +00:00
|
|
|
data: () => ({
|
|
|
|
api: null,
|
|
|
|
version:'N/A',
|
|
|
|
notification: {
|
|
|
|
show: false,
|
|
|
|
color: '',
|
|
|
|
text: '',
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
|
|
|
|
mounted() {
|
|
|
|
this.api = new ApiService();
|
|
|
|
this.getVersion()
|
|
|
|
},
|
|
|
|
|
|
|
|
created () {
|
|
|
|
this.$vuetify.theme.dark = true
|
|
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
|
|
getVersion() {
|
|
|
|
this.api.get('/server/version').then((res) => {
|
|
|
|
this.version = res.version;
|
|
|
|
}).catch((e) => {
|
|
|
|
this.notify('error', e.response.status + ' ' + e.response.statusText);
|
|
|
|
});
|
|
|
|
},
|
|
|
|
notify(color, msg) {
|
|
|
|
this.notification.show = true;
|
|
|
|
this.notification.color = color;
|
|
|
|
this.notification.text = msg;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
2020-01-30 06:45:49 +00:00
|
|
|
</script>
|