This commit is contained in:
@@ -39,7 +39,24 @@ module.exports = class {
|
||||
}).catch(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(() => {
|
||||
this.state.loading = false
|
||||
})
|
||||
|
||||
@@ -15,4 +15,7 @@
|
||||
<button disabled=state.loading on-click("removeNick", nick)>Remove</button>
|
||||
</div>
|
||||
|
||||
<h2>Unknown Nicks</h2>
|
||||
<p>These are the 100 most common nicks in the logs, maybe one of these belongs to <strong>${input.character.name}</strong>?</p>
|
||||
<unknown-nick-list key="un-list" on-select("selectUnknown") />
|
||||
</modal>
|
||||
Reference in New Issue
Block a user