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:
Joe 2026-02-01 10:06:34 -06:00
parent 01e20f521a
commit af65056c44
3 changed files with 15 additions and 11 deletions

View file

@ -111,6 +111,9 @@ function ConfirmingPage:render()
allSelected = PatchTree.allNodesSelected(self.props.patchTree, self.state.selections) allSelected = PatchTree.allNodesSelected(self.props.patchTree, self.state.selections)
end 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) return Theme.with(function(theme)
local pageContent = Roact.createFragment({ local pageContent = Roact.createFragment({
Title = e("TextLabel", { Title = e("TextLabel", {
@ -159,17 +162,18 @@ function ConfirmingPage:render()
LayoutOrder = 4, LayoutOrder = 4,
BackgroundTransparency = 1, BackgroundTransparency = 1,
}, { }, {
Abort = e(TextButton, { -- Only show Abort button when there are changes
Abort = if hasChanges then e(TextButton, {
text = "Abort", text = "Abort",
style = "Bordered", style = "Bordered",
transparency = self.props.transparency, transparency = self.props.transparency,
layoutOrder = 1, layoutOrder = 1,
onClick = self.props.onAbort, onClick = self.props.onAbort,
}), }) else nil,
Accept = e(TextButton, { Accept = e(TextButton, {
text = "Accept", text = if hasChanges then "Accept" else "OK",
style = "Primary", style = if hasChanges then "Primary" else "Success",
transparency = self.props.transparency, transparency = self.props.transparency,
layoutOrder = 2, layoutOrder = 2,
onClick = function() onClick = function()

View file

@ -11,17 +11,17 @@ local Roact = require(Packages.Roact)
local defaultSettings = { local defaultSettings = {
openScriptsExternally = false, openScriptsExternally = false,
twoWaySync = false, twoWaySync = true,
oneShotSync = false, oneShotSync = true,
autoReconnect = false, autoReconnect = false,
showNotifications = true, showNotifications = false,
enableSyncFallback = true, enableSyncFallback = false,
syncReminderMode = "Notify" :: "None" | "Notify" | "Fullscreen", syncReminderMode = "Notify" :: "None" | "Notify" | "Fullscreen",
syncReminderPolling = true, syncReminderPolling = true,
checkForUpdates = true, checkForUpdates = false,
checkForPrereleases = false, checkForPrereleases = false,
autoConnectPlaytestServer = false, autoConnectPlaytestServer = false,
confirmationBehavior = "Initial" :: "Never" | "Initial" | "Always" | "Large Changes" | "Unlisted PlaceId", confirmationBehavior = "Always" :: "Never" | "Initial" | "Always" | "Large Changes" | "Unlisted PlaceId",
largeChangesConfirmationThreshold = 5, largeChangesConfirmationThreshold = 5,
playSounds = true, playSounds = true,
typecheckingEnabled = false, typecheckingEnabled = false,

View file

@ -240,7 +240,7 @@ impl SyncbackStats {
// Helpful hint about debug logging // Helpful hint about debug logging
if duplicate_count > 0 || rbxm_count > 0 { if duplicate_count > 0 || rbxm_count > 0 {
log::info!( log::warn!(
" Enable debug logging (RUST_LOG=debug) to see individual instance details" " Enable debug logging (RUST_LOG=debug) to see individual instance details"
); );
} }