Add announcement
This commit is contained in:
1 parent
254efb289d
commit
faa4b928d9
3 files changed
+51
-1
No files matched your search
+3
-1
@@ -7,7 +7,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
- Nothing worth mentioning yet.
|
### Added
|
||||||
|
|
||||||
|
- Announcement dialog to indicate outage
|
||||||
|
|
||||||
## [0.23.0] - 2024-04-04
|
## [0.23.0] - 2024-04-04
|
||||||
|
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ import "pkg:/components/EcpArgs.bs"
|
|||||||
import "pkg:/components/parts/AutoBind/AutoBind.part.bs"
|
import "pkg:/components/parts/AutoBind/AutoBind.part.bs"
|
||||||
import "pkg:/components/parts/AutoBind/OnNodeReadyNoOp.bs"
|
import "pkg:/components/parts/AutoBind/OnNodeReadyNoOp.bs"
|
||||||
import "pkg:/source/utils/LoadingScreen.bs"
|
import "pkg:/source/utils/LoadingScreen.bs"
|
||||||
|
import "pkg:/source/utils/Locale.bs"
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
m.scene = m.top.getScene()
|
m.scene = m.top.getScene()
|
||||||
@@ -18,6 +19,7 @@ function MainSceneContainerChanged()
|
|||||||
InitEcpArgs()
|
InitEcpArgs()
|
||||||
m.scene.signalBeacon("AppLaunchComplete")
|
m.scene.signalBeacon("AppLaunchComplete")
|
||||||
CopyLoadingMessagesToCache()
|
CopyLoadingMessagesToCache()
|
||||||
|
ShowAnnouncement()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function StartWebServer()
|
function StartWebServer()
|
||||||
@@ -30,3 +32,26 @@ function StartWebServer()
|
|||||||
m.dialServer = m.top.findNode("DialServer")
|
m.dialServer = m.top.findNode("DialServer")
|
||||||
m.dialServer@.StartServer()
|
m.dialServer@.StartServer()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function ShowAnnouncement()
|
||||||
|
title = "Announcement"
|
||||||
|
|
||||||
|
message = [
|
||||||
|
"YouTube has made changes that broke 3rd party apps, which is affecting Playlet and Invidious.",
|
||||||
|
"Some videos might not play, and you might see error messages often.",
|
||||||
|
"We're aware of the issue, and working on a fix.",
|
||||||
|
"We apologize for the inconvenience.",
|
||||||
|
]
|
||||||
|
|
||||||
|
buttons = [Tr(Locale.Buttons.OK)]
|
||||||
|
|
||||||
|
dialog = CreateObject("roSGNode", "SimpleDialog")
|
||||||
|
dialog.title = title
|
||||||
|
dialog.message = message
|
||||||
|
dialog.buttons = buttons
|
||||||
|
deviceInfo = CreateObject("roDeviceInfo")
|
||||||
|
displaySize = deviceInfo.GetDisplaySize()
|
||||||
|
dialog.width = displaySize.w - 180
|
||||||
|
|
||||||
|
m.top.getScene().dialog = dialog
|
||||||
|
end function
|
||||||
@@ -2,6 +2,7 @@
|
|||||||
'import "pkg:/components/parts/AutoBind/AutoBind.part.bs"
|
'import "pkg:/components/parts/AutoBind/AutoBind.part.bs"
|
||||||
'import "pkg:/components/parts/AutoBind/OnNodeReadyNoOp.bs"
|
'import "pkg:/components/parts/AutoBind/OnNodeReadyNoOp.bs"
|
||||||
'import "pkg:/source/utils/LoadingScreen.bs"
|
'import "pkg:/source/utils/LoadingScreen.bs"
|
||||||
|
'import "pkg:/source/utils/Locale.bs"
|
||||||
|
|
||||||
function Init()
|
function Init()
|
||||||
InitializeBindings() ' auto-generated!
|
InitializeBindings() ' auto-generated!
|
||||||
@@ -19,6 +20,7 @@ function MainSceneContainerChanged()
|
|||||||
InitEcpArgs()
|
InitEcpArgs()
|
||||||
m.scene.signalBeacon("AppLaunchComplete")
|
m.scene.signalBeacon("AppLaunchComplete")
|
||||||
CopyLoadingMessagesToCache()
|
CopyLoadingMessagesToCache()
|
||||||
|
ShowAnnouncement()
|
||||||
end function
|
end function
|
||||||
|
|
||||||
function StartWebServer()
|
function StartWebServer()
|
||||||
@@ -29,4 +31,25 @@ function StartWebServer()
|
|||||||
m.dialServer = m.top.findNode("DialServer")
|
m.dialServer = m.top.findNode("DialServer")
|
||||||
m.dialServer.callfunc("StartServer", invalid)
|
m.dialServer.callfunc("StartServer", invalid)
|
||||||
end function
|
end function
|
||||||
|
|
||||||
|
function ShowAnnouncement()
|
||||||
|
title = "Announcement"
|
||||||
|
message = [
|
||||||
|
"YouTube has made changes that broke 3rd party apps, which is affecting Playlet and Invidious."
|
||||||
|
"Some videos might not play, and you might see error messages often."
|
||||||
|
"We're aware of the issue, and working on a fix."
|
||||||
|
"We apologize for the inconvenience."
|
||||||
|
]
|
||||||
|
buttons = [
|
||||||
|
Tr("OK")
|
||||||
|
]
|
||||||
|
dialog = CreateObject("roSGNode", "SimpleDialog")
|
||||||
|
dialog.title = title
|
||||||
|
dialog.message = message
|
||||||
|
dialog.buttons = buttons
|
||||||
|
deviceInfo = CreateObject("roDeviceInfo")
|
||||||
|
displaySize = deviceInfo.GetDisplaySize()
|
||||||
|
dialog.width = displaySize.w - 180
|
||||||
|
m.top.getScene().dialog = dialog
|
||||||
|
end function
|
||||||
'//# sourceMappingURL=./MainScene.brs.map
|
'//# sourceMappingURL=./MainScene.brs.map
|
||||||
Reference in new issue
Block a user