Skip to content
This repository was archived by the owner on Dec 5, 2024. It is now read-only.

Commit cc337c3

Browse files
Adding dialog messages for lock opreations from the asset explorer
1 parent 8b633ce commit cc337c3

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

src/GitHub.Api/Localization.Designer.cs

Lines changed: 18 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/GitHub.Api/Localization.resx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,4 +345,10 @@
345345
<data name="Window_RepoUrlTooltip" xml:space="preserve">
346346
<value>Url of the {0} remote</value>
347347
</data>
348+
<data name="ReleaseLockActionTitle" xml:space="preserve">
349+
<value>Release Lock</value>
350+
</data>
351+
<data name="RequestLockActionTitle" xml:space="preserve">
352+
<value>Request Lock</value>
353+
</data>
348354
</root>

src/UnityExtension/Assets/Editor/GitHub.Unity/UI/ProjectWindowInterface.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,12 @@ private static void ContextMenu_Lock()
108108
{
109109
EntryPoint.ApplicationManager.TaskManager.Run(EntryPoint.ApplicationManager.UsageTracker.IncrementUnityProjectViewContextLfsLock);
110110
}
111+
else
112+
{
113+
EditorUtility.DisplayDialog(Localization.RequestLockActionTitle,
114+
ex.Message,
115+
Localization.Ok);
116+
}
111117

112118
isBusy = false;
113119
Selection.activeGameObject = null;
@@ -154,6 +160,13 @@ private static void ContextMenu_Unlock()
154160
{
155161
EntryPoint.ApplicationManager.TaskManager.Run(EntryPoint.ApplicationManager.UsageTracker.IncrementUnityProjectViewContextLfsUnlock);
156162
}
163+
else
164+
{
165+
EditorUtility.DisplayDialog(Localization.ReleaseLockActionTitle,
166+
ex.Message,
167+
Localization.Ok);
168+
}
169+
157170
isBusy = false;
158171
Selection.activeGameObject = null;
159172
EditorApplication.RepaintProjectWindow();

0 commit comments

Comments
 (0)