Update Main.lua

This commit is contained in:
Happy_mimimix 2025-02-10 13:19:03 -05:00 committed by GitHub
parent e79fefa4b5
commit 9934ac3212
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -352,7 +352,7 @@ end
local function checkUserInputs() local function checkUserInputs()
local nameEmpty = #usernameInput.text == 0 local nameEmpty = #usernameInput.text == 0
local nameVaild = usernameInput.text:match("^%w[%w%s_]+$") local nameVaild = usernameInput.text:match("^%w[%w%s_]+$")
local passValid = withoutPasswordSwitchAndLabel.switch.state or #passwordInput.text == 0 or #passwordSubmitInput.text == 0 or passwordInput.text == passwordSubmitInput.text local passValid = withoutPasswordSwitchAndLabel.switch.state or (#passwordInput.text > 0 and #passwordSubmitInput.text > 0 and passwordInput.text == passwordSubmitInput.text)
if (nameEmpty or nameVaild) and passValid then if (nameEmpty or nameVaild) and passValid then
usernamePasswordText.hidden = true usernamePasswordText.hidden = true
@ -418,7 +418,7 @@ end)
-- Filesystem selection stage -- Filesystem selection stage
addStage(function() addStage(function()
prevButton.disabled = false prevButton.disabled = false
nextButton.disabled = false nextButton.disabled = true
layout:addChild(GUI.object(1, 1, 1, 1)) layout:addChild(GUI.object(1, 1, 1, 1))
addTitle(0x696969, localization.select) addTitle(0x696969, localization.select)