jr: can now switch between keys
This commit is contained in:
+18
-30
@@ -137,37 +137,25 @@ pi_repop
|
||||
// if active, make background green
|
||||
if (this_rkp.active)
|
||||
this_li.style.background = 'green';
|
||||
else
|
||||
// otherwise make background red and add activate li
|
||||
else {
|
||||
this_li.style.background = 'red';
|
||||
|
||||
// // balance
|
||||
// // add a br
|
||||
// let br = document.createElement('br');
|
||||
// this_li.appendChild(br);
|
||||
|
||||
// // add balance
|
||||
// this_li.innerHTML += 'Balance: ';
|
||||
// let maybe_balance = await pi_balance(this_akstr);
|
||||
// // if there is a balance, show it in green
|
||||
// if (maybe_balance.ok)
|
||||
// {
|
||||
// let greentext = document.createElement('span');
|
||||
// greentext.style.color = 'green';
|
||||
// // @ts-ignore fuck off i know what i'm doing
|
||||
// greentext.innerHTML = '' + maybe_balance.balance;
|
||||
|
||||
// this_li.appendChild(greentext);
|
||||
// }
|
||||
// // if not, show reason and make it red
|
||||
// else
|
||||
// {
|
||||
// let redtext = document.createElement('span');
|
||||
// redtext.style.color = 'red';
|
||||
// // @ts-ignore fuck off i know what i'm doing
|
||||
// redtext.innerHTML = '' + maybe_balance.reason;
|
||||
|
||||
// this_li.appendChild(redtext);
|
||||
// }
|
||||
let activate_li = document.createElement('li');
|
||||
let activate_a = document.createElement('a');
|
||||
activate_a.innerHTML = 'Switch to this key';
|
||||
activate_a.style.color = 'blue';
|
||||
activate_a.style.textDecoration = 'underline';
|
||||
// dirty but so is your mind so go fuck yourself
|
||||
activate_a.onclick =
|
||||
async function () {
|
||||
// tell controller that we want to activate this key
|
||||
await b_lib.p_activate_key(this_rkp.name);
|
||||
await pi_repop();
|
||||
};
|
||||
// add li and a
|
||||
activate_li.appendChild(activate_a);
|
||||
rkp_ul.appendChild(activate_li);
|
||||
}
|
||||
|
||||
// add it to the list
|
||||
pubkeys_ul.appendChild(this_li);
|
||||
|
||||
Reference in New Issue
Block a user