mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-23 14:01:37 +00:00
Update default settings and enhance ConfirmingPage logic
- Changed default settings to enable two-way and one-shot sync, disable notifications and sync fallback, and adjust confirmation behavior. - Improved ConfirmingPage to conditionally display the Abort button and update the Accept button text based on the presence of changes in the patch tree. - Updated logging level in SyncbackStats to warn for better visibility on debug logging hints.
This commit is contained in:
parent
01e20f521a
commit
af65056c44
3 changed files with 15 additions and 11 deletions
|
|
@ -111,6 +111,9 @@ function ConfirmingPage:render()
|
|||
allSelected = PatchTree.allNodesSelected(self.props.patchTree, self.state.selections)
|
||||
end
|
||||
|
||||
-- Check if there are any changes at all
|
||||
local hasChanges = self.props.patchTree and self.props.patchTree:getCount() > 0
|
||||
|
||||
return Theme.with(function(theme)
|
||||
local pageContent = Roact.createFragment({
|
||||
Title = e("TextLabel", {
|
||||
|
|
@ -159,17 +162,18 @@ function ConfirmingPage:render()
|
|||
LayoutOrder = 4,
|
||||
BackgroundTransparency = 1,
|
||||
}, {
|
||||
Abort = e(TextButton, {
|
||||
-- Only show Abort button when there are changes
|
||||
Abort = if hasChanges then e(TextButton, {
|
||||
text = "Abort",
|
||||
style = "Bordered",
|
||||
transparency = self.props.transparency,
|
||||
layoutOrder = 1,
|
||||
onClick = self.props.onAbort,
|
||||
}),
|
||||
}) else nil,
|
||||
|
||||
Accept = e(TextButton, {
|
||||
text = "Accept",
|
||||
style = "Primary",
|
||||
text = if hasChanges then "Accept" else "OK",
|
||||
style = if hasChanges then "Primary" else "Success",
|
||||
transparency = self.props.transparency,
|
||||
layoutOrder = 2,
|
||||
onClick = function()
|
||||
|
|
|
|||
|
|
@ -11,17 +11,17 @@ local Roact = require(Packages.Roact)
|
|||
|
||||
local defaultSettings = {
|
||||
openScriptsExternally = false,
|
||||
twoWaySync = false,
|
||||
oneShotSync = false,
|
||||
twoWaySync = true,
|
||||
oneShotSync = true,
|
||||
autoReconnect = false,
|
||||
showNotifications = true,
|
||||
enableSyncFallback = true,
|
||||
showNotifications = false,
|
||||
enableSyncFallback = false,
|
||||
syncReminderMode = "Notify" :: "None" | "Notify" | "Fullscreen",
|
||||
syncReminderPolling = true,
|
||||
checkForUpdates = true,
|
||||
checkForUpdates = false,
|
||||
checkForPrereleases = false,
|
||||
autoConnectPlaytestServer = false,
|
||||
confirmationBehavior = "Initial" :: "Never" | "Initial" | "Always" | "Large Changes" | "Unlisted PlaceId",
|
||||
confirmationBehavior = "Always" :: "Never" | "Initial" | "Always" | "Large Changes" | "Unlisted PlaceId",
|
||||
largeChangesConfirmationThreshold = 5,
|
||||
playSounds = true,
|
||||
typecheckingEnabled = false,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue