small refactor in js and added exit btn to friend info overlay
parent
fdd3ff0a9d
commit
5d45db8f8d
|
@ -13,6 +13,7 @@
|
||||||
<body>
|
<body>
|
||||||
<div id="friendInfo" class='overlay'>
|
<div id="friendInfo" class='overlay'>
|
||||||
<div class='overlayContent'>
|
<div class='overlayContent'>
|
||||||
|
<span class='closeOverlay' overlay='friendInfo'></span>
|
||||||
<div>Name: <span id='friendName'></span></div>
|
<div>Name: <span id='friendName'></span></div>
|
||||||
<label>Public Key: <input id='friendPubkey' type='text' readonly></label>
|
<label>Public Key: <input id='friendPubkey' type='text' readonly></label>
|
||||||
<button id='defriend' class='warnBtn'>Unfriend</button>
|
<button id='defriend' class='warnBtn'>Unfriend</button>
|
||||||
|
|
|
@ -304,11 +304,6 @@ for (var i = 0; i < document.getElementsByClassName('refresh').length; i++){
|
||||||
document.getElementsByClassName('refresh')[i].style.float = 'right'
|
document.getElementsByClassName('refresh')[i].style.float = 'right'
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0; i < document.getElementsByClassName('closeOverlay').length; i++){
|
|
||||||
document.getElementsByClassName('closeOverlay')[i].onclick = function(e){
|
|
||||||
document.getElementById(e.target.getAttribute('overlay')).style.visibility = 'hidden'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fetch('/friends/list', {
|
fetch('/friends/list', {
|
||||||
headers: {
|
headers: {
|
||||||
|
|
|
@ -87,3 +87,8 @@ for(var i = 0; i < refreshLinks.length; i++) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
for (var i = 0; i < document.getElementsByClassName('closeOverlay').length; i++){
|
||||||
|
document.getElementsByClassName('closeOverlay')[i].onclick = function(e){
|
||||||
|
document.getElementById(e.target.getAttribute('overlay')).style.visibility = 'hidden'
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue