Change to propagation login complete event

Rename AccountManager to AccountAuth
This commit is contained in:
kPherox 2019-04-27 05:02:28 +09:00
parent 4094a32ab2
commit fb9d11969b
No known key found for this signature in database
GPG Key ID: C04751C2BFA2F62D

View File

@ -18,12 +18,13 @@
>Login</BaseButton> >Login</BaseButton>
</form> </form>
</template> </template>
<script lang="ts"> <script lang="ts">
import { ipcRenderer } from "electron" import { ipcRenderer } from "electron"
import { Component, Vue } from "vue-property-decorator" import { Component, Vue } from "vue-property-decorator"
type Instance = string type Instance = string
@Component @Component
export default class Auth extends Vue { export default class AccountAuth extends Vue {
public instance: Instance = "" public instance: Instance = ""
public code: string = "" public code: string = ""
public domain: string = "" public domain: string = ""
@ -38,15 +39,15 @@ export default class Auth extends Vue {
ipcRenderer.send(`new-account-setup`, this.instance) ipcRenderer.send(`new-account-setup`, this.instance)
} }
public authCode() { public authCode() {
let code = this.code ipcRenderer.send(`new-account-auth`, this.code, this.instance)
ipcRenderer.send(`new-account-auth`, code, this.instance)
this.code = "" this.code = ""
this.instance = ''
ipcRenderer.once( ipcRenderer.once(
`login-complete`, `login-complete`,
(e: Event) => { (e: Event) => {
this.$emit('login-complete')
} }
); )
} }
} }
</script> </script>