авторитарный логин через лаунчер

This commit is contained in:
2026-08-30 02:18:27 +04:00
parent 23b3a3b864
commit e53b3c1784
4 changed files with 30 additions and 10 deletions
+13
View File
@@ -205,6 +205,19 @@ function Remove-MoonWellRuntimeGarbage {
}
}
# GlueXML is shipped by patch-ruRU-4.MPQ. Historical development copies in
# the client root override that archive and can restore the password form.
foreach ($relativePath in @(
'Interface\GlueXML\AccountLogin.lua',
'Interface\GlueXML\AccountLogin.xml'
)) {
$legacyOverride = Join-Path $Destination $relativePath
if (Test-Path -LiteralPath $legacyOverride -PathType Leaf) {
Remove-Item -LiteralPath $legacyOverride -Force
Write-Host "Removed obsolete loose GlueXML override: $legacyOverride"
}
}
Remove-EmptyMoonWellDirectories -Destination $Destination
}
@@ -112,6 +112,14 @@ end
local function ApplyLaunchMode()
local developerMode = LoginState.launchMode == "developer"
local launcherMode = LoginState.launchMode == "launcher"
if launcherMode then
AccountLoginUI:Hide()
else
AccountLoginUI:Show()
AccountLoginUI:SetAlpha(1)
end
if developerMode then
UICache.accountEdit:Show()
@@ -417,6 +425,10 @@ function AccountLogin_OnLoad(self)
end
function AccountLogin_OnShow(self)
LoginState.luaBridgePending = type(MoonWellGetLaunchMode) ~= "function"
LoginState.launchMode = ResolveLaunchMode()
ApplyLaunchMode()
-- Submit launcher credentials before constructing the decorative login UI.
-- A cosmetic Lua error must never be able to block authentication.
TryLauncherFallbackLogin()
@@ -450,9 +462,6 @@ function AccountLogin_OnShow(self)
elseif self.animatedTexture then
self.animatedTexture:Hide()
end
AccountLoginUI:Show()
AccountLoginUI:SetAlpha(1)
if not self.newLogo then
self.newLogoFrame = CreateFrame("Frame", nil, self)
self.newLogoFrame:SetWidth(Config.LOGO_SIZE)
@@ -486,8 +495,6 @@ function AccountLogin_OnShow(self)
self.modelUpdateCount = 0
self.modelUpdateTimer = 0
LoginState.luaBridgePending = type(MoonWellGetLaunchMode) ~= "function"
LoginState.launchMode = ResolveLaunchMode()
local accountName, password = "", ""
if LoginState.launchMode == "developer" then
accountName, password = unpack(string_explode(GetSavedAccountName(), "#&|&#"))
@@ -207,7 +207,7 @@
<!-- ====================================== -->
<!-- CAMPOS DE TEXTO: USUARIO Y CONTRASEÑA -->
<!-- ====================================== -->
<EditBox name="AccountLoginAccountEdit" inherits="GlueDark_EditBoxTemplate" letters="320">
<EditBox name="AccountLoginAccountEdit" inherits="GlueDark_EditBoxTemplate" letters="320" hidden="true">
<Size x="200" y="37"/>
<Anchors>
<Anchor point="BOTTOM">
@@ -258,7 +258,7 @@
</Scripts>
</EditBox>
<EditBox name="AccountLoginPasswordEdit" inherits="GlueDark_EditBoxTemplate" letters="16" password="1">
<EditBox name="AccountLoginPasswordEdit" inherits="GlueDark_EditBoxTemplate" letters="16" password="1" hidden="true">
<Size x="200" y="37"/>
<Anchors>
<Anchor point="BOTTOM">
@@ -311,7 +311,7 @@
<!-- ====================================== -->
<!-- CHECKBOXES: GUARDAR CUENTA Y CONTRASEÑA -->
<!-- ====================================== -->
<Frame name="AccountLoginSaveOptionsFrame">
<Frame name="AccountLoginSaveOptionsFrame" hidden="true">
<Size x="200" y="60"/>
<Anchors>
<Anchor point="TOP" relativeTo="AccountLoginPasswordEdit" relativePoint="BOTTOM">
@@ -895,7 +895,7 @@
<!-- ====================================== -->
<!-- BOTÓN DE LOGIN -->
<!-- ====================================== -->
<Button name="AccountLoginLoginButton" inherits="GlueButtonTemplateBlue" text="LOGIN">
<Button name="AccountLoginLoginButton" inherits="GlueButtonTemplateBlue" text="Авторизоваться">
<Size x="200" y="55"/>
<Anchors>
<Anchor point="BOTTOM">