mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-22 21:41:37 +00:00
Only wrap the input in theme
This commit is contained in:
parent
4e9cd40062
commit
6173d479dd
1 changed files with 203 additions and 203 deletions
|
|
@ -83,104 +83,104 @@ function SettingsPage:render()
|
||||||
return layoutOrder
|
return layoutOrder
|
||||||
end
|
end
|
||||||
|
|
||||||
return Theme.with(function(theme)
|
return Roact.createFragment({
|
||||||
return Roact.createFragment({
|
Navbar = e(Navbar, {
|
||||||
Navbar = e(Navbar, {
|
onBack = self.props.onBack,
|
||||||
onBack = self.props.onBack,
|
transparency = self.props.transparency,
|
||||||
|
layoutOrder = layoutIncrement(),
|
||||||
|
}),
|
||||||
|
Content = e(ScrollingFrame, {
|
||||||
|
size = UDim2.new(1, 0, 1, -47),
|
||||||
|
position = UDim2.new(0, 0, 0, 47),
|
||||||
|
contentSize = self.contentSize,
|
||||||
|
transparency = self.props.transparency,
|
||||||
|
}, {
|
||||||
|
AutoReconnect = e(Setting, {
|
||||||
|
id = "autoReconnect",
|
||||||
|
name = "Auto Reconnect",
|
||||||
|
description = "Reconnect to server on place open if the served project matches the last sync to the place",
|
||||||
transparency = self.props.transparency,
|
transparency = self.props.transparency,
|
||||||
layoutOrder = layoutIncrement(),
|
layoutOrder = layoutIncrement(),
|
||||||
}),
|
}),
|
||||||
Content = e(ScrollingFrame, {
|
|
||||||
size = UDim2.new(1, 0, 1, -47),
|
ShowNotifications = e(Setting, {
|
||||||
position = UDim2.new(0, 0, 0, 47),
|
id = "showNotifications",
|
||||||
contentSize = self.contentSize,
|
name = "Show Notifications",
|
||||||
|
description = "Popup notifications in viewport",
|
||||||
transparency = self.props.transparency,
|
transparency = self.props.transparency,
|
||||||
}, {
|
layoutOrder = layoutIncrement(),
|
||||||
AutoReconnect = e(Setting, {
|
}),
|
||||||
id = "autoReconnect",
|
|
||||||
name = "Auto Reconnect",
|
|
||||||
description = "Reconnect to server on place open if the served project matches the last sync to the place",
|
|
||||||
transparency = self.props.transparency,
|
|
||||||
layoutOrder = layoutIncrement(),
|
|
||||||
}),
|
|
||||||
|
|
||||||
ShowNotifications = e(Setting, {
|
SyncReminderMode = e(Setting, {
|
||||||
id = "showNotifications",
|
id = "syncReminderMode",
|
||||||
name = "Show Notifications",
|
name = "Sync Reminder",
|
||||||
description = "Popup notifications in viewport",
|
description = "What type of reminders you receive for syncing your project",
|
||||||
transparency = self.props.transparency,
|
transparency = self.props.transparency,
|
||||||
layoutOrder = layoutIncrement(),
|
layoutOrder = layoutIncrement(),
|
||||||
}),
|
visible = Settings:getBinding("showNotifications"),
|
||||||
|
|
||||||
SyncReminderMode = e(Setting, {
|
options = syncReminderModes,
|
||||||
id = "syncReminderMode",
|
}),
|
||||||
name = "Sync Reminder",
|
|
||||||
description = "What type of reminders you receive for syncing your project",
|
|
||||||
transparency = self.props.transparency,
|
|
||||||
layoutOrder = layoutIncrement(),
|
|
||||||
visible = Settings:getBinding("showNotifications"),
|
|
||||||
|
|
||||||
options = syncReminderModes,
|
SyncReminderPolling = e(Setting, {
|
||||||
}),
|
id = "syncReminderPolling",
|
||||||
|
name = "Sync Reminder Polling",
|
||||||
|
description = "Look for available sync servers periodically",
|
||||||
|
transparency = self.props.transparency,
|
||||||
|
layoutOrder = layoutIncrement(),
|
||||||
|
visible = Settings:getBindings("syncReminderMode", "showNotifications"):map(function(values)
|
||||||
|
return values.syncReminderMode ~= "None" and values.showNotifications
|
||||||
|
end),
|
||||||
|
}),
|
||||||
|
|
||||||
SyncReminderPolling = e(Setting, {
|
ConfirmationBehavior = e(Setting, {
|
||||||
id = "syncReminderPolling",
|
id = "confirmationBehavior",
|
||||||
name = "Sync Reminder Polling",
|
name = "Confirmation Behavior",
|
||||||
description = "Look for available sync servers periodically",
|
description = "When to prompt for confirmation before syncing",
|
||||||
transparency = self.props.transparency,
|
transparency = self.props.transparency,
|
||||||
layoutOrder = layoutIncrement(),
|
layoutOrder = layoutIncrement(),
|
||||||
visible = Settings:getBindings("syncReminderMode", "showNotifications"):map(function(values)
|
|
||||||
return values.syncReminderMode ~= "None" and values.showNotifications
|
options = confirmationBehaviors,
|
||||||
|
}),
|
||||||
|
|
||||||
|
LargeChangesConfirmationThreshold = e(Setting, {
|
||||||
|
id = "largeChangesConfirmationThreshold",
|
||||||
|
name = "Confirmation Threshold",
|
||||||
|
description = "How many modified instances to be considered a large change",
|
||||||
|
transparency = self.props.transparency,
|
||||||
|
layoutOrder = layoutIncrement(),
|
||||||
|
visible = Settings:getBinding("confirmationBehavior"):map(function(value)
|
||||||
|
return value == "Large Changes"
|
||||||
|
end),
|
||||||
|
input = e(TextInput, {
|
||||||
|
size = UDim2.new(0, 40, 0, 28),
|
||||||
|
text = Settings:getBinding("largeChangesConfirmationThreshold"):map(function(value)
|
||||||
|
return tostring(value)
|
||||||
end),
|
end),
|
||||||
}),
|
|
||||||
|
|
||||||
ConfirmationBehavior = e(Setting, {
|
|
||||||
id = "confirmationBehavior",
|
|
||||||
name = "Confirmation Behavior",
|
|
||||||
description = "When to prompt for confirmation before syncing",
|
|
||||||
transparency = self.props.transparency,
|
transparency = self.props.transparency,
|
||||||
layoutOrder = layoutIncrement(),
|
enabled = true,
|
||||||
|
onEntered = function(text)
|
||||||
options = confirmationBehaviors,
|
local number = tonumber(string.match(text, "%d+"))
|
||||||
|
if number then
|
||||||
|
Settings:set("largeChangesConfirmationThreshold", math.clamp(number, 1, 999))
|
||||||
|
else
|
||||||
|
-- Force text back to last valid value
|
||||||
|
Settings:set(
|
||||||
|
"largeChangesConfirmationThreshold",
|
||||||
|
Settings:get("largeChangesConfirmationThreshold")
|
||||||
|
)
|
||||||
|
end
|
||||||
|
end,
|
||||||
}),
|
}),
|
||||||
|
}),
|
||||||
|
|
||||||
LargeChangesConfirmationThreshold = e(Setting, {
|
Permissions = e(Setting, {
|
||||||
id = "largeChangesConfirmationThreshold",
|
name = "Third Party Permissions",
|
||||||
name = "Confirmation Threshold",
|
description = "Manage permissions for third party plugins",
|
||||||
description = "How many modified instances to be considered a large change",
|
transparency = self.props.transparency,
|
||||||
transparency = self.props.transparency,
|
layoutOrder = layoutIncrement(),
|
||||||
layoutOrder = layoutIncrement(),
|
input = Theme.with(function(theme)
|
||||||
visible = Settings:getBinding("confirmationBehavior"):map(function(value)
|
return e("TextButton", {
|
||||||
return value == "Large Changes"
|
|
||||||
end),
|
|
||||||
input = e(TextInput, {
|
|
||||||
size = UDim2.new(0, 40, 0, 28),
|
|
||||||
text = Settings:getBinding("largeChangesConfirmationThreshold"):map(function(value)
|
|
||||||
return tostring(value)
|
|
||||||
end),
|
|
||||||
transparency = self.props.transparency,
|
|
||||||
enabled = true,
|
|
||||||
onEntered = function(text)
|
|
||||||
local number = tonumber(string.match(text, "%d+"))
|
|
||||||
if number then
|
|
||||||
Settings:set("largeChangesConfirmationThreshold", math.clamp(number, 1, 999))
|
|
||||||
else
|
|
||||||
-- Force text back to last valid value
|
|
||||||
Settings:set(
|
|
||||||
"largeChangesConfirmationThreshold",
|
|
||||||
Settings:get("largeChangesConfirmationThreshold")
|
|
||||||
)
|
|
||||||
end
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
}),
|
|
||||||
|
|
||||||
Permissions = e(Setting, {
|
|
||||||
name = "Third Party Permissions",
|
|
||||||
description = "Manage permissions for third party plugins",
|
|
||||||
transparency = self.props.transparency,
|
|
||||||
layoutOrder = layoutIncrement(),
|
|
||||||
input = e("TextButton", {
|
|
||||||
Text = "",
|
Text = "",
|
||||||
BackgroundTransparency = 1,
|
BackgroundTransparency = 1,
|
||||||
Size = UDim2.fromOffset(28, 28),
|
Size = UDim2.fromOffset(28, 28),
|
||||||
|
|
@ -209,124 +209,124 @@ function SettingsPage:render()
|
||||||
BackgroundTransparency = 1,
|
BackgroundTransparency = 1,
|
||||||
}),
|
}),
|
||||||
}),
|
}),
|
||||||
}),
|
})
|
||||||
}),
|
end),
|
||||||
|
|
||||||
PlaySounds = e(Setting, {
|
|
||||||
id = "playSounds",
|
|
||||||
name = "Play Sounds",
|
|
||||||
description = "Toggle sound effects",
|
|
||||||
transparency = self.props.transparency,
|
|
||||||
layoutOrder = layoutIncrement(),
|
|
||||||
}),
|
|
||||||
|
|
||||||
EnableSyncFallback = e(Setting, {
|
|
||||||
id = "enableSyncFallback",
|
|
||||||
name = "Enable Sync Fallback",
|
|
||||||
description = "Whether Instances that fail to sync are remade as a fallback. If this is enabled, Instances may be destroyed and remade when syncing.",
|
|
||||||
transparency = self.props.transparency,
|
|
||||||
layoutOrder = layoutIncrement(),
|
|
||||||
}),
|
|
||||||
|
|
||||||
CheckForUpdates = e(Setting, {
|
|
||||||
id = "checkForUpdates",
|
|
||||||
name = "Check For Updates",
|
|
||||||
description = "Notify about newer compatible Rojo releases",
|
|
||||||
transparency = self.props.transparency,
|
|
||||||
layoutOrder = layoutIncrement(),
|
|
||||||
}),
|
|
||||||
|
|
||||||
CheckForPreleases = e(Setting, {
|
|
||||||
id = "checkForPrereleases",
|
|
||||||
name = "Include Prerelease Updates",
|
|
||||||
description = "Include prereleases when checking for updates",
|
|
||||||
transparency = self.props.transparency,
|
|
||||||
layoutOrder = layoutIncrement(),
|
|
||||||
visible = if string.find(debug.traceback(), "\n[^\n]-user_.-$") == nil
|
|
||||||
then false -- Must be a local install to allow prerelease checks
|
|
||||||
else Settings:getBinding("checkForUpdates"),
|
|
||||||
}),
|
|
||||||
|
|
||||||
AutoConnectPlaytestServer = e(Setting, {
|
|
||||||
id = "autoConnectPlaytestServer",
|
|
||||||
name = "Auto Connect Playtest Server",
|
|
||||||
description = "Automatically connect game server to Rojo when playtesting while connected in Edit",
|
|
||||||
tag = "unstable",
|
|
||||||
transparency = self.props.transparency,
|
|
||||||
layoutOrder = layoutIncrement(),
|
|
||||||
}),
|
|
||||||
|
|
||||||
OpenScriptsExternally = e(Setting, {
|
|
||||||
id = "openScriptsExternally",
|
|
||||||
name = "Open Scripts Externally",
|
|
||||||
description = "Attempt to open scripts in an external editor",
|
|
||||||
tag = "unstable",
|
|
||||||
transparency = self.props.transparency,
|
|
||||||
layoutOrder = layoutIncrement(),
|
|
||||||
}),
|
|
||||||
|
|
||||||
TwoWaySync = e(Setting, {
|
|
||||||
id = "twoWaySync",
|
|
||||||
name = "Two-Way Sync",
|
|
||||||
description = "Editing files in Studio will sync them into the filesystem",
|
|
||||||
locked = self.props.syncActive,
|
|
||||||
lockedTooltip = "(Cannot change while currently syncing. Disconnect first.)",
|
|
||||||
tag = "unstable",
|
|
||||||
transparency = self.props.transparency,
|
|
||||||
layoutOrder = layoutIncrement(),
|
|
||||||
}),
|
|
||||||
|
|
||||||
LogLevel = e(Setting, {
|
|
||||||
id = "logLevel",
|
|
||||||
name = "Log Level",
|
|
||||||
description = "Plugin output verbosity level",
|
|
||||||
tag = "debug",
|
|
||||||
transparency = self.props.transparency,
|
|
||||||
layoutOrder = layoutIncrement(),
|
|
||||||
|
|
||||||
options = invertedLevels,
|
|
||||||
showReset = Settings:getBinding("logLevel"):map(function(value)
|
|
||||||
return value ~= "Info"
|
|
||||||
end),
|
|
||||||
onReset = function()
|
|
||||||
Settings:set("logLevel", "Info")
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
|
|
||||||
TypecheckingEnabled = e(Setting, {
|
|
||||||
id = "typecheckingEnabled",
|
|
||||||
name = "Typechecking",
|
|
||||||
description = "Toggle typechecking on the API surface",
|
|
||||||
tag = "debug",
|
|
||||||
transparency = self.props.transparency,
|
|
||||||
layoutOrder = layoutIncrement(),
|
|
||||||
}),
|
|
||||||
|
|
||||||
TimingLogsEnabled = e(Setting, {
|
|
||||||
id = "timingLogsEnabled",
|
|
||||||
name = "Timing Logs",
|
|
||||||
description = "Toggle logging timing of internal actions for benchmarking Rojo performance",
|
|
||||||
tag = "debug",
|
|
||||||
transparency = self.props.transparency,
|
|
||||||
layoutOrder = layoutIncrement(),
|
|
||||||
}),
|
|
||||||
|
|
||||||
Layout = e("UIListLayout", {
|
|
||||||
FillDirection = Enum.FillDirection.Vertical,
|
|
||||||
SortOrder = Enum.SortOrder.LayoutOrder,
|
|
||||||
|
|
||||||
[Roact.Change.AbsoluteContentSize] = function(object)
|
|
||||||
self.setContentSize(object.AbsoluteContentSize)
|
|
||||||
end,
|
|
||||||
}),
|
|
||||||
|
|
||||||
Padding = e("UIPadding", {
|
|
||||||
PaddingLeft = UDim.new(0, 20),
|
|
||||||
PaddingRight = UDim.new(0, 20),
|
|
||||||
}),
|
|
||||||
}),
|
}),
|
||||||
})
|
|
||||||
end)
|
PlaySounds = e(Setting, {
|
||||||
|
id = "playSounds",
|
||||||
|
name = "Play Sounds",
|
||||||
|
description = "Toggle sound effects",
|
||||||
|
transparency = self.props.transparency,
|
||||||
|
layoutOrder = layoutIncrement(),
|
||||||
|
}),
|
||||||
|
|
||||||
|
EnableSyncFallback = e(Setting, {
|
||||||
|
id = "enableSyncFallback",
|
||||||
|
name = "Enable Sync Fallback",
|
||||||
|
description = "Whether Instances that fail to sync are remade as a fallback. If this is enabled, Instances may be destroyed and remade when syncing.",
|
||||||
|
transparency = self.props.transparency,
|
||||||
|
layoutOrder = layoutIncrement(),
|
||||||
|
}),
|
||||||
|
|
||||||
|
CheckForUpdates = e(Setting, {
|
||||||
|
id = "checkForUpdates",
|
||||||
|
name = "Check For Updates",
|
||||||
|
description = "Notify about newer compatible Rojo releases",
|
||||||
|
transparency = self.props.transparency,
|
||||||
|
layoutOrder = layoutIncrement(),
|
||||||
|
}),
|
||||||
|
|
||||||
|
CheckForPreleases = e(Setting, {
|
||||||
|
id = "checkForPrereleases",
|
||||||
|
name = "Include Prerelease Updates",
|
||||||
|
description = "Include prereleases when checking for updates",
|
||||||
|
transparency = self.props.transparency,
|
||||||
|
layoutOrder = layoutIncrement(),
|
||||||
|
visible = if string.find(debug.traceback(), "\n[^\n]-user_.-$") == nil
|
||||||
|
then false -- Must be a local install to allow prerelease checks
|
||||||
|
else Settings:getBinding("checkForUpdates"),
|
||||||
|
}),
|
||||||
|
|
||||||
|
AutoConnectPlaytestServer = e(Setting, {
|
||||||
|
id = "autoConnectPlaytestServer",
|
||||||
|
name = "Auto Connect Playtest Server",
|
||||||
|
description = "Automatically connect game server to Rojo when playtesting while connected in Edit",
|
||||||
|
tag = "unstable",
|
||||||
|
transparency = self.props.transparency,
|
||||||
|
layoutOrder = layoutIncrement(),
|
||||||
|
}),
|
||||||
|
|
||||||
|
OpenScriptsExternally = e(Setting, {
|
||||||
|
id = "openScriptsExternally",
|
||||||
|
name = "Open Scripts Externally",
|
||||||
|
description = "Attempt to open scripts in an external editor",
|
||||||
|
tag = "unstable",
|
||||||
|
transparency = self.props.transparency,
|
||||||
|
layoutOrder = layoutIncrement(),
|
||||||
|
}),
|
||||||
|
|
||||||
|
TwoWaySync = e(Setting, {
|
||||||
|
id = "twoWaySync",
|
||||||
|
name = "Two-Way Sync",
|
||||||
|
description = "Editing files in Studio will sync them into the filesystem",
|
||||||
|
locked = self.props.syncActive,
|
||||||
|
lockedTooltip = "(Cannot change while currently syncing. Disconnect first.)",
|
||||||
|
tag = "unstable",
|
||||||
|
transparency = self.props.transparency,
|
||||||
|
layoutOrder = layoutIncrement(),
|
||||||
|
}),
|
||||||
|
|
||||||
|
LogLevel = e(Setting, {
|
||||||
|
id = "logLevel",
|
||||||
|
name = "Log Level",
|
||||||
|
description = "Plugin output verbosity level",
|
||||||
|
tag = "debug",
|
||||||
|
transparency = self.props.transparency,
|
||||||
|
layoutOrder = layoutIncrement(),
|
||||||
|
|
||||||
|
options = invertedLevels,
|
||||||
|
showReset = Settings:getBinding("logLevel"):map(function(value)
|
||||||
|
return value ~= "Info"
|
||||||
|
end),
|
||||||
|
onReset = function()
|
||||||
|
Settings:set("logLevel", "Info")
|
||||||
|
end,
|
||||||
|
}),
|
||||||
|
|
||||||
|
TypecheckingEnabled = e(Setting, {
|
||||||
|
id = "typecheckingEnabled",
|
||||||
|
name = "Typechecking",
|
||||||
|
description = "Toggle typechecking on the API surface",
|
||||||
|
tag = "debug",
|
||||||
|
transparency = self.props.transparency,
|
||||||
|
layoutOrder = layoutIncrement(),
|
||||||
|
}),
|
||||||
|
|
||||||
|
TimingLogsEnabled = e(Setting, {
|
||||||
|
id = "timingLogsEnabled",
|
||||||
|
name = "Timing Logs",
|
||||||
|
description = "Toggle logging timing of internal actions for benchmarking Rojo performance",
|
||||||
|
tag = "debug",
|
||||||
|
transparency = self.props.transparency,
|
||||||
|
layoutOrder = layoutIncrement(),
|
||||||
|
}),
|
||||||
|
|
||||||
|
Layout = e("UIListLayout", {
|
||||||
|
FillDirection = Enum.FillDirection.Vertical,
|
||||||
|
SortOrder = Enum.SortOrder.LayoutOrder,
|
||||||
|
|
||||||
|
[Roact.Change.AbsoluteContentSize] = function(object)
|
||||||
|
self.setContentSize(object.AbsoluteContentSize)
|
||||||
|
end,
|
||||||
|
}),
|
||||||
|
|
||||||
|
Padding = e("UIPadding", {
|
||||||
|
PaddingLeft = UDim.new(0, 20),
|
||||||
|
PaddingRight = UDim.new(0, 20),
|
||||||
|
}),
|
||||||
|
}),
|
||||||
|
})
|
||||||
end
|
end
|
||||||
|
|
||||||
return SettingsPage
|
return SettingsPage
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue