data: Added unknown nick list to character add and nicks modal.
the build was successful

This commit is contained in:
2018-12-04 22:12:54 +01:00
parent 013c50d4f4
commit 7c1623493a
8 changed files with 86 additions and 1 deletions
@@ -0,0 +1,17 @@
const {charactersApi} = require("../../../rpdata/api/Character")
module.exports = class {
onCreate() {
this.state = {
nicks: [],
}
}
onMount() {
charactersApi.unknownNicks(100).then(unknowns => {
this.state.nicks = unknowns.map(u => u.nick)
}).catch(err => {
console.warn("Failed to get unknown nicks:", err)
})
}
}
@@ -0,0 +1,3 @@
<div class="unknown-nick-list">
<div for(nick in state.nicks) on-click("emit", "select", nick) key=nick class="nick">${nick}</div>
</div>
@@ -0,0 +1,16 @@
div.unknown-nick-list {
padding: 0.5em 0;
div.nick {
display: inline-block;
padding: 0.25em 0.5ch;
margin: 2px;
background-color: #111;
color: #881;
}
div.nick:hover {
cursor: pointer;
background-color: #222;
color: #CC2;
}
}