style changes

This commit is contained in:
MathMan05 2024-10-30 20:51:20 -05:00
parent 41e89a1f6b
commit 9209744321

View file

@ -338,18 +338,21 @@ class RoleList extends Buttons{
console.log(found); console.log(found);
this.onchange(found.id,new Permissions("0","0")); this.onchange(found.id,new Permissions("0","0"));
}else{ }else{
const div=document.createElement("div");
const bar=document.createElement("input"); const bar=document.createElement("input");
bar.classList.add("fixedsearch"); div.classList.add("fixedsearch","OptionList");
bar.style.left=(box.left^0)+"px"; bar.type="text";
bar.style.top=(box.top^0)+"px"; div.style.left=(box.left^0)+"px";
document.body.append(bar); div.style.top=(box.top^0)+"px";
div.append(bar)
document.body.append(div);
if(Contextmenu.currentmenu != ""){ if(Contextmenu.currentmenu != ""){
Contextmenu.currentmenu.remove(); Contextmenu.currentmenu.remove();
} }
Contextmenu.currentmenu=bar; Contextmenu.currentmenu=div;
Contextmenu.keepOnScreen(bar); Contextmenu.keepOnScreen(div);
bar.onchange=()=>{ bar.onchange=()=>{
bar.remove(); div.remove();
console.log(bar.value) console.log(bar.value)
if(bar.value==="") return; if(bar.value==="") return;
fetch(this.info.api+`/guilds/${this.guild.id}/roles`,{ fetch(this.info.api+`/guilds/${this.guild.id}/roles`,{