mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-24 15:01:38 +00:00
Enhance StdBackend with critical error handling and improve file watcher reliability
- Introduced `WatcherCriticalError` enum to categorize critical errors from the file watcher. - Added a `CriticalErrorHandler` callback type for custom error handling in the watcher thread. - Updated `StdBackend` to include a receiver for critical errors, allowing for better error management and logging. - Refactored the watcher thread to handle errors gracefully instead of terminating the process, improving overall stability.
This commit is contained in:
parent
78aab0eca4
commit
41363473b2
27 changed files with 409 additions and 173 deletions
|
|
@ -56,7 +56,8 @@ local function SelectionOption(props)
|
|||
return Theme.with(function(theme)
|
||||
local isSelected = props.isSelected
|
||||
local bgColor = if isSelected
|
||||
then (if props.optionType == "push" then Color3.fromHex("27AE60")
|
||||
then (if props.optionType == "push"
|
||||
then Color3.fromHex("27AE60")
|
||||
elseif props.optionType == "pull" then Color3.fromHex("E74C3C")
|
||||
else Color3.fromHex("7F8C8D"))
|
||||
else theme.BorderedContainer.BackgroundColor
|
||||
|
|
|
|||
|
|
@ -130,19 +130,27 @@ function TextButton:render()
|
|||
zIndex = -1,
|
||||
}),
|
||||
|
||||
Background = (style == "Solid" or style == "Warning" or style == "Primary" or style == "Success" or style == "Danger" or style == "Neutral") and e(SlicedImage, {
|
||||
slice = Assets.Slices.RoundedBackground,
|
||||
color = bindingUtil.mapLerp(
|
||||
bindingEnabled,
|
||||
buttonTheme.Enabled.BackgroundColor,
|
||||
buttonTheme.Disabled.BackgroundColor
|
||||
),
|
||||
transparency = self.props.transparency,
|
||||
Background = (
|
||||
style == "Solid"
|
||||
or style == "Warning"
|
||||
or style == "Primary"
|
||||
or style == "Success"
|
||||
or style == "Danger"
|
||||
or style == "Neutral"
|
||||
)
|
||||
and e(SlicedImage, {
|
||||
slice = Assets.Slices.RoundedBackground,
|
||||
color = bindingUtil.mapLerp(
|
||||
bindingEnabled,
|
||||
buttonTheme.Enabled.BackgroundColor,
|
||||
buttonTheme.Disabled.BackgroundColor
|
||||
),
|
||||
transparency = self.props.transparency,
|
||||
|
||||
size = UDim2.new(1, 0, 1, 0),
|
||||
size = UDim2.new(1, 0, 1, 0),
|
||||
|
||||
zIndex = -2,
|
||||
}),
|
||||
zIndex = -2,
|
||||
}),
|
||||
|
||||
Children = Roact.createFragment(self.props[Roact.Children]),
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue