mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Refactor PullAll button logic in Confirming.lua for improved readability
- Removed conditional rendering of the PullAll button based on settings and simplified its implementation. - Enhanced the overall structure of the button definition for better clarity in the ConfirmingPage render function.
This commit is contained in:
parent
0b243b4ca9
commit
240c225be0
1 changed files with 9 additions and 12 deletions
|
|
@ -4,7 +4,6 @@ local Packages = Rojo.Packages
|
|||
|
||||
local Roact = require(Packages.Roact)
|
||||
|
||||
local Settings = require(Plugin.Settings)
|
||||
local Theme = require(Plugin.App.Theme)
|
||||
local PatchTree = require(Plugin.PatchTree)
|
||||
local TextButton = require(Plugin.App.Components.TextButton)
|
||||
|
|
@ -154,17 +153,15 @@ function ConfirmingPage:render()
|
|||
onClick = self.props.onAbort,
|
||||
}),
|
||||
|
||||
PullAll = if Settings:get("twoWaySync")
|
||||
then e(TextButton, {
|
||||
text = "Pull All",
|
||||
style = "Danger",
|
||||
transparency = self.props.transparency,
|
||||
layoutOrder = 2,
|
||||
onClick = function()
|
||||
self.setAllSelections("pull")
|
||||
end,
|
||||
})
|
||||
else nil,
|
||||
PullAll = e(TextButton, {
|
||||
text = "Pull All",
|
||||
style = "Danger",
|
||||
transparency = self.props.transparency,
|
||||
layoutOrder = 2,
|
||||
onClick = function()
|
||||
self.setAllSelections("pull")
|
||||
end,
|
||||
}),
|
||||
|
||||
SkipAll = e(TextButton, {
|
||||
text = "Skip All",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue