Removed duplicate users

master
Keith Irwin 2022-09-18 20:27:11 -06:00
parent 2f78e9e3be
commit e2af963524
Signed by: ki9
GPG Key ID: DF773B3F4A88DA86
2 changed files with 4 additions and 2 deletions

View File

@ -21,7 +21,7 @@
<p>To add a new peer, type in a hostname and select a user. The hostname must be 3-10 lowercase letters and numbers <code>/[a-z0-9]{3,10}/</code>. </p>
<div>
<input type="text" data-bind="textInput:newPeerHostname,event:{keypress:addKeyPress}" placeholder="phone"></input>
<select data-bind="options:users,optionsText:'name',value:newPeerUser,optionsCaption:'pick user...'"></select>
<select data-bind="options:users,optionsText:'name',value:newPeerUser,optionsCaption:'(user)'"></select>
<span>.mytld</span>
<button data-bind="click:addPeer,disable:isAdding,text:addText">Add</button>
</div>

View File

@ -51,7 +51,9 @@ function PeerList() {
user.peers.map( (u)=>new User({
name: u.domain.split('.')[1],
number: u.ipv4.split('.')[2],
}) )
}) ).filter((value,index,self)=>{
self.indexOf(value) === index
})
)
self.token(user.token)
}