diff --git a/CHANGELOG.md b/CHANGELOG.md index 55abc390..85abb2a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,9 +9,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - Option to lock/unlock namespace is now available on the settings page (#650) +- Settings page now warns if Embedded Git is not the configured source control extension (#857) +- Settings page now has option to switch namespace (#856) ### Fixed - When cloning a repo with Configure, that repo's embedded-git-config file will overwrite previous settings (#819) +- Settings page no longer removes remote when saving after cloning (#858) ## [2.13.1] - 2025-09-16 diff --git a/csp/gitprojectsettings.csp b/csp/gitprojectsettings.csp index 3391baae..bd638e33 100644 --- a/csp/gitprojectsettings.csp +++ b/csp/gitprojectsettings.csp @@ -210,6 +210,14 @@ body { }
+ +
+ × + Embedded Git is not the configured source control extension for this namespace. To change, modify the + + Source Control Settings. +
+
× @@ -221,12 +229,30 @@ body {

-
+

Git Project Settings

Package version: #(version)#

-
+
+ +
@@ -434,7 +460,7 @@ body {
-
+
@@ -791,6 +817,11 @@ function clone() { return; } disableActionButtons(); + var formGroupRemoteRepo = document.getElementById("formGroupRemoteRepo"); + var namespaceSettings = document.getElementById("namespaceSettings"); + if (formGroupRemoteRepo && settingsForm) { + namespaceSettings.removeChild(formGroupRemoteRepo); + } var ws = getSocket("method=clone&remote=" + encodeURIComponent(remote)); ws.onmessage = showOutput('initOutput'); } @@ -823,13 +854,21 @@ function validateForm() { var confirmText = ""; var lockNamespaceInitValue = #(''##class(SourceControl.Git.Utils).Locked())#; var cbLockNamespace = document.getElementById("lockNamespace"); - if (!cbLockNamespace) return true; - if (cbLockNamespace.checked && (lockNamespaceInitValue !== 1)) { - confirmText = "Are you sure? This will lock any source-controlled items from being edited in this namespace."; - } else if (!cbLockNamespace.checked && (lockNamespaceInitValue == 1)) { - confirmText = "Are you sure? This will allow edits of source-controlled items in this namespace."; + if (cbLockNamespace) { + if (cbLockNamespace.checked && (lockNamespaceInitValue !== 1)) { + confirmText = "\nThis will lock any source-controlled items from being edited in this namespace."; + } else if (!cbLockNamespace.checked && (lockNamespaceInitValue == 1)) { + confirmText = "\nThis will allow edits of source-controlled items in this namespace."; + } + } + var remoteInitValue = "#(##class(SourceControl.Git.Utils).GetRedactedRemote())#"; + var inputRemote = document.getElementById("remoteRepo"); + if (inputRemote) { + if ((inputRemote.value == "") && (remoteInitValue !== "")) { + confirmText += "\nThis will remove the origin remote from the repository." + } } - return confirmText ? confirm(confirmText) : true; + return confirmText ? confirm("Are you sure?" + confirmText) : true; } $(function () {