mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-25 20:45:15 +00:00
Show bot-name
This commit is contained in:
parent
de1035545e
commit
c240b6c104
|
@ -18,6 +18,9 @@
|
|||
<!-- Right aligned nav items -->
|
||||
<b-navbar-nav class="ml-auto">
|
||||
<li class="nav-item text-secondary mr-2">
|
||||
<b-nav-text class="verticalCenter small mr-2">
|
||||
{{ botName }}
|
||||
</b-nav-text>
|
||||
<b-nav-text class="verticalCenter">
|
||||
{{ isBotOnline ? 'Online' : 'Offline' }}
|
||||
</b-nav-text>
|
||||
|
@ -49,6 +52,7 @@ import { State, Action, namespace } from 'vuex-class';
|
|||
import userService from '@/shared/userService';
|
||||
import BootswatchThemeSelect from '@/components/BootswatchThemeSelect.vue';
|
||||
import { LayoutActions } from '@/store/modules/layout';
|
||||
import { BotStoreGetters } from '@/store/modules/ftbot';
|
||||
|
||||
const ftbot = namespace('ftbot');
|
||||
const layoutNs = namespace('layout');
|
||||
|
@ -67,6 +71,8 @@ export default class NavBar extends Vue {
|
|||
|
||||
@ftbot.Action ping;
|
||||
|
||||
@ftbot.Getter [BotStoreGetters.botName]: string;
|
||||
|
||||
@layoutNs.Action [LayoutActions.resetDashboardLayout];
|
||||
|
||||
@layoutNs.Action [LayoutActions.resetTradingLayout];
|
||||
|
|
|
@ -31,6 +31,7 @@ import {
|
|||
import { showAlert } from './alerts';
|
||||
|
||||
export enum BotStoreGetters {
|
||||
botName = 'botName',
|
||||
openTrades = 'openTrades',
|
||||
tradeDetail = 'tradeDetail',
|
||||
selectedPair = 'selectedPair',
|
||||
|
@ -45,9 +46,7 @@ export enum BotStoreGetters {
|
|||
refreshRequired = 'refreshRequired',
|
||||
}
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
const state = {
|
||||
version: '',
|
||||
lastLogs: '',
|
||||
refreshRequired: true,
|
||||
|
@ -74,8 +73,15 @@ export default {
|
|||
strategy: {},
|
||||
pairlist: [],
|
||||
currentLocks: [],
|
||||
},
|
||||
};
|
||||
|
||||
export default {
|
||||
namespaced: true,
|
||||
state,
|
||||
getters: {
|
||||
[BotStoreGetters.botName](state) {
|
||||
return state.botState.bot_name || 'freqtrade';
|
||||
},
|
||||
[BotStoreGetters.plotConfig](state) {
|
||||
return state.customPlotConfig[state.plotConfigName] || { ...EMPTY_PLOTCONFIG };
|
||||
},
|
||||
|
|
|
@ -59,6 +59,8 @@ export interface BotState {
|
|||
timeframe_ms: number;
|
||||
/** Timeframe in Minutes */
|
||||
timeframe_min: number;
|
||||
/** Given name of the bot */
|
||||
bot_name: string;
|
||||
|
||||
trailing_only_offset_is_reached: boolean;
|
||||
trailing_stop: boolean;
|
||||
|
|
Loading…
Reference in New Issue
Block a user