diff --git a/components/JFOverhang.bs b/components/JFOverhang.bs
index 06c89a29..75f0f9f1 100644
--- a/components/JFOverhang.bs
+++ b/components/JFOverhang.bs
@@ -6,9 +6,6 @@ sub init()
m.leftGroup = m.top.findNode("overlayLeftGroup")
m.rightGroup = m.top.findNode("overlayRightGroup")
- ' hide seperators till they're needed
- m.leftSeperator = m.top.findNode("overlayLeftSeperator")
- m.leftSeperator.visible = "false"
m.rightSeperator = m.top.findNode("overlayRightSeperator")
' set font sizes
m.optionText = m.top.findNode("overlayOptionsText")
@@ -54,16 +51,7 @@ sub onVisibleChange()
end sub
sub updateTitle()
- if m.top.title <> ""
- m.leftSeperator.visible = "true"
- else
- m.leftSeperator.visible = "false"
- end if
m.title.text = m.top.title
-
- if not m.hideClock
- resetTime()
- end if
end sub
sub setClockVisibility()
@@ -152,66 +140,22 @@ sub updateOptions()
end if
end sub
-' Ensure the Jellyfin logo is shown on the overhang.
-sub showLogo()
+' component boolean field isLogoVisibleChange has changed value
+sub isLogoVisibleChange()
+ isLogoVisible = m.top.isLogoVisible
+
scene = m.top.getScene()
logo = scene.findNode("overlayLogo")
- leftSeperator = scene.findNode("overlayLeftSeperator")
- if not isValid(leftSeperator)
- seperator = createSeperator("overlayLeftSeperator")
- m.leftGroup.insertChild(seperator, 0)
- end if
- if not isValid(logo)
- posterLogo = createLogoPoster()
- m.leftGroup.insertChild(posterLogo, 0)
- end if
-end sub
-
-' Remove the Jellyfin logo from the overhang.
-sub hideLogo()
- scene = m.top.getScene()
-
- logo = scene.findNode("overlayLogo")
- leftSeperator = scene.findNode("overlayLeftSeperator")
-
- if isValid(logo)
- m.leftGroup.removeChild(logo)
- end if
- if isValid(leftSeperator)
- m.leftGroup.removeChild(leftSeperator)
- end if
-end sub
-
-' Ensure the current user is shown on the overhang.
-sub showUser()
- print "HELLO from showUser()"
- scene = m.top.getScene()
- currentUser = scene.findNode("overlayCurrentUser")
- rightSeperator = scene.findNode("overlayRightSeperator")
-
- if not isValid(rightSeperator)
- seperator = createSeperator("overlayRightSeperator")
- m.rightGroup.insertChild(seperator, 0)
- end if
- if not isValid(currentUser)
- myUser = createOverhangUser()
- myUser.text = m.top.currentUser
- m.rightGroup.insertChild(myUser, 0)
- end if
-end sub
-
-' Remove the Jellyfin logo from the overhang.
-sub hideUser()
- scene = m.top.getScene()
-
- currentUser = scene.findNode("overlayCurrentUser")
- rightSeperator = scene.findNode("overlayRightSeperator")
-
- if isValid(currentUser)
- m.rightGroup.removeChild(currentUser)
- end if
- if isValid(rightSeperator)
- m.rightGroup.removeChild(rightSeperator)
+ if isLogoVisible
+ if not isValid(logo)
+ posterLogo = createLogoPoster()
+ m.leftGroup.insertChild(posterLogo, 0)
+ end if
+ else
+ ' remove the logo
+ if isValid(logo)
+ m.leftGroup.removeChild(logo)
+ end if
end if
end sub
diff --git a/components/JFOverhang.xml b/components/JFOverhang.xml
index 8c789762..679e669a 100644
--- a/components/JFOverhang.xml
+++ b/components/JFOverhang.xml
@@ -1,9 +1,8 @@
-
+
-
@@ -38,10 +37,6 @@
-
-
-
-
-
+
\ No newline at end of file
diff --git a/components/config/LoginScene.bs b/components/config/LoginScene.bs
index 80b6c75a..f545b615 100644
--- a/components/config/LoginScene.bs
+++ b/components/config/LoginScene.bs
@@ -1,8 +1,20 @@
+import "pkg:/source/utils/misc.bs"
+
sub init()
m.top.setFocus(true)
m.top.optionsAvailable = false
end sub
+' JFScreen hook.
+sub OnScreenShown()
+ scene = m.top.getScene()
+ overhang = scene.findNode("overhang")
+ if isValid(overhang)
+ overhang.isLogoVisible = true
+ overhang.currentUser = ""
+ end if
+end sub
+
function onKeyEvent(key as string, press as boolean) as boolean
' Returns true if user navigates to a new focusable element
if not press then return false
diff --git a/components/config/LoginScene.xml b/components/config/LoginScene.xml
index 9c32da74..ef6d6b91 100644
--- a/components/config/LoginScene.xml
+++ b/components/config/LoginScene.xml
@@ -1,5 +1,5 @@
-
+