Piped login dialog: relabel in OnNodeReady (loginKind set after Init); profile survives app restart

This commit is contained in:
spaghet committed 2026-11-23 22:02:38 -05:00
1 parent 40140e7e29
commit 89502757f0
2 files changed
+9 -6

No files matched your search

+1 -1
View File
@@ -40,7 +40,7 @@ requires_widevine_version=1.0
playlet_lib_squashfs_remote_url=https://github.com/iBicha/playlet/releases/latest/download/playlet-lib.squashfs.pkg
playlet_lib_zip_remote_url=https://github.com/iBicha/playlet/releases/latest/download/playlet-lib.zip
playlet_lib_zip_embedded_url=pkg:/lib/playlet-lib.zip
playlet_lib_zip_debug_url=https://gitea.spaghet.io/spaghet/playlet-piped/raw/branch/main/piped/playlet-lib-1795488106.zip
playlet_lib_zip_debug_url=https://gitea.spaghet.io/spaghet/playlet-piped/raw/branch/main/piped/playlet-lib-1795489292.zip
git_commit_sha=unknown
@@ -7,11 +7,8 @@ function Init()
m.urlLabel = m.top.findNode("urlLabel")
m.qrCode = m.top.findNode("QrCodePoster")
if ValidString(m.top.loginKind) = "piped"
m.top.findNode("dlgTitle").primaryTitle = "Login to Piped"
m.top.findNode("bodyLine1").text = "Login to Piped in order to view Subscriptions and Playlists."
m.top.findNode("bodyLine2").text = "Sign in from your phone with SSO, or with a Piped username and password."
end if
' loginKind is assigned by the caller AFTER CreateObject returns, so any
' relabeling based on it must live in OnNodeReady, never here.
m.top.width = "920"
m.top.observeFieldScoped("buttonSelected", FuncName(Close))
@@ -21,6 +18,12 @@ function Init()
end function
function OnNodeReady()
if ValidString(m.top.loginKind) = "piped"
m.top.findNode("dlgTitle").primaryTitle = "Login to Piped"
m.top.findNode("bodyLine1").text = "Login to Piped in order to view Subscriptions and Playlists."
m.top.findNode("bodyLine2").text = "Sign in from your phone with SSO, or with a Piped username and password."
end if
address = m.webserver@.GetServerAddress()
isValidAddress = not StringUtils.IsNullOrEmpty(address)
if isValidAddress