2021-10-16 11:28:04 -06:00
|
|
|
export function initSshKeyFormParser() {
|
2024-02-16 06:34:29 -07:00
|
|
|
// Parse SSH Key
|
2024-06-10 14:49:33 -06:00
|
|
|
document.querySelector('#ssh-key-content')?.addEventListener('input', function () {
|
2024-02-16 06:34:29 -07:00
|
|
|
const arrays = this.value.split(' ');
|
2024-06-10 14:49:33 -06:00
|
|
|
const title = document.querySelector('#ssh-key-title');
|
2024-02-16 06:34:29 -07:00
|
|
|
if (!title.value && arrays.length === 3 && arrays[2] !== '') {
|
|
|
|
title.value = arrays[2];
|
2021-10-16 11:28:04 -06:00
|
|
|
}
|
|
|
|
});
|
|
|
|
}
|