|
@ -39,7 +39,24 @@ module.exports = class { |
|
|
}).catch(errs => { |
|
|
}).catch(errs => { |
|
|
console.warn("Failed to add nick:", errs) |
|
|
console.warn("Failed to add nick:", errs) |
|
|
|
|
|
|
|
|
this.state.error = "Failed to add nick: " + errs[0].message |
|
|
|
|
|
|
|
|
this.state.error = errs[0].message |
|
|
|
|
|
}).then(() => { |
|
|
|
|
|
this.state.loading = false |
|
|
|
|
|
}) |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
selectUnknown(nick) { |
|
|
|
|
|
if (this.state.loading) { |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
const input = {id: this.input.character.id, nick} |
|
|
|
|
|
|
|
|
|
|
|
this.state.loading = true |
|
|
|
|
|
charactersApi.addNick(input).then((res) => { |
|
|
|
|
|
this.emit("nicks", res.nicks) |
|
|
|
|
|
}).catch(errs => { |
|
|
|
|
|
this.state.error = errs[0].message |
|
|
}).then(() => { |
|
|
}).then(() => { |
|
|
this.state.loading = false |
|
|
this.state.loading = false |
|
|
}) |
|
|
}) |
|
|