mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 05:51:39 +00:00
Refactor SyncbackConfirm component and enhance UI responsiveness
- Updated the `SyncbackConfirm` component to use `Theme.StudioProvider` for improved theming support. - Introduced a `noTransparency` binding to manage button transparency, enhancing visual consistency. - Adjusted the `Cancel` and `Confirm` buttons to utilize the new transparency binding, improving user experience during syncback confirmation. These changes enhance the UI's responsiveness and maintainability of the syncback confirmation process.
This commit is contained in:
parent
b39c01e5e9
commit
fa2b86c3d9
1 changed files with 7 additions and 1 deletions
|
|
@ -1211,7 +1211,8 @@ function App:render()
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
|
|
||||||
SyncbackConfirm = e(StudioPluginGui, {
|
SyncbackConfirm = e(Theme.StudioProvider, nil, {
|
||||||
|
e(StudioPluginGui, {
|
||||||
id = "Atlas_SyncbackConfirm",
|
id = "Atlas_SyncbackConfirm",
|
||||||
title = "Full Syncback",
|
title = "Full Syncback",
|
||||||
active = self.state.showingSyncbackConfirm == true,
|
active = self.state.showingSyncbackConfirm == true,
|
||||||
|
|
@ -1229,6 +1230,8 @@ function App:render()
|
||||||
end,
|
end,
|
||||||
}, {
|
}, {
|
||||||
Content = Theme.with(function(theme)
|
Content = Theme.with(function(theme)
|
||||||
|
local noTransparency = Roact.createBinding(0)
|
||||||
|
|
||||||
return e("Frame", {
|
return e("Frame", {
|
||||||
Size = UDim2.fromScale(1, 1),
|
Size = UDim2.fromScale(1, 1),
|
||||||
BackgroundColor3 = theme.BackgroundColor,
|
BackgroundColor3 = theme.BackgroundColor,
|
||||||
|
|
@ -1271,6 +1274,7 @@ function App:render()
|
||||||
Cancel = e(TextButton, {
|
Cancel = e(TextButton, {
|
||||||
text = "Cancel",
|
text = "Cancel",
|
||||||
style = "Bordered",
|
style = "Bordered",
|
||||||
|
transparency = noTransparency,
|
||||||
layoutOrder = 1,
|
layoutOrder = 1,
|
||||||
onClick = function()
|
onClick = function()
|
||||||
self:setState({ showingSyncbackConfirm = false })
|
self:setState({ showingSyncbackConfirm = false })
|
||||||
|
|
@ -1279,6 +1283,7 @@ function App:render()
|
||||||
Confirm = e(TextButton, {
|
Confirm = e(TextButton, {
|
||||||
text = "Syncback",
|
text = "Syncback",
|
||||||
style = "Danger",
|
style = "Danger",
|
||||||
|
transparency = noTransparency,
|
||||||
layoutOrder = 2,
|
layoutOrder = 2,
|
||||||
onClick = function()
|
onClick = function()
|
||||||
self:performSyncback()
|
self:performSyncback()
|
||||||
|
|
@ -1288,6 +1293,7 @@ function App:render()
|
||||||
})
|
})
|
||||||
end),
|
end),
|
||||||
}),
|
}),
|
||||||
|
}),
|
||||||
|
|
||||||
toggleAction = e(StudioPluginAction, {
|
toggleAction = e(StudioPluginAction, {
|
||||||
name = "AtlasConnection",
|
name = "AtlasConnection",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue