fmt , made default textarea bigger

This commit is contained in:
daragh 2024-02-18 16:47:22 +00:00
parent 0851e9934d
commit 92a83a2079
No known key found for this signature in database
2 changed files with 14 additions and 5 deletions

View file

@ -1,13 +1,14 @@
function update_table(keys){
function update_table(keys) {
let table = document.getElementById("key_table")
//removing old table
while(table.rows.length > 0){
while (table.rows.length > 0) {
table.deleteRow(0);
}
keys.forEach(key => {
add_to_table(key);
})
}
async function get_keys() {
let username = document.getElementById("user").value;
let password = document.getElementById("pass").value;
@ -68,7 +69,7 @@ async function add_key() {
}
}
async function delete_key(row_idx,key) {
async function delete_key(row_idx, key) {
let username = document.getElementById("user").value;
let password = document.getElementById("pass").value;
@ -102,7 +103,7 @@ async function delete_key(row_idx,key) {
function add_to_table(key) {
let table = document.getElementById("key_table");
let row = table.insertRow();
row.setAttribute("ssh_key",key);
row.setAttribute("ssh_key", key);
let cell_name = row.insertCell(0);
let cell_key = row.insertCell(1);
@ -115,7 +116,7 @@ function add_to_table(key) {
for (let i = 2; i < key_split.length; i++) {
comment += " " + key_split[i];
}
if(key_split.length === 2) {
if (key_split.length === 2) {
comment = "No comment";
}
cell_name.textContent = comment;