diff --git a/CHANGELOG.md b/CHANGELOG.md index 13fed6f27..051e37d58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Rojo Changelog +## [7.4.3] - 31 July, 2024 +* Added Sync lock toggle + ## Unreleased Changes * Projects may now manually link `Ref` properties together using `Attributes`. ([#843]) This has two parts: using `id` or `$id` in JSON files or a `Rojo_Target` attribute, an Instance diff --git a/Cargo.lock b/Cargo.lock index 1b2ae1809..3f9ffc602 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1752,7 +1752,7 @@ dependencies = [ [[package]] name = "rojo" -version = "7.4.0" +version = "7.4.3" dependencies = [ "anyhow", "backtrace", diff --git a/Cargo.toml b/Cargo.toml index a35ccd942..d9da31900 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rojo" -version = "7.4.0" +version = "7.4.3" rust-version = "1.70.0" authors = ["Lucien Greathouse "] description = "Enables professional-grade development tools for Roblox developers" diff --git a/plugin/Version.txt b/plugin/Version.txt index b61671799..a263a9c3a 100644 --- a/plugin/Version.txt +++ b/plugin/Version.txt @@ -1 +1 @@ -7.4.0 \ No newline at end of file +7.4.3 \ No newline at end of file diff --git a/plugin/src/App/StatusPages/Settings/init.lua b/plugin/src/App/StatusPages/Settings/init.lua index 70f835084..3a842833c 100644 --- a/plugin/src/App/StatusPages/Settings/init.lua +++ b/plugin/src/App/StatusPages/Settings/init.lua @@ -104,6 +104,14 @@ function SettingsPage:render() layoutOrder = layoutIncrement(), }), + SyncLock = e(Setting, { + id = "syncLock", + name = "Sync Lock", + description = "Toggle sync lock", + transparency = self.props.transparency, + layoutOrder = layoutIncrement(), + }), + SyncReminder = e(Setting, { id = "syncReminder", name = "Sync Reminder", diff --git a/plugin/src/App/init.lua b/plugin/src/App/init.lua index bd21765d0..5ef5e78b3 100644 --- a/plugin/src/App/init.lua +++ b/plugin/src/App/init.lua @@ -299,7 +299,7 @@ function App:getHostAndPort() return if #host > 0 then host else Config.defaultHost, if #port > 0 then port else Config.defaultPort end -function App:isSyncLockAvailable() +function App:isSyncLockAvailable() if #Players:GetPlayers() == 0 then -- Team Create is not active, so no one can be holding the lock return true @@ -408,21 +408,24 @@ function App:useRunningConnectionInfo() end function App:startSession() - local claimedLock, priorOwner = self:claimSyncLock() - if not claimedLock then - local msg = string.format("Could not sync because user '%s' is already syncing", tostring(priorOwner)) + local syncLockEnabled = Settings:get("syncLock") - Log.warn(msg) - self:addNotification(msg, 10) - self:setState({ - appStatus = AppStatus.Error, - errorMessage = msg, - toolbarIcon = Assets.Images.PluginButtonWarning, - }) + if syncLockEnabled then + local claimedLock, priorOwner = self:claimSyncLock() + if not claimedLock then + local msg = string.format("Could not sync because user '%s' is already syncing", tostring(priorOwner)) - return - end + Log.warn(msg) + self:addNotification(msg, 10) + self:setState({ + appStatus = AppStatus.Error, + errorMessage = msg, + toolbarIcon = Assets.Images.PluginButtonWarning, + }) + return + end + end local host, port = self:getHostAndPort() local baseUrl = if string.find(host, "^https?://") diff --git a/plugin/src/Settings.lua b/plugin/src/Settings.lua index 67f13ba21..86ee0231d 100644 --- a/plugin/src/Settings.lua +++ b/plugin/src/Settings.lua @@ -13,6 +13,7 @@ local defaultSettings = { openScriptsExternally = false, twoWaySync = false, showNotifications = true, + syncLock = true, syncReminder = true, autoConnectPlaytestServer = false, confirmationBehavior = "Initial",