2020-05-04 04:31:12 +00:00
|
|
|
<template>
|
|
|
|
<div id="app">
|
2020-05-04 18:34:59 +00:00
|
|
|
<header class="bg-secondary">
|
2020-05-04 05:20:02 +00:00
|
|
|
<nav class="navbar navbar-expand navbar-dark flex-column flex-md-row bd-navbar">
|
2020-05-04 04:50:09 +00:00
|
|
|
<ul>
|
2020-05-04 05:20:02 +00:00
|
|
|
<li class="nav-item text-white">
|
2020-05-04 18:34:59 +00:00
|
|
|
<img class="logo" src="./assets/freqtrade-logo.png" alt />
|
|
|
|
Freqtrade UI
|
2020-05-04 04:50:09 +00:00
|
|
|
</li>
|
|
|
|
</ul>
|
2020-05-04 18:56:11 +00:00
|
|
|
<li>
|
|
|
|
<button class="btn-primary pull-right" @click="refresh_data()">Refresh</button>
|
|
|
|
</li>
|
2020-05-04 04:50:09 +00:00
|
|
|
</nav>
|
2020-05-04 18:34:59 +00:00
|
|
|
<div class="text-white">{{ ping }}</div>
|
2020-05-04 04:50:09 +00:00
|
|
|
</header>
|
2020-05-04 18:56:11 +00:00
|
|
|
<main class="container-fluid">
|
2020-05-04 15:45:50 +00:00
|
|
|
<TradeView />
|
2020-05-04 05:20:02 +00:00
|
|
|
</main>
|
2020-05-04 04:31:12 +00:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-05-04 18:56:11 +00:00
|
|
|
import { mapState, mapActions } from 'vuex';
|
2020-05-04 18:34:59 +00:00
|
|
|
|
2020-05-04 15:45:50 +00:00
|
|
|
import TradeView from './ftbot/TradeView.vue';
|
2020-05-04 04:31:12 +00:00
|
|
|
|
|
|
|
export default {
|
|
|
|
name: 'App',
|
|
|
|
components: {
|
2020-05-04 18:34:59 +00:00
|
|
|
TradeView,
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
...mapState({ ping: 'ping' }),
|
2020-05-04 04:50:09 +00:00
|
|
|
},
|
2020-05-04 18:56:11 +00:00
|
|
|
methods: {
|
|
|
|
...mapActions(['refresh_all']),
|
|
|
|
refresh_data() {
|
|
|
|
this.refresh_all();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
mounted() {
|
|
|
|
setInterval(() => {
|
|
|
|
this.refresh_all();
|
|
|
|
}, 5000);
|
|
|
|
},
|
2020-05-04 04:50:09 +00:00
|
|
|
};
|
2020-05-04 04:31:12 +00:00
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
#app {
|
|
|
|
font-family: Avenir, Helvetica, Arial, sans-serif;
|
|
|
|
-webkit-font-smoothing: antialiased;
|
|
|
|
-moz-osx-font-smoothing: grayscale;
|
|
|
|
text-align: center;
|
|
|
|
color: #2c3e50;
|
2020-05-04 04:50:09 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
main {
|
|
|
|
margin: 0 auto;
|
|
|
|
/* padding: 30px; */
|
|
|
|
background-color: white;
|
|
|
|
width: 964px;
|
|
|
|
min-height: 300px;
|
|
|
|
}
|
|
|
|
ul {
|
|
|
|
padding: 3px;
|
|
|
|
display: flex;
|
|
|
|
}
|
|
|
|
.logo {
|
|
|
|
vertical-align: middle;
|
|
|
|
height: 30px;
|
|
|
|
}
|
2020-05-04 05:20:02 +00:00
|
|
|
.nav-item {
|
2020-05-04 04:50:09 +00:00
|
|
|
display: inline-block;
|
2020-05-04 05:20:02 +00:00
|
|
|
padding: 5px 10px;
|
|
|
|
font-size: 22px;
|
|
|
|
/* border-right: 1px solid #bbb; */
|
2020-05-04 04:31:12 +00:00
|
|
|
}
|
|
|
|
</style>
|