From c7a4f892e376caf4f5ac1cafc11894dec8259125 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bar=C4=B1=C5=9F?= <34089907+Barocena@users.noreply.github.com> Date: Thu, 14 Mar 2024 22:41:21 +0300 Subject: [PATCH] Add never option to Confirmation (#893) --- CHANGELOG.md | 2 ++ plugin/src/App/StatusPages/Settings/init.lua | 2 +- plugin/src/App/init.lua | 3 +++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2e564901..b9d199c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Rojo Changelog ## Unreleased Changes +* Added Never option to Confirmation ([#893]) * Added popout diff visualizer for table properties like Attributes and Tags ([#834]) * Updated Theme to use Studio colors ([#838]) * Added experimental setting for Auto Connect in playtests ([#840]) @@ -55,6 +56,7 @@ [#834]: https://github.com/rojo-rbx/rojo/pull/834 [#838]: https://github.com/rojo-rbx/rojo/pull/838 [#840]: https://github.com/rojo-rbx/rojo/pull/840 +[#893]: https://github.com/rojo-rbx/rojo/pull/893 ## [7.4.1] - February 20, 2024 * Made the `name` field optional on project files ([#870]) diff --git a/plugin/src/App/StatusPages/Settings/init.lua b/plugin/src/App/StatusPages/Settings/init.lua index c87a9d19..441c9cd8 100644 --- a/plugin/src/App/StatusPages/Settings/init.lua +++ b/plugin/src/App/StatusPages/Settings/init.lua @@ -26,7 +26,7 @@ local function invertTbl(tbl) end local invertedLevels = invertTbl(Log.Level) -local confirmationBehaviors = { "Initial", "Always", "Large Changes", "Unlisted PlaceId" } +local confirmationBehaviors = { "Initial", "Always", "Large Changes", "Unlisted PlaceId", "Never" } local function Navbar(props) return Theme.with(function(theme) diff --git a/plugin/src/App/init.lua b/plugin/src/App/init.lua index ecb807f0..a9c20ce9 100644 --- a/plugin/src/App/init.lua +++ b/plugin/src/App/init.lua @@ -582,6 +582,9 @@ function App:startSession() return "Accept" end end + elseif confirmationBehavior == "Never" then + Log.trace("Accepting patch without confirmation because behavior is set to Never") + return "Accept" end -- The datamodel name gets overwritten by Studio, making confirmation of it intrusive