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 Roact = require(Packages.Roact)
|
||||||
|
|
||||||
local Settings = require(Plugin.Settings)
|
|
||||||
local Theme = require(Plugin.App.Theme)
|
local Theme = require(Plugin.App.Theme)
|
||||||
local PatchTree = require(Plugin.PatchTree)
|
local PatchTree = require(Plugin.PatchTree)
|
||||||
local TextButton = require(Plugin.App.Components.TextButton)
|
local TextButton = require(Plugin.App.Components.TextButton)
|
||||||
|
|
@ -154,8 +153,7 @@ function ConfirmingPage:render()
|
||||||
onClick = self.props.onAbort,
|
onClick = self.props.onAbort,
|
||||||
}),
|
}),
|
||||||
|
|
||||||
PullAll = if Settings:get("twoWaySync")
|
PullAll = e(TextButton, {
|
||||||
then e(TextButton, {
|
|
||||||
text = "Pull All",
|
text = "Pull All",
|
||||||
style = "Danger",
|
style = "Danger",
|
||||||
transparency = self.props.transparency,
|
transparency = self.props.transparency,
|
||||||
|
|
@ -163,8 +161,7 @@ function ConfirmingPage:render()
|
||||||
onClick = function()
|
onClick = function()
|
||||||
self.setAllSelections("pull")
|
self.setAllSelections("pull")
|
||||||
end,
|
end,
|
||||||
})
|
}),
|
||||||
else nil,
|
|
||||||
|
|
||||||
SkipAll = e(TextButton, {
|
SkipAll = e(TextButton, {
|
||||||
text = "Skip All",
|
text = "Skip All",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue