mirror of
https://github.com/freqtrade/frequi.git
synced 2024-11-23 03:25:15 +00:00
Remove ID's where not necessary, add type
This commit is contained in:
parent
33bfbbd3a5
commit
8ccdb9eb66
|
@ -2,7 +2,7 @@
|
|||
<div>
|
||||
<b-button v-b-modal.modal-prevent-closing>{{ loginText }}</b-button>
|
||||
<b-modal id="modal-prevent-closing" ref="modalRef" title="Login to your bot" @ok="handleOk">
|
||||
<Login id="loginForm" ref="loginForm" in-modal @loginResult="handleLoginResult" />
|
||||
<Login ref="loginForm" in-modal @loginResult="handleLoginResult" />
|
||||
</b-modal>
|
||||
</div>
|
||||
</template>
|
||||
|
@ -12,6 +12,10 @@ import { defineComponent, ref } from 'vue';
|
|||
|
||||
import Login from '@/components/Login.vue';
|
||||
|
||||
interface HTMLModal extends HTMLElement {
|
||||
hide: () => void;
|
||||
}
|
||||
|
||||
export default defineComponent({
|
||||
name: 'LoginModal',
|
||||
components: { Login },
|
||||
|
@ -19,11 +23,11 @@ export default defineComponent({
|
|||
loginText: { required: false, default: 'Login', type: String },
|
||||
},
|
||||
setup() {
|
||||
const modalRef = ref<HTMLElement>();
|
||||
const modalRef = ref<HTMLModal>();
|
||||
const loginForm = ref<HTMLFormElement>();
|
||||
const handleLoginResult = (result: boolean) => {
|
||||
if (result) {
|
||||
(modalRef.value as any)?.hide();
|
||||
modalRef.value?.hide();
|
||||
}
|
||||
};
|
||||
const handleOk = (evt) => {
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<template>
|
||||
<div class="container">
|
||||
<b-card header="Freqtrade bot Login">
|
||||
<Login id="loginForm" ref="loginForm" />
|
||||
<Login ref="loginForm" />
|
||||
</b-card>
|
||||
</div>
|
||||
</template>
|
||||
|
|
Loading…
Reference in New Issue
Block a user