mirror of
https://github.com/luanti-org/luanti.git
synced 2025-09-30 19:22:14 +00:00
remember previously entered password
This commit is contained in:
parent
825b3011b3
commit
604e96ba0a
1 changed files with 5 additions and 1 deletions
|
@ -130,7 +130,7 @@ local function get_formspec(tabview, name, tabdata)
|
|||
"label[0.25,0;" .. fgettext("Name") .. "]" ..
|
||||
"label[2.875,0;" .. fgettext("Password") .. "]" ..
|
||||
"field[0.25,0.2;2.625,0.75;te_name;;" .. core.formspec_escape(core.settings:get("name")) .. "]" ..
|
||||
"pwdfield[2.875,0.2;2.625,0.75;te_pwd;]" ..
|
||||
"pwdfield[2.875,0.2;2.625,0.75;te_pwd;;" .. core.formspec_escape(core.settings:get("password")) .. "]" ..
|
||||
"container_end[]" ..
|
||||
|
||||
-- Connect
|
||||
|
@ -443,6 +443,10 @@ local function main_button_handler(tabview, fields, name, tabdata)
|
|||
core.settings:set("name", fields.te_name)
|
||||
end
|
||||
|
||||
if fields.te_pwd then
|
||||
core.settings:set("password", fields.te_pwd)
|
||||
end
|
||||
|
||||
if fields.servers then
|
||||
local event = core.explode_table_event(fields.servers)
|
||||
local server = tabdata.lookup[event.row]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue