mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-13 11:43:52 +00:00
35 lines
724 B
Vue
35 lines
724 B
Vue
<template>
|
|
<div class="bot-alerts">
|
|
<b-alert
|
|
v-for="(alert, index) in activeMessages"
|
|
:key="index"
|
|
variant="warning"
|
|
dismissible
|
|
:show="5"
|
|
:value="!!alert.message"
|
|
@dismissed="closeAlert"
|
|
>
|
|
{{ alert.message }}
|
|
</b-alert>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { Component, Vue } from 'vue-property-decorator';
|
|
import { namespace } from 'vuex-class';
|
|
import { AlertActions } from '@/store/modules/alerts';
|
|
|
|
const alerts = namespace('alerts');
|
|
|
|
@Component({})
|
|
export default class BotAlerts extends Vue {
|
|
@alerts.State activeMessages;
|
|
|
|
@alerts.Action [AlertActions.removeAlert];
|
|
|
|
closeAlert() {
|
|
this[AlertActions.removeAlert]();
|
|
}
|
|
}
|
|
</script>
|