Directly connection when hitting enter on the address line

This commit is contained in:
WolverinDEV 2020-12-13 14:18:58 +01:00
parent 7a02420c72
commit 27888661d9

View file

@ -193,12 +193,13 @@ export function spawnConnectModal(options: {
}; };
input_address.val(defaultHost.enforce ? defaultHost.url : settings.static_global(Settings.KEY_CONNECT_ADDRESS, defaultHost.url)); input_address.val(defaultHost.enforce ? defaultHost.url : settings.static_global(Settings.KEY_CONNECT_ADDRESS, defaultHost.url));
input_address input_address.on("keyup", () => updateFields(true));
.on("keyup", () => updateFields(true)) input_address.on("keypress", event => {
.on('keydown', event => { if (event.key === "Enter" && !event.shiftKey) {
if (event.keyCode == KeyCode.KEY_ENTER && !event.shiftKey) button_connect.trigger('click');
button_connect.trigger('click'); }
}); });
button_manage.on('click', event => { button_manage.on('click', event => {
const modal = spawnSettingsModal("identity-profiles"); const modal = spawnSettingsModal("identity-profiles");
modal.close_listener.push(() => { modal.close_listener.push(() => {