summaryrefslogtreecommitdiff
path: root/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryRevisionLine.cs
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-08-20 23:40:50 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-08-20 23:40:50 -0400
commit3af4c218c0e70167db23a6303d2af30aff37d2fe (patch)
tree927f29edcf54ab562f40f3d1c6cb69287c7f5980 /Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryRevisionLine.cs
parentb6daed0af784f4e9bc13329dd87c671b06ee1c65 (diff)
downloadProject-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.tar.gz
Project-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.tar.bz2
Project-Sandbox-3af4c218c0e70167db23a6303d2af30aff37d2fe.zip
Removed a bunch of stuff; Changes
Diffstat (limited to 'Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryRevisionLine.cs')
-rw-r--r--Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryRevisionLine.cs94
1 files changed, 0 insertions, 94 deletions
diff --git a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryRevisionLine.cs b/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryRevisionLine.cs
deleted file mode 100644
index 2b8fe65..0000000
--- a/Library/PackageCache/com.unity.collab-proxy@1.2.16/Editor/Collab/Views/CollabHistoryRevisionLine.cs
+++ /dev/null
@@ -1,94 +0,0 @@
-using System;
-using UnityEditor;
-using UnityEditor.Collaboration;
-using UnityEngine;
-
-#if UNITY_2019_1_OR_NEWER
-using UnityEngine.UIElements;
-#else
-using UnityEngine.Experimental.UIElements;
-#endif
-
-namespace UnityEditor.Collaboration
-{
- internal class CollabHistoryRevisionLine : VisualElement
- {
- public CollabHistoryRevisionLine(int number)
- {
- AddNumber(number);
- AddLine("topLine");
- AddLine("bottomLine");
- AddIndicator();
- }
-
- public CollabHistoryRevisionLine(DateTime date, bool isFullDateObtained)
- {
- AddLine(isFullDateObtained ? "obtainedDateLine" : "absentDateLine");
- AddHeader(GetFormattedHeader(date));
- AddToClassList("revisionLineHeader");
- }
-
- private void AddHeader(string content)
- {
- Add(new Label
- {
- text = content
- });
- }
-
- private void AddIndicator()
- {
- Add(new VisualElement
- {
- name = "RevisionIndicator"
- });
- }
-
- private void AddLine(string className = null)
- {
- var line = new VisualElement
- {
- name = "RevisionLine"
- };
- if (!String.IsNullOrEmpty(className))
- {
- line.AddToClassList(className);
- }
- Add(line);
- }
-
- private void AddNumber(int number)
- {
- Add(new Label
- {
- text = number.ToString(),
- name = "RevisionIndex"
- });
- }
-
- private string GetFormattedHeader(DateTime date)
- {
- string result = "Commits on " + date.ToString("MMM d");
- switch (date.Day)
- {
- case 1:
- case 21:
- case 31:
- result += "st";
- break;
- case 2:
- case 22:
- result += "nd";
- break;
- case 3:
- case 23:
- result += "rd";
- break;
- default:
- result += "th";
- break;
- }
- return result;
- }
- }
-}