initial commit
This commit is contained in:
parent
6715289efe
commit
788c3389af
37645 changed files with 2526849 additions and 80 deletions
|
@ -0,0 +1,8 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 86d9084a265d35f4db65c4e31e0b6769
|
||||
folderAsset: yes
|
||||
DefaultImporter:
|
||||
externalObjects: {}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,200 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
|
||||
using Codice.Client.Common.Threading;
|
||||
using Codice.LogWrapper;
|
||||
using PlasticGui.Configuration.CloudEdition.Welcome;
|
||||
using Unity.PlasticSCM.Editor.UI;
|
||||
using Unity.PlasticSCM.Editor.UI.Progress;
|
||||
using Unity.PlasticSCM.Editor.WebApi;
|
||||
|
||||
namespace Unity.PlasticSCM.Editor.Configuration.CloudEdition.Welcome
|
||||
{
|
||||
internal class AutoLogin : OAuthSignIn.INotify
|
||||
{
|
||||
internal enum State : byte
|
||||
{
|
||||
Off = 0,
|
||||
Started = 1,
|
||||
Running = 2,
|
||||
ResponseInit = 3,
|
||||
ResponseEnd = 6,
|
||||
ResponseSuccess = 7,
|
||||
OrganizationChoosed = 8,
|
||||
InitializingPlastic = 9,
|
||||
ErrorNoToken = 20,
|
||||
ErrorTokenException = 21,
|
||||
ErrorResponseNull = 22,
|
||||
ErrorResponseError = 23,
|
||||
ErrorTokenEmpty = 24,
|
||||
ErrorResponseCancel = 25
|
||||
}
|
||||
|
||||
internal string AccessToken;
|
||||
internal string UserName;
|
||||
|
||||
internal void Run()
|
||||
{
|
||||
mPlasticWindow = GetPlasticWindow();
|
||||
|
||||
if (!string.IsNullOrEmpty(CloudProjectSettings.accessToken))
|
||||
{
|
||||
ExchangeTokensAndJoinOrganization(CloudProjectSettings.accessToken);
|
||||
return;
|
||||
}
|
||||
|
||||
mPlasticWindow.GetWelcomeView().autoLoginState = AutoLogin.State.ErrorNoToken;
|
||||
}
|
||||
|
||||
void OAuthSignIn.INotify.SuccessForConfigure(
|
||||
List<string> organizations,
|
||||
bool canCreateAnOrganization,
|
||||
string userName,
|
||||
string accessToken)
|
||||
{
|
||||
mPlasticWindow.GetWelcomeView().autoLoginState = AutoLogin.State.ResponseSuccess;
|
||||
ChooseOrganization(organizations, canCreateAnOrganization);
|
||||
}
|
||||
|
||||
void OAuthSignIn.INotify.SuccessForSSO(string organization)
|
||||
{
|
||||
}
|
||||
|
||||
void OAuthSignIn.INotify.SuccessForProfile(string email)
|
||||
{
|
||||
}
|
||||
|
||||
void OAuthSignIn.INotify.SuccessForHomeView(string userName)
|
||||
{
|
||||
}
|
||||
|
||||
void OAuthSignIn.INotify.SuccessForCredentials(
|
||||
string email,
|
||||
string accessToken)
|
||||
{
|
||||
}
|
||||
|
||||
void OAuthSignIn.INotify.Cancel(string errorMessage)
|
||||
{
|
||||
mPlasticWindow.GetWelcomeView().autoLoginState = AutoLogin.State.ErrorResponseCancel;
|
||||
}
|
||||
|
||||
void ExchangeTokensAndJoinOrganization(string unityAccessToken)
|
||||
{
|
||||
int ini = Environment.TickCount;
|
||||
|
||||
TokenExchangeResponse response = null;
|
||||
|
||||
IThreadWaiter waiter = ThreadWaiter.GetWaiter(10);
|
||||
waiter.Execute(
|
||||
/*threadOperationDelegate*/ delegate
|
||||
{
|
||||
mPlasticWindow.GetWelcomeView().autoLoginState = AutoLogin.State.ResponseInit;
|
||||
response = WebRestApiClient.PlasticScm.TokenExchange(unityAccessToken);
|
||||
},
|
||||
/*afterOperationDelegate*/ delegate
|
||||
{
|
||||
mLog.DebugFormat(
|
||||
"TokenExchange time {0} ms",
|
||||
Environment.TickCount - ini);
|
||||
|
||||
if (waiter.Exception != null)
|
||||
{
|
||||
mPlasticWindow.GetWelcomeView().autoLoginState = AutoLogin.State.ErrorTokenException;
|
||||
ExceptionsHandler.LogException(
|
||||
"TokenExchangeSetting",
|
||||
waiter.Exception);
|
||||
Debug.LogWarning(waiter.Exception.Message);
|
||||
return;
|
||||
}
|
||||
|
||||
if (response == null)
|
||||
{
|
||||
mPlasticWindow.GetWelcomeView().autoLoginState = AutoLogin.State.ErrorResponseNull;
|
||||
Debug.LogWarning("Auto Login response null");
|
||||
return;
|
||||
}
|
||||
|
||||
if (response.Error != null)
|
||||
{
|
||||
mPlasticWindow.GetWelcomeView().autoLoginState = AutoLogin.State.ErrorResponseError;
|
||||
var warning = string.Format(
|
||||
"Unable to exchange token: {0} [code {1}]",
|
||||
response.Error.Message, response.Error.ErrorCode);
|
||||
mLog.ErrorFormat(warning);
|
||||
Debug.LogWarning(warning);
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(response.AccessToken))
|
||||
{
|
||||
mPlasticWindow.GetWelcomeView().autoLoginState = AutoLogin.State.ErrorTokenEmpty;
|
||||
var warning = string.Format(
|
||||
"Access token is empty for user: {0}",
|
||||
response.User);
|
||||
mLog.InfoFormat(warning);
|
||||
Debug.LogWarning(warning);
|
||||
return;
|
||||
}
|
||||
|
||||
mPlasticWindow.GetWelcomeView().autoLoginState = AutoLogin.State.ResponseEnd;
|
||||
AccessToken = response.AccessToken;
|
||||
UserName = response.User;
|
||||
GetOrganizationList();
|
||||
});
|
||||
}
|
||||
|
||||
void GetOrganizationList()
|
||||
{
|
||||
OAuthSignIn.GetOrganizationsFromAccessToken(
|
||||
PlasticGui.Plastic.WebRestAPI,
|
||||
new ProgressControlsForDialogs(),
|
||||
this,
|
||||
string.Empty,
|
||||
CloudProjectSettings.userName,
|
||||
AccessToken,
|
||||
OAuthSignIn.Mode.Configure
|
||||
);
|
||||
}
|
||||
|
||||
void ChooseOrganization(
|
||||
List<string> organizations,
|
||||
bool canCreateAnOrganization)
|
||||
{
|
||||
mPlasticWindow = GetPlasticWindow();
|
||||
|
||||
CloudEditionWelcomeWindow.ShowWindow(
|
||||
PlasticGui.Plastic.WebRestAPI,
|
||||
mPlasticWindow.CmConnectionForTesting, null, true);
|
||||
|
||||
mCloudEditionWelcomeWindow = CloudEditionWelcomeWindow.GetWelcomeWindow();
|
||||
mCloudEditionWelcomeWindow.FillUserAndToken(UserName, AccessToken);
|
||||
if (organizations.Count == 1)
|
||||
{
|
||||
mCloudEditionWelcomeWindow.JoinOrganizationAndWelcomePage(organizations[0]);
|
||||
return;
|
||||
}
|
||||
mCloudEditionWelcomeWindow.ShowOrganizationPanelFromAutoLogin(organizations, canCreateAnOrganization);
|
||||
}
|
||||
|
||||
static PlasticWindow GetPlasticWindow()
|
||||
{
|
||||
var windows = Resources.FindObjectsOfTypeAll<PlasticWindow>();
|
||||
PlasticWindow plasticWindow = windows.Length > 0 ? windows[0] : null;
|
||||
|
||||
if (plasticWindow == null)
|
||||
plasticWindow = ShowWindow.Plastic();
|
||||
|
||||
return plasticWindow;
|
||||
}
|
||||
|
||||
PlasticWindow mPlasticWindow;
|
||||
CloudEditionWelcomeWindow mCloudEditionWelcomeWindow;
|
||||
|
||||
static readonly ILog mLog = LogManager.GetLogger("TokensExchange");
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 806bdb4f911275c4ca1ee81fde4b4d4f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,343 @@
|
|||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
using PlasticGui;
|
||||
using PlasticGui.WebApi;
|
||||
using Unity.PlasticSCM.Editor.UI.UIElements;
|
||||
using PlasticGui.Configuration.CloudEdition.Welcome;
|
||||
using System.Collections.Generic;
|
||||
using Codice.Client.Common.Servers;
|
||||
using Codice.Client.Common;
|
||||
using Codice.Utils;
|
||||
using Unity.PlasticSCM.Editor.Views.Welcome;
|
||||
|
||||
using Codice.CM.Common;
|
||||
|
||||
namespace Unity.PlasticSCM.Editor.Configuration.CloudEdition.Welcome
|
||||
{
|
||||
internal interface IWelcomeWindowNotify
|
||||
{
|
||||
void SuccessForConfigure(List<string> organizations, bool canCreateAnOrganization);
|
||||
void SuccessForSSO(string organization);
|
||||
void SuccessForCredentials(string userName, string password);
|
||||
void SuccessForProfile(string userName);
|
||||
void SignUpNeeded(string user, string password);
|
||||
void Back();
|
||||
}
|
||||
|
||||
internal class CloudEditionWelcomeWindow :
|
||||
EditorWindow,
|
||||
OAuthSignIn.INotify,
|
||||
IWelcomeWindowNotify
|
||||
{
|
||||
internal static void ShowWindow(
|
||||
IPlasticWebRestApi restApi,
|
||||
CmConnection cmConnection,
|
||||
WelcomeView welcomeView,
|
||||
bool autoLogin = false)
|
||||
{
|
||||
sRestApi = restApi;
|
||||
sCmConnection = cmConnection;
|
||||
sAutoLogin = autoLogin;
|
||||
CloudEditionWelcomeWindow window = GetWindow<CloudEditionWelcomeWindow>();
|
||||
|
||||
window.titleContent = new GUIContent(
|
||||
PlasticLocalization.GetString(PlasticLocalization.Name.SignInToPlasticSCM));
|
||||
window.minSize = window.maxSize = new Vector2(500, 460);
|
||||
|
||||
window.mWelcomeView = welcomeView;
|
||||
|
||||
window.Show();
|
||||
}
|
||||
|
||||
internal static CloudEditionWelcomeWindow GetWelcomeWindow()
|
||||
{
|
||||
return GetWindow<CloudEditionWelcomeWindow>();
|
||||
}
|
||||
|
||||
void OnEnable()
|
||||
{
|
||||
BuildComponents();
|
||||
}
|
||||
|
||||
internal void CancelJoinOrganization()
|
||||
{
|
||||
if (sAutoLogin)
|
||||
{
|
||||
GetWindow<PlasticWindow>().GetWelcomeView().autoLoginState = AutoLogin.State.Started;
|
||||
}
|
||||
}
|
||||
|
||||
internal void JoinOrganizationAndWelcomePage(string organization)
|
||||
{
|
||||
JoinCloudServer(organization,
|
||||
mUserName,
|
||||
mAccessToken);
|
||||
|
||||
GetWelcomePage.Run(sRestApi, organization);
|
||||
}
|
||||
|
||||
internal static void JoinCloudServer(
|
||||
string cloudServer,
|
||||
string username,
|
||||
string accessToken)
|
||||
{
|
||||
SaveCloudServer.ToPlasticGuiConfig(cloudServer);
|
||||
SaveCloudServer.ToPlasticGuiConfigFile(
|
||||
cloudServer, GetPlasticConfigFileToSaveOrganization());
|
||||
SaveCloudServer.ToPlasticGuiConfigFile(
|
||||
cloudServer, GetGluonConfigFileToSaveOrganization());
|
||||
|
||||
KnownServers.ServersFromCloud.InitializeForWindows(
|
||||
PlasticGuiConfig.Get().Configuration.DefaultCloudServer);
|
||||
|
||||
CloudEditionWelcome.WriteToTokensConf(
|
||||
cloudServer, username, accessToken);
|
||||
|
||||
SetupUnityEditionToken.CreateCloudEditionTokenIfNeeded();
|
||||
|
||||
if (sAutoLogin)
|
||||
{
|
||||
ClientConfigData clientConfigData = ConfigurationChecker.GetClientConfigData();
|
||||
clientConfigData.WorkspaceServer = cloudServer;
|
||||
clientConfigData.WorkingMode = SEIDWorkingMode.SSOWorkingMode.ToString();
|
||||
clientConfigData.SecurityConfig = username;
|
||||
ClientConfig.Get().Save(clientConfigData);
|
||||
|
||||
GetWindow<PlasticWindow>().GetWelcomeView().autoLoginState = AutoLogin.State.OrganizationChoosed;
|
||||
}
|
||||
}
|
||||
|
||||
internal void ReplaceRootPanel(VisualElement panel)
|
||||
{
|
||||
rootVisualElement.Clear();
|
||||
rootVisualElement.Add(panel);
|
||||
}
|
||||
|
||||
void OnDestroy()
|
||||
{
|
||||
Dispose();
|
||||
|
||||
if (mWelcomeView != null)
|
||||
mWelcomeView.OnUserClosedConfigurationWindow();
|
||||
}
|
||||
|
||||
void Dispose()
|
||||
{
|
||||
if (mSignInPanel != null)
|
||||
mSignInPanel.Dispose();
|
||||
|
||||
if (mSSOSignUpPanel != null)
|
||||
mSSOSignUpPanel.Dispose();
|
||||
|
||||
if (mOrganizationPanel != null)
|
||||
mOrganizationPanel.Dispose();
|
||||
}
|
||||
|
||||
void OAuthSignIn.INotify.SuccessForConfigure(
|
||||
List<string> organizations,
|
||||
bool canCreateAnOrganization,
|
||||
string userName,
|
||||
string accessToken)
|
||||
{
|
||||
ShowOrganizationPanel(
|
||||
GetWindowTitle(),
|
||||
organizations,
|
||||
canCreateAnOrganization);
|
||||
|
||||
Focus();
|
||||
|
||||
mUserName = userName;
|
||||
mAccessToken = accessToken;
|
||||
}
|
||||
|
||||
internal void ShowOrganizationPanel(
|
||||
string title,
|
||||
List<string> organizations,
|
||||
bool canCreateAnOrganization)
|
||||
{
|
||||
mOrganizationPanel = new OrganizationPanel(
|
||||
this,
|
||||
sRestApi,
|
||||
title,
|
||||
organizations,
|
||||
canCreateAnOrganization);
|
||||
|
||||
ReplaceRootPanel(mOrganizationPanel);
|
||||
}
|
||||
|
||||
void OAuthSignIn.INotify.SuccessForSSO(string organization)
|
||||
{
|
||||
// empty implementation
|
||||
}
|
||||
|
||||
void OAuthSignIn.INotify.SuccessForProfile(string email)
|
||||
{
|
||||
// empty implementation
|
||||
}
|
||||
|
||||
void OAuthSignIn.INotify.SuccessForHomeView(string homeView)
|
||||
{
|
||||
// empty implementation
|
||||
}
|
||||
|
||||
void OAuthSignIn.INotify.SuccessForCredentials(
|
||||
string email,
|
||||
string accessToken)
|
||||
{
|
||||
// empty implementation
|
||||
}
|
||||
|
||||
void OAuthSignIn.INotify.Cancel(string errorMessage)
|
||||
{
|
||||
Focus();
|
||||
}
|
||||
|
||||
void IWelcomeWindowNotify.SuccessForConfigure(
|
||||
List<string> organizations,
|
||||
bool canCreateAnOrganization)
|
||||
{
|
||||
ShowOrganizationPanel(
|
||||
GetWindowTitle(),
|
||||
organizations,
|
||||
canCreateAnOrganization);
|
||||
}
|
||||
|
||||
internal void FillUserAndToken(
|
||||
string userName,
|
||||
string accessToken)
|
||||
{
|
||||
mUserName = userName;
|
||||
mAccessToken = accessToken;
|
||||
}
|
||||
|
||||
internal void ShowOrganizationPanelFromAutoLogin(
|
||||
List<string> organizations,
|
||||
bool canCreateAnOrganization)
|
||||
{
|
||||
ShowOrganizationPanel(
|
||||
GetWindowTitle(),
|
||||
organizations,
|
||||
canCreateAnOrganization);
|
||||
}
|
||||
|
||||
void IWelcomeWindowNotify.SuccessForSSO(string organization)
|
||||
{
|
||||
// empty implementation
|
||||
}
|
||||
|
||||
void IWelcomeWindowNotify.SuccessForCredentials(string userName, string password)
|
||||
{
|
||||
// empty implementation
|
||||
}
|
||||
|
||||
void IWelcomeWindowNotify.SuccessForProfile(string userName)
|
||||
{
|
||||
// empty implementation
|
||||
}
|
||||
|
||||
void IWelcomeWindowNotify.SignUpNeeded(
|
||||
string user,
|
||||
string password)
|
||||
{
|
||||
SwitchToSignUpPage(user, password);
|
||||
}
|
||||
|
||||
void IWelcomeWindowNotify.Back()
|
||||
{
|
||||
rootVisualElement.Clear();
|
||||
rootVisualElement.Add(mTabView);
|
||||
}
|
||||
|
||||
void SwitchToSignUpPage(
|
||||
string user,
|
||||
string password)
|
||||
{
|
||||
mSSOSignUpPanel.SetSignUpData(user, password);
|
||||
|
||||
rootVisualElement.Clear();
|
||||
rootVisualElement.Add(mTabView);
|
||||
mTabView.SwitchContent(mSSOSignUpPanel);
|
||||
}
|
||||
|
||||
string GetWindowTitle()
|
||||
{
|
||||
return mIsOnSignIn ?
|
||||
PlasticLocalization.GetString(PlasticLocalization.Name.SignInToPlasticSCM) :
|
||||
PlasticLocalization.GetString(PlasticLocalization.Name.SignUp);
|
||||
}
|
||||
|
||||
internal static string GetPlasticConfigFileToSaveOrganization()
|
||||
{
|
||||
if (PlatformIdentifier.IsMac())
|
||||
{
|
||||
return "macgui.conf";
|
||||
}
|
||||
|
||||
return "plasticgui.conf";
|
||||
}
|
||||
|
||||
internal static string GetGluonConfigFileToSaveOrganization()
|
||||
{
|
||||
if (PlatformIdentifier.IsMac())
|
||||
{
|
||||
return "gluon.conf";
|
||||
}
|
||||
|
||||
return "gameui.conf";
|
||||
}
|
||||
|
||||
void BuildComponents()
|
||||
{
|
||||
VisualElement root = rootVisualElement;
|
||||
|
||||
root.Clear();
|
||||
mTabView = new TabView();
|
||||
|
||||
mSignInPanel = new SignInPanel(
|
||||
this,
|
||||
sRestApi,
|
||||
sCmConnection);
|
||||
|
||||
mSSOSignUpPanel = new SSOSignUpPanel(
|
||||
this,
|
||||
sRestApi,
|
||||
sCmConnection);
|
||||
|
||||
mTabView.AddTab(
|
||||
PlasticLocalization.GetString(PlasticLocalization.Name.SignIn),
|
||||
mSignInPanel).clicked += () =>
|
||||
{
|
||||
mIsOnSignIn = true;
|
||||
titleContent = new GUIContent(GetWindowTitle());
|
||||
};
|
||||
mTabView.AddTab(
|
||||
PlasticLocalization.GetString(PlasticLocalization.Name.SignUp),
|
||||
mSSOSignUpPanel).clicked += () =>
|
||||
{
|
||||
mIsOnSignIn = false;
|
||||
titleContent = new GUIContent(GetWindowTitle());
|
||||
};
|
||||
|
||||
root.Add(mTabView);
|
||||
if (sAutoLogin)
|
||||
mSignInPanel.SignInWithUnityIdButtonAutoLogin();
|
||||
}
|
||||
|
||||
internal TabView mTabView;
|
||||
|
||||
OrganizationPanel mOrganizationPanel;
|
||||
SignInPanel mSignInPanel;
|
||||
SSOSignUpPanel mSSOSignUpPanel;
|
||||
WelcomeView mWelcomeView;
|
||||
|
||||
string mUserName;
|
||||
string mAccessToken;
|
||||
|
||||
bool mIsOnSignIn = true;
|
||||
static IPlasticWebRestApi sRestApi;
|
||||
static CmConnection sCmConnection;
|
||||
static bool sAutoLogin = false;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 0ad54f9e1bb701142b116d0d1ed98437
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,277 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using UnityEditor.UIElements;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
using PlasticGui;
|
||||
using Unity.PlasticSCM.Editor.UI.UIElements;
|
||||
using PlasticGui.WebApi;
|
||||
using PlasticGui.Configuration.CloudEdition.Welcome;
|
||||
using UnityEngine;
|
||||
|
||||
namespace Unity.PlasticSCM.Editor.Configuration.CloudEdition.Welcome
|
||||
{
|
||||
internal class CreateOrganizationPanel :
|
||||
VisualElement,
|
||||
IsValidOrganization.INotify,
|
||||
GetDatacenters.INotify,
|
||||
CreateOrganization.INotify
|
||||
{
|
||||
internal CreateOrganizationPanel(
|
||||
CloudEditionWelcomeWindow parentWindow,
|
||||
VisualElement parentPanel,
|
||||
IPlasticWebRestApi restApi)
|
||||
{
|
||||
mParentWindow = parentWindow;
|
||||
mParentPanel = parentPanel;
|
||||
mRestApi = restApi;
|
||||
|
||||
InitializeLayoutAndStyles();
|
||||
|
||||
BuildComponents();
|
||||
|
||||
var progressControls = new ProgressControlsForDialogs(new VisualElement[] { mCreateButton, mBackButton });
|
||||
mProgressControls = progressControls;
|
||||
mGettingDatacentersProgressContainer.Add(progressControls);
|
||||
|
||||
GetDatacenters.Run(
|
||||
mRestApi, mProgressControls, this);
|
||||
}
|
||||
|
||||
internal void Dispose()
|
||||
{
|
||||
mCreateButton.clicked -= CreateButton_Clicked;
|
||||
|
||||
mOrganizationNameTextField.UnregisterValueChangedCallback(
|
||||
OnOrganizationNameTextFieldChanged);
|
||||
}
|
||||
|
||||
void OnOrganizationNameTextFieldChanged(ChangeEvent<string> evt)
|
||||
{
|
||||
mOrganizationNameNotification.text = "";
|
||||
}
|
||||
|
||||
void DataCenterClicked(DropdownMenuAction action)
|
||||
{
|
||||
mSelectedDatacenter = action.name;
|
||||
mDatacenter.text = action.name;
|
||||
}
|
||||
|
||||
void DisplayAlert(Label label, string alert, Color color, bool display)
|
||||
{
|
||||
label.text = alert;
|
||||
label.style.color = color;
|
||||
if (alert.Length > 130)
|
||||
label.style.marginBottom = 30;
|
||||
else
|
||||
label.style.marginBottom = 5;
|
||||
|
||||
if (display)
|
||||
label.RemoveFromClassList("hidden");
|
||||
else
|
||||
label.AddToClassList("hidden");
|
||||
}
|
||||
|
||||
void GetDatacenters.INotify.Success(
|
||||
List<string> datacenters, int defaultDatacenter)
|
||||
{
|
||||
mSelectedDatacenter = datacenters.FirstOrDefault();
|
||||
mDatacenter = new ToolbarMenu { text = mSelectedDatacenter };
|
||||
foreach (string datacenter in datacenters)
|
||||
mDatacenter.menu.AppendAction(datacenter, DataCenterClicked, DataCenterActive);
|
||||
VisualElement datacenterContainer = this.Q<VisualElement>("datacenter");
|
||||
datacenterContainer.Add(mDatacenter);
|
||||
}
|
||||
|
||||
void GetDatacenters.INotify.Error(string message)
|
||||
{
|
||||
DisplayAlert(mDataCenterRetryAlert, message, Color.red, true);
|
||||
mDataCenterRetryButton.RemoveFromClassList("hidden");
|
||||
}
|
||||
|
||||
void IsValidOrganization.INotify.OrganizationAvailable(string organizationName)
|
||||
{
|
||||
if (organizationName != mOrganizationNameTextField.text)
|
||||
return;
|
||||
|
||||
DisplayAlert(
|
||||
mOrganizationNameNotification,
|
||||
PlasticLocalization.GetString(PlasticLocalization.Name.Available),
|
||||
Color.green,
|
||||
true);
|
||||
}
|
||||
|
||||
void IsValidOrganization.INotify.OrganizationUnavailable(string organizationName)
|
||||
{
|
||||
if (organizationName != mOrganizationNameTextField.text)
|
||||
return;
|
||||
|
||||
DisplayAlert(
|
||||
mOrganizationNameNotification,
|
||||
PlasticLocalization.GetString(PlasticLocalization.Name.Unavailable),
|
||||
Color.red,
|
||||
true);
|
||||
}
|
||||
|
||||
void IsValidOrganization.INotify.ValidationFailed(string validationResult)
|
||||
{
|
||||
DisplayAlert(
|
||||
mOrganizationNameNotification,
|
||||
validationResult,
|
||||
Color.red,
|
||||
true);
|
||||
}
|
||||
|
||||
void IsValidOrganization.INotify.Error(string organizationName, string message)
|
||||
{
|
||||
if (organizationName != mOrganizationNameTextField.text)
|
||||
return;
|
||||
|
||||
DisplayAlert(
|
||||
mOrganizationNameNotification,
|
||||
message,
|
||||
Color.red,
|
||||
true);
|
||||
}
|
||||
|
||||
void CreateOrganization.INotify.Success(string organizationName)
|
||||
{
|
||||
mParentWindow.ReplaceRootPanel(new CreatedOrganizationPanel(
|
||||
organizationName,
|
||||
mParentWindow));
|
||||
}
|
||||
|
||||
void CreateOrganization.INotify.ValidationFailed(
|
||||
CreateOrganization.ValidationResult validationResult)
|
||||
{
|
||||
if (validationResult.OrganizationError != null)
|
||||
DisplayAlert(
|
||||
mOrganizationNameNotification,
|
||||
validationResult.OrganizationError,
|
||||
Color.red,
|
||||
true);
|
||||
|
||||
if (validationResult.DatacenterError != null)
|
||||
DisplayAlert(
|
||||
mOrganizationNameNotification,
|
||||
validationResult.DatacenterError,
|
||||
Color.red,
|
||||
true);
|
||||
}
|
||||
|
||||
void CreateOrganization.INotify.OrganizationUnavailable()
|
||||
{
|
||||
DisplayAlert(
|
||||
mOrganizationNameNotification,
|
||||
PlasticLocalization.GetString(PlasticLocalization.Name.Unavailable),
|
||||
Color.red,
|
||||
true);
|
||||
}
|
||||
|
||||
void CreateOrganization.INotify.Error(string message)
|
||||
{
|
||||
mProgressControls.ShowError(message);
|
||||
}
|
||||
|
||||
void OrganizationNameTextBox_DelayedTextChanged()
|
||||
{
|
||||
IsValidOrganization.Run(
|
||||
mRestApi, mOrganizationNameTextField.text, this);
|
||||
}
|
||||
|
||||
void GetDatacentersRetryButton_Click()
|
||||
{
|
||||
mDataCenterRetryContainer.AddToClassList("hidden");
|
||||
GetDatacenters.Run(mRestApi, mProgressControls, this);
|
||||
}
|
||||
|
||||
void BackButton_Clicked()
|
||||
{
|
||||
mParentWindow.ReplaceRootPanel(mParentPanel);
|
||||
}
|
||||
|
||||
void CreateButton_Clicked()
|
||||
{
|
||||
CreateOrganization.Run(
|
||||
mRestApi,
|
||||
new CreateOrganization.Data(
|
||||
mOrganizationNameTextField.text,
|
||||
mDatacenter.text,
|
||||
false),
|
||||
mProgressControls,
|
||||
this);
|
||||
}
|
||||
|
||||
DropdownMenuAction.Status DataCenterActive(DropdownMenuAction action)
|
||||
{
|
||||
if (action.name == mSelectedDatacenter)
|
||||
return DropdownMenuAction.Status.Checked;
|
||||
|
||||
return DropdownMenuAction.Status.Normal;
|
||||
}
|
||||
|
||||
void BuildComponents()
|
||||
{
|
||||
mOrganizationNameTextField = this.Q<TextField>("orgName");
|
||||
mOrganizationNameTextField.RegisterValueChangedCallback(
|
||||
x => OrganizationNameTextBox_DelayedTextChanged());
|
||||
mOrganizationNameNotification = this.Q<Label>("orgNameNotification");
|
||||
|
||||
mDataCenterRetryContainer = this.Q<VisualElement>("dataCenterRetryContainer");
|
||||
mDataCenterRetryAlert = this.Q<Label>("dataCenterRetryAlert");
|
||||
mDataCenterRetryButton = this.Q<Button>("dataCenterRetryButton");
|
||||
mDataCenterRetryButton.clicked += GetDatacentersRetryButton_Click;
|
||||
|
||||
mBackButton = this.Q<Button>("back");
|
||||
mBackButton.clicked += BackButton_Clicked;
|
||||
|
||||
mCreateButton = this.Q<Button>("create");
|
||||
mCreateButton.clicked += CreateButton_Clicked;
|
||||
|
||||
mGettingDatacentersProgressContainer = this.Q<VisualElement>("gettingDatacenters");
|
||||
|
||||
mOrganizationNameTextField.RegisterValueChangedCallback(
|
||||
OnOrganizationNameTextFieldChanged);
|
||||
mOrganizationNameTextField.FocusOnceLoaded();
|
||||
|
||||
this.SetControlText<Label>("createLabel",
|
||||
PlasticLocalization.Name.CreateOrganizationTitle);
|
||||
this.SetControlLabel<TextField>("orgName",
|
||||
PlasticLocalization.Name.OrganizationName);
|
||||
this.SetControlText<Label>("datacenterLabel",
|
||||
PlasticLocalization.Name.Datacenter);
|
||||
this.SetControlText<Button>("back",
|
||||
PlasticLocalization.Name.BackButton);
|
||||
this.SetControlText<Button>("create",
|
||||
PlasticLocalization.Name.CreateButton);
|
||||
}
|
||||
|
||||
void InitializeLayoutAndStyles()
|
||||
{
|
||||
this.LoadLayout(typeof(CreateOrganizationPanel).Name);
|
||||
|
||||
this.LoadStyle("SignInSignUp");
|
||||
this.LoadStyle(typeof(CreateOrganizationPanel).Name);
|
||||
}
|
||||
|
||||
CloudEditionWelcomeWindow mParentWindow;
|
||||
VisualElement mParentPanel;
|
||||
|
||||
TextField mOrganizationNameTextField;
|
||||
Label mOrganizationNameNotification;
|
||||
|
||||
VisualElement mDataCenterRetryContainer;
|
||||
Label mDataCenterRetryAlert;
|
||||
Button mDataCenterRetryButton;
|
||||
|
||||
ToolbarMenu mDatacenter;
|
||||
Button mBackButton;
|
||||
Button mCreateButton;
|
||||
VisualElement mGettingDatacentersProgressContainer;
|
||||
string mSelectedDatacenter;
|
||||
|
||||
IProgressControls mProgressControls;
|
||||
readonly IPlasticWebRestApi mRestApi;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 2104516cde04b204884f055f58f980d3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,54 @@
|
|||
using UnityEngine.UIElements;
|
||||
|
||||
using PlasticGui;
|
||||
using Unity.PlasticSCM.Editor.UI.UIElements;
|
||||
|
||||
namespace Unity.PlasticSCM.Editor.Configuration.CloudEdition.Welcome
|
||||
{
|
||||
internal class CreatedOrganizationPanel : VisualElement
|
||||
{
|
||||
internal CreatedOrganizationPanel(string organizationName, CloudEditionWelcomeWindow parentWindow)
|
||||
{
|
||||
mOrganizationName = organizationName;
|
||||
mParentWindow = parentWindow;
|
||||
|
||||
InitializeLayoutAndStyles();
|
||||
|
||||
BuildComponents();
|
||||
}
|
||||
|
||||
void BuildComponents()
|
||||
{
|
||||
this.SetControlText<Label>("createdTitle",
|
||||
PlasticLocalization.Name.CreatedOrganizationTitle);
|
||||
this.SetControlText<Label>("createdExplanation",
|
||||
PlasticLocalization.Name.CreatedOrganizationExplanation, mOrganizationName);
|
||||
|
||||
this.Q<Button>("continue").clicked += ContinueButton_Clicked;
|
||||
this.SetControlText<Button>("continue",
|
||||
PlasticLocalization.Name.ContinueButton);
|
||||
}
|
||||
|
||||
void InitializeLayoutAndStyles()
|
||||
{
|
||||
this.LoadLayout(typeof(CreatedOrganizationPanel).Name);
|
||||
|
||||
this.LoadStyle("SignInSignUp");
|
||||
this.LoadStyle(typeof(CreatedOrganizationPanel).Name);
|
||||
}
|
||||
|
||||
void ContinueButton_Clicked()
|
||||
{
|
||||
mParentWindow.JoinOrganizationAndWelcomePage(mOrganizationName);
|
||||
mParentWindow.Close();
|
||||
}
|
||||
|
||||
internal void Dispose()
|
||||
{
|
||||
this.Q<Button>("continue").clicked -= ContinueButton_Clicked;
|
||||
}
|
||||
|
||||
string mOrganizationName;
|
||||
CloudEditionWelcomeWindow mParentWindow;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 8add2d9bdefea9d4ead4e1c5163c87c3
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,161 @@
|
|||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
using UnityEditor.UIElements;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
using PlasticGui;
|
||||
using Unity.PlasticSCM.Editor.UI.UIElements;
|
||||
using PlasticGui.WebApi;
|
||||
|
||||
namespace Unity.PlasticSCM.Editor.Configuration.CloudEdition.Welcome
|
||||
{
|
||||
internal class OrganizationPanel : VisualElement
|
||||
{
|
||||
internal OrganizationPanel(
|
||||
CloudEditionWelcomeWindow parentWindow,
|
||||
IPlasticWebRestApi restApi,
|
||||
string title,
|
||||
List<string> organizations,
|
||||
bool canCreateAnOrganization)
|
||||
{
|
||||
mParentWindow = parentWindow;
|
||||
mRestApi = restApi;
|
||||
mOrganizations = organizations;
|
||||
|
||||
InitializeLayoutAndStyles();
|
||||
|
||||
BuildComponents(title, canCreateAnOrganization);
|
||||
}
|
||||
|
||||
void BuildComponents(string title, bool canCreateAnOrganization)
|
||||
{
|
||||
mParentWindow.titleContent = new UnityEngine.GUIContent(title);
|
||||
|
||||
this.SetControlText<Label>("confirmationMessage",
|
||||
PlasticLocalization.Name.SignedUpTitle);
|
||||
|
||||
if (mOrganizations.Count == 1)
|
||||
{
|
||||
BuildSingleOrganizationSection(mOrganizations.First());
|
||||
mJoinSingleOrganizationButton = this.Q<Button>("joinSingleOrganizationButton");
|
||||
mJoinSingleOrganizationButton.clicked += JoinOrganizationButton_clicked;
|
||||
}
|
||||
else if (mOrganizations.Count > 1)
|
||||
{
|
||||
BuildMultipleOrganizationsSection(mOrganizations);
|
||||
mJoinMultipleOrganizationsButton = this.Q<Button>("joinMultipleOrganizationsButton");
|
||||
mJoinMultipleOrganizationsButton.clicked += JoinOrganizationButton_clicked;
|
||||
mOrganizationToJoin = mOrganizations.First();
|
||||
}
|
||||
|
||||
if (canCreateAnOrganization)
|
||||
{
|
||||
BuildCreateOrganizationSection(!mOrganizations.Any());
|
||||
|
||||
mCreateOrganizationButton = this.Q<Button>("createOrganizationButton");
|
||||
mCreateOrganizationButton.clicked += CreateOrganizationButton_Clicked;
|
||||
}
|
||||
}
|
||||
|
||||
internal void Dispose()
|
||||
{
|
||||
mParentWindow.CancelJoinOrganization();
|
||||
|
||||
if (mJoinSingleOrganizationButton != null)
|
||||
mJoinSingleOrganizationButton.clicked -= JoinOrganizationButton_clicked;
|
||||
|
||||
if (mJoinMultipleOrganizationsButton != null)
|
||||
mJoinMultipleOrganizationsButton.clicked -= JoinOrganizationButton_clicked;
|
||||
|
||||
if (mCreateOrganizationButton != null)
|
||||
mCreateOrganizationButton.clicked -= CreateOrganizationButton_Clicked;
|
||||
}
|
||||
|
||||
private void JoinOrganizationButton_clicked()
|
||||
{
|
||||
mParentWindow.JoinOrganizationAndWelcomePage(mOrganizationToJoin);
|
||||
|
||||
// TODO: Closing the window for now. Need to connect this event to the main on boarding
|
||||
// workflow.
|
||||
mParentWindow.Close();
|
||||
}
|
||||
|
||||
private void CreateOrganizationButton_Clicked()
|
||||
{
|
||||
mParentWindow.ReplaceRootPanel(new CreateOrganizationPanel(mParentWindow, this, mRestApi));
|
||||
}
|
||||
|
||||
void BuildSingleOrganizationSection(string organizationName)
|
||||
{
|
||||
mOrganizationToJoin = organizationName;
|
||||
|
||||
this.Query<VisualElement>("joinSingleOrganization").First().RemoveFromClassList("display-none");
|
||||
|
||||
this.SetControlText<Label>("joinSingleOrganizationLabel",
|
||||
PlasticLocalization.Name.YouBelongToOrganization, organizationName);
|
||||
|
||||
this.SetControlText<Button>("joinSingleOrganizationButton",
|
||||
PlasticLocalization.Name.JoinButton);
|
||||
}
|
||||
|
||||
void BuildMultipleOrganizationsSection(List<string> organizationNames)
|
||||
{
|
||||
this.Query<VisualElement>("joinMultipleOrganizations").First().RemoveFromClassList("display-none");
|
||||
|
||||
this.SetControlText<Label>("joinMultipleOrganizationsLabel",
|
||||
PlasticLocalization.Name.YouBelongToSeveralOrganizations);
|
||||
|
||||
VisualElement organizationDropdown = this.Query<VisualElement>("organizationDropdown").First();
|
||||
ToolbarMenu toolbarMenu = new ToolbarMenu
|
||||
{
|
||||
text = organizationNames.FirstOrDefault()
|
||||
};
|
||||
foreach (string name in organizationNames)
|
||||
{
|
||||
toolbarMenu.menu.AppendAction(name, x =>
|
||||
{
|
||||
toolbarMenu.text = name;
|
||||
mOrganizationToJoin = name;
|
||||
}, DropdownMenuAction.AlwaysEnabled);
|
||||
organizationDropdown.Add(toolbarMenu);
|
||||
}
|
||||
|
||||
this.SetControlText<Button>("joinMultipleOrganizationsButton",
|
||||
PlasticLocalization.Name.JoinButton);
|
||||
}
|
||||
|
||||
void BuildCreateOrganizationSection(bool firstOrganization)
|
||||
{
|
||||
this.Query<VisualElement>("createOrganization").First().RemoveFromClassList("display-none");
|
||||
|
||||
PlasticLocalization.Name createOrganizationLabelName = firstOrganization ?
|
||||
PlasticLocalization.Name.CreateFirstOrganizationLabel :
|
||||
PlasticLocalization.Name.CreateOtherOrganizationLabel;
|
||||
|
||||
this.SetControlText<Label>("createOrganizationLabel",
|
||||
createOrganizationLabelName);
|
||||
|
||||
this.SetControlText<Button>("createOrganizationButton",
|
||||
PlasticLocalization.Name.CreateButton);
|
||||
}
|
||||
|
||||
void InitializeLayoutAndStyles()
|
||||
{
|
||||
this.LoadLayout(typeof(OrganizationPanel).Name);
|
||||
|
||||
this.LoadStyle("SignInSignUp");
|
||||
this.LoadStyle(typeof(OrganizationPanel).Name);
|
||||
}
|
||||
|
||||
List<string> mOrganizations;
|
||||
|
||||
Button mJoinSingleOrganizationButton = null;
|
||||
Button mJoinMultipleOrganizationsButton = null;
|
||||
Button mCreateOrganizationButton = null;
|
||||
public string mOrganizationToJoin = "";
|
||||
|
||||
readonly CloudEditionWelcomeWindow mParentWindow;
|
||||
readonly IPlasticWebRestApi mRestApi;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 615ff93ab52eb8242a9194d4f711676f
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,276 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
using UnityEditor;
|
||||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
using Codice.Client.Common;
|
||||
using PlasticGui;
|
||||
using PlasticGui.WebApi;
|
||||
using PlasticGui.Configuration.CloudEdition;
|
||||
using PlasticGui.Configuration.CloudEdition.Welcome;
|
||||
using Unity.PlasticSCM.Editor.UI;
|
||||
using Unity.PlasticSCM.Editor.UI.UIElements;
|
||||
using PlasticGui.WebApi.Responses;
|
||||
|
||||
namespace Unity.PlasticSCM.Editor.Configuration.CloudEdition.Welcome
|
||||
{
|
||||
internal class SSOSignUpPanel :
|
||||
VisualElement,
|
||||
SignUp.INotify
|
||||
{
|
||||
internal SSOSignUpPanel(
|
||||
CloudEditionWelcomeWindow parentWindow,
|
||||
IPlasticWebRestApi restApi,
|
||||
CmConnection cmConnection)
|
||||
{
|
||||
mParentWindow = parentWindow;
|
||||
mRestApi = restApi;
|
||||
mCmConnection = cmConnection;
|
||||
|
||||
InitializeLayoutAndStyles();
|
||||
|
||||
BuildComponents();
|
||||
}
|
||||
|
||||
internal void SetSignUpData(
|
||||
string user,
|
||||
string password)
|
||||
{
|
||||
mUserNameTextField.value = user;
|
||||
mPasswordTextField.value = password;
|
||||
|
||||
CleanNotificationLabels();
|
||||
}
|
||||
|
||||
internal void Dispose()
|
||||
{
|
||||
mSignUpButton.clicked -= SignUpButton_Clicked;
|
||||
mTermsOfServiceButton.clicked -= TermsOfServiceButton_Clicked;
|
||||
mPrivacyPolicyButton.clicked -= PrivacyPolicyButton_Clicked;
|
||||
mPrivacyPolicyStatementButton.clicked -= PrivacyPolicyStatementButton_Clicked;
|
||||
|
||||
mUserNameTextField.UnregisterValueChangedCallback(
|
||||
UserNameTextBox_TextChanged);
|
||||
mPasswordTextField.UnregisterValueChangedCallback(
|
||||
PasswordTextBox_TextChanged);
|
||||
mConfirmPasswordTextField.UnregisterValueChangedCallback(
|
||||
ConfirmPasswordTextBox_TextChanged);
|
||||
}
|
||||
|
||||
void UserNameTextBox_TextChanged(ChangeEvent<string> evt)
|
||||
{
|
||||
CleanNotification(mUserNotificationLabel);
|
||||
}
|
||||
|
||||
void PasswordTextBox_TextChanged(ChangeEvent<string> evt)
|
||||
{
|
||||
CleanNotification(mPasswordNotificationLabel);
|
||||
}
|
||||
|
||||
void ConfirmPasswordTextBox_TextChanged(ChangeEvent<string> evt)
|
||||
{
|
||||
CleanNotification(mConfirmPasswordNotificationLabel);
|
||||
}
|
||||
|
||||
void SignUpButton_Clicked()
|
||||
{
|
||||
CleanNotificationLabels();
|
||||
|
||||
SignUp.Run(
|
||||
mRestApi,
|
||||
new SaveCloudEditionCreds(),
|
||||
new SignUp.Data(
|
||||
mUserNameTextField.text,
|
||||
mPasswordTextField.text,
|
||||
mConfirmPasswordTextField.text,
|
||||
false),
|
||||
mProgressControls,
|
||||
this,
|
||||
false);
|
||||
}
|
||||
|
||||
void SignUpWithUnityButton_clicked()
|
||||
{
|
||||
mWaitingSignInPanel = new WaitingSignInPanel(
|
||||
mParentWindow,
|
||||
mParentWindow,
|
||||
mRestApi,
|
||||
mCmConnection);
|
||||
|
||||
mParentWindow.ReplaceRootPanel(mWaitingSignInPanel);
|
||||
mWaitingSignInPanel.OAuthSignInForConfigure(SsoProvider.UNITY_URL_ACTION);
|
||||
}
|
||||
|
||||
void TermsOfServiceButton_Clicked()
|
||||
{
|
||||
Application.OpenURL(SignUp.TERMS_OF_SERVICE_URL);
|
||||
}
|
||||
|
||||
void PrivacyPolicyButton_Clicked()
|
||||
{
|
||||
Application.OpenURL(SignUp.PRIVACY_POLICY_URL);
|
||||
}
|
||||
|
||||
void PrivacyPolicyStatementButton_Clicked()
|
||||
{
|
||||
Application.OpenURL(SignUp.PRIVACY_POLICY_URL);
|
||||
}
|
||||
|
||||
void BuildComponents()
|
||||
{
|
||||
|
||||
mUserNameTextField = this.Q<TextField>("emailField");
|
||||
mUserNameTextField.label = PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.Email);
|
||||
mUserNameTextField.RegisterValueChangedCallback(
|
||||
UserNameTextBox_TextChanged);
|
||||
|
||||
mUserNotificationLabel = this.Q<Label>("emailNotification");
|
||||
|
||||
mPasswordTextField = this.Q<TextField>("passwordField");
|
||||
mPasswordTextField.label = PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.Password);
|
||||
mPasswordTextField.RegisterValueChangedCallback(
|
||||
PasswordTextBox_TextChanged);
|
||||
|
||||
mConfirmPasswordTextField = this.Q<TextField>("confirmPasswordField");
|
||||
mConfirmPasswordTextField.label = PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.ConfirmPassword);
|
||||
mConfirmPasswordTextField.RegisterValueChangedCallback(
|
||||
ConfirmPasswordTextBox_TextChanged);
|
||||
|
||||
mPasswordNotificationLabel = this.Q<Label>("passwordNotificationLabel");
|
||||
mConfirmPasswordNotificationLabel = this.Q<Label>("confirmPasswordNotificationLabel");
|
||||
|
||||
mSignUpButton = this.Q<Button>("signUp");
|
||||
mSignUpButton.text = PlasticLocalization.GetString(PlasticLocalization.Name.SignUp);
|
||||
mSignUpButton.clicked += SignUpButton_Clicked;
|
||||
|
||||
string[] signUpText = PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.SignUpAgreeToShort).Split('{', '}');
|
||||
Label signUpAgreePt1 = this.Q<Label>("signUpAgreePt1");
|
||||
signUpAgreePt1.text = signUpText[0];
|
||||
|
||||
mTermsOfServiceButton = this.Q<Button>("termsOfService");
|
||||
mTermsOfServiceButton.text = PlasticLocalization.GetString(PlasticLocalization.Name.TermsOfService);
|
||||
mTermsOfServiceButton.clicked += TermsOfServiceButton_Clicked;
|
||||
|
||||
Label signUpAgreePt2 = this.Q<Label>("signUpAgreePt2");
|
||||
signUpAgreePt2.text = signUpText[2];
|
||||
|
||||
mPrivacyPolicyButton = this.Q<Button>("privacyPolicy");
|
||||
mPrivacyPolicyButton.text = PlasticLocalization.GetString(PlasticLocalization.Name.PrivacyPolicy);
|
||||
mPrivacyPolicyButton.clicked += PrivacyPolicyButton_Clicked;
|
||||
|
||||
this.SetControlImage("unityIcon", Images.Name.ButtonSsoSignInUnity);
|
||||
|
||||
mSignUpWithUnityButton = this.Q<Button>("unityIDButton");
|
||||
mSignUpWithUnityButton.text = PlasticLocalization.GetString(PlasticLocalization.Name.SignInWithUnityID);
|
||||
mSignUpWithUnityButton.clicked += SignUpWithUnityButton_clicked;
|
||||
|
||||
this.SetControlText<Label>("privacyStatementText",
|
||||
PlasticLocalization.Name.PrivacyStatementText,
|
||||
PlasticLocalization.GetString(PlasticLocalization.Name.PrivacyStatement));
|
||||
|
||||
mPrivacyPolicyStatementButton = this.Q<Button>("privacyStatement");
|
||||
mPrivacyPolicyStatementButton.text = PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.PrivacyStatement);
|
||||
mPrivacyPolicyStatementButton.clicked += PrivacyPolicyStatementButton_Clicked;
|
||||
|
||||
// TODO: add controls to disable and disable control logic
|
||||
mProgressControls = new ProgressControlsForDialogs(new VisualElement[] { mSignUpButton, mSignUpWithUnityButton });
|
||||
mProgressContainer = this.Q<VisualElement>("progressContainer");
|
||||
mProgressContainer.Add((VisualElement)mProgressControls);
|
||||
}
|
||||
|
||||
void InitializeLayoutAndStyles()
|
||||
{
|
||||
AddToClassList("grow");
|
||||
|
||||
this.LoadLayout(typeof(SSOSignUpPanel).Name);
|
||||
|
||||
this.LoadStyle("SignInSignUp");
|
||||
this.LoadStyle(typeof(SSOSignUpPanel).Name);
|
||||
}
|
||||
|
||||
void CleanNotificationLabels()
|
||||
{
|
||||
CleanNotification(mUserNotificationLabel);
|
||||
CleanNotification(mPasswordNotificationLabel);
|
||||
CleanNotification(mConfirmPasswordNotificationLabel);
|
||||
}
|
||||
|
||||
static void ShowNotification(Label label, string text)
|
||||
{
|
||||
label.text = text;
|
||||
label.RemoveFromClassList("hidden");
|
||||
}
|
||||
|
||||
static void CleanNotification(Label label)
|
||||
{
|
||||
label.text = "";
|
||||
label.AddToClassList("hidden");
|
||||
}
|
||||
|
||||
void SignUp.INotify.Success(List<string> organizations, bool canCreateAnOrganization)
|
||||
{
|
||||
mParentWindow.ShowOrganizationPanel(
|
||||
PlasticLocalization.GetString(PlasticLocalization.Name.SignUp),
|
||||
organizations,
|
||||
canCreateAnOrganization);
|
||||
}
|
||||
|
||||
void SignUp.INotify.SuccessForHomeView(string userName)
|
||||
{
|
||||
}
|
||||
|
||||
void SignUp.INotify.ValidationFailed(SignUp.ValidationResult validationResult)
|
||||
{
|
||||
if (validationResult.UserError != null)
|
||||
ShowNotification(mUserNotificationLabel, validationResult.UserError);
|
||||
|
||||
if (validationResult.ClearPasswordError != null)
|
||||
ShowNotification(mPasswordNotificationLabel, validationResult.ClearPasswordError);
|
||||
|
||||
if (validationResult.ClearPasswordConfirmationError != null)
|
||||
ShowNotification(mConfirmPasswordNotificationLabel, validationResult.ClearPasswordConfirmationError);
|
||||
}
|
||||
|
||||
void SignUp.INotify.LoginNeeded(Login.Data loginData, string message)
|
||||
{
|
||||
Debug.Log("LoginNeeded");
|
||||
throw new NotImplementedException();
|
||||
//mWelcomeForm.SwitchToLoginPage(
|
||||
// loginData.User, loginData.ClearPassword, message);
|
||||
}
|
||||
|
||||
void SignUp.INotify.Error(string message)
|
||||
{
|
||||
mProgressControls.ShowError(message);
|
||||
}
|
||||
|
||||
Button mTermsOfServiceButton;
|
||||
Button mPrivacyPolicyButton;
|
||||
Button mPrivacyPolicyStatementButton;
|
||||
TextField mUserNameTextField;
|
||||
TextField mPasswordTextField;
|
||||
TextField mConfirmPasswordTextField;
|
||||
Label mUserNotificationLabel;
|
||||
Label mPasswordNotificationLabel;
|
||||
Label mConfirmPasswordNotificationLabel;
|
||||
Button mSignUpButton;
|
||||
Button mSignUpWithUnityButton;
|
||||
VisualElement mProgressContainer;
|
||||
IProgressControls mProgressControls;
|
||||
WaitingSignInPanel mWaitingSignInPanel;
|
||||
|
||||
readonly CloudEditionWelcomeWindow mParentWindow;
|
||||
readonly IPlasticWebRestApi mRestApi;
|
||||
readonly CmConnection mCmConnection;
|
||||
|
||||
//TODO: remove this once Google sign up functionality is added
|
||||
const bool hideGoogleSignUpButton = true;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 1284741c63bbe7742a2d359492947023
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,130 @@
|
|||
using UnityEngine;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
using Codice.Client.Common;
|
||||
using PlasticGui;
|
||||
using PlasticGui.WebApi.Responses;
|
||||
using PlasticGui.WebApi;
|
||||
using Unity.PlasticSCM.Editor.UI;
|
||||
using Unity.PlasticSCM.Editor.UI.UIElements;
|
||||
using PlasticGui.Configuration.CloudEdition.Welcome;
|
||||
|
||||
namespace Unity.PlasticSCM.Editor.Configuration.CloudEdition.Welcome
|
||||
{
|
||||
internal class SignInPanel : VisualElement
|
||||
{
|
||||
internal SignInPanel(
|
||||
CloudEditionWelcomeWindow parentWindow,
|
||||
IPlasticWebRestApi restApi,
|
||||
CmConnection cmConnection)
|
||||
{
|
||||
mParentWindow = parentWindow;
|
||||
mRestApi = restApi;
|
||||
mCmConnection = cmConnection;
|
||||
|
||||
InitializeLayoutAndStyles();
|
||||
|
||||
BuildComponents();
|
||||
}
|
||||
|
||||
internal void Dispose()
|
||||
{
|
||||
mSignInWithUnityIdButton.clicked -= SignInWithUnityIdButton_Clicked;
|
||||
mSignInWithEmailButton.clicked -= SignInWithEmailButton_Clicked;
|
||||
mPrivacyPolicyStatementButton.clicked -= PrivacyPolicyStatementButton_Clicked;
|
||||
|
||||
if (mSignInWithEmailPanel != null)
|
||||
mSignInWithEmailPanel.Dispose();
|
||||
|
||||
if (mWaitingSignInPanel != null)
|
||||
mWaitingSignInPanel.Dispose();
|
||||
}
|
||||
|
||||
void SignInWithEmailButton_Clicked()
|
||||
{
|
||||
mSignInWithEmailPanel = new SignInWithEmailPanel(
|
||||
mParentWindow,
|
||||
mParentWindow,
|
||||
mRestApi);
|
||||
|
||||
mParentWindow.ReplaceRootPanel(mSignInWithEmailPanel);
|
||||
}
|
||||
|
||||
internal void SignInWithUnityIdButton_Clicked()
|
||||
{
|
||||
mWaitingSignInPanel = new WaitingSignInPanel(
|
||||
mParentWindow,
|
||||
mParentWindow,
|
||||
mRestApi,
|
||||
mCmConnection);
|
||||
|
||||
mParentWindow.ReplaceRootPanel(mWaitingSignInPanel);
|
||||
mWaitingSignInPanel.OAuthSignInForConfigure(SsoProvider.UNITY_URL_ACTION);
|
||||
}
|
||||
internal void SignInWithUnityIdButtonAutoLogin()
|
||||
{
|
||||
mWaitingSignInPanel = new WaitingSignInPanel(
|
||||
mParentWindow,
|
||||
mParentWindow,
|
||||
mRestApi,
|
||||
mCmConnection);
|
||||
|
||||
mParentWindow.ReplaceRootPanel(mWaitingSignInPanel);
|
||||
}
|
||||
|
||||
void PrivacyPolicyStatementButton_Clicked()
|
||||
{
|
||||
// TODO: update when dll is avaiable PlasticGui.Configuration.CloudEdition.Welcome
|
||||
// SignUp.PRIVACY_POLICY_URL
|
||||
Application.OpenURL(SignUp.PRIVACY_POLICY_URL);
|
||||
}
|
||||
|
||||
void BuildComponents()
|
||||
{
|
||||
this.SetControlImage("iconUnity",
|
||||
Images.Name.ButtonSsoSignInUnity);
|
||||
|
||||
mSignInWithUnityIdButton = this.Query<Button>("unityIDButton").First();
|
||||
mSignInWithUnityIdButton.text = PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.SignInWithUnityID);
|
||||
mSignInWithUnityIdButton.clicked += SignInWithUnityIdButton_Clicked;
|
||||
|
||||
|
||||
this.SetControlImage("iconEmail",
|
||||
Images.Name.ButtonSsoSignInEmail);
|
||||
|
||||
mSignInWithEmailButton = this.Query<Button>("emailButton").First();
|
||||
mSignInWithEmailButton.text = PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.SignInWithEmail);
|
||||
mSignInWithEmailButton.clicked += SignInWithEmailButton_Clicked;
|
||||
|
||||
this.SetControlText<Label>("privacyStatementText",
|
||||
PlasticLocalization.Name.PrivacyStatementText,
|
||||
PlasticLocalization.GetString(PlasticLocalization.Name.PrivacyStatement));
|
||||
|
||||
mPrivacyPolicyStatementButton = this.Query<Button>("privacyStatement").First();
|
||||
mPrivacyPolicyStatementButton.text = PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.PrivacyStatement);
|
||||
mPrivacyPolicyStatementButton.clicked += PrivacyPolicyStatementButton_Clicked;
|
||||
}
|
||||
|
||||
void InitializeLayoutAndStyles()
|
||||
{
|
||||
AddToClassList("grow");
|
||||
this.LoadLayout(typeof(SignInPanel).Name);
|
||||
|
||||
this.LoadStyle("SignInSignUp");
|
||||
this.LoadStyle(typeof(SignInPanel).Name);
|
||||
}
|
||||
|
||||
SignInWithEmailPanel mSignInWithEmailPanel;
|
||||
WaitingSignInPanel mWaitingSignInPanel;
|
||||
Button mSignInWithUnityIdButton;
|
||||
Button mSignInWithEmailButton;
|
||||
Button mPrivacyPolicyStatementButton;
|
||||
|
||||
readonly CloudEditionWelcomeWindow mParentWindow;
|
||||
readonly IPlasticWebRestApi mRestApi;
|
||||
readonly CmConnection mCmConnection;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: bba806fdb20eb5a4da6cc856323d6273
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,175 @@
|
|||
using System.Collections.Generic;
|
||||
using Unity.PlasticSCM.Editor.UI.UIElements;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
using PlasticGui;
|
||||
using PlasticGui.Configuration.CloudEdition.Welcome;
|
||||
using PlasticGui.Configuration.CloudEdition;
|
||||
using PlasticGui.WebApi;
|
||||
|
||||
namespace Unity.PlasticSCM.Editor.Configuration.CloudEdition.Welcome
|
||||
{
|
||||
internal class SignInWithEmailPanel :
|
||||
VisualElement,
|
||||
Login.INotify
|
||||
{
|
||||
internal SignInWithEmailPanel(
|
||||
CloudEditionWelcomeWindow parentWindow,
|
||||
IWelcomeWindowNotify notify,
|
||||
IPlasticWebRestApi restApi)
|
||||
{
|
||||
mParentWindow = parentWindow;
|
||||
mNotify = notify;
|
||||
mRestApi = restApi;
|
||||
|
||||
InitializeLayoutAndStyles();
|
||||
|
||||
BuildComponents();
|
||||
}
|
||||
|
||||
internal void Dispose()
|
||||
{
|
||||
mSignInButton.clicked -= SignInButton_Clicked;
|
||||
mBackButton.clicked -= BackButton_Clicked;
|
||||
}
|
||||
|
||||
void SignInButton_Clicked()
|
||||
{
|
||||
CleanNotificationLabels();
|
||||
|
||||
Login.Run(
|
||||
mRestApi,
|
||||
new SaveCloudEditionCreds(),
|
||||
mEmailField.text,
|
||||
mPasswordField.text,
|
||||
string.Empty,
|
||||
string.Empty,
|
||||
Login.Mode.Configure,
|
||||
mProgressControls,
|
||||
this);
|
||||
}
|
||||
|
||||
void BackButton_Clicked()
|
||||
{
|
||||
mNotify.Back();
|
||||
}
|
||||
|
||||
void Login.INotify.SuccessForConfigure(
|
||||
List<string> organizations,
|
||||
bool canCreateAnOrganization,
|
||||
string userName,
|
||||
string password)
|
||||
{
|
||||
mNotify.SuccessForConfigure(
|
||||
organizations,
|
||||
canCreateAnOrganization);
|
||||
}
|
||||
|
||||
void Login.INotify.SuccessForSSO(
|
||||
string organization)
|
||||
{
|
||||
mNotify.SuccessForSSO(organization);
|
||||
}
|
||||
|
||||
void Login.INotify.SuccessForProfile(
|
||||
string userName)
|
||||
{
|
||||
mNotify.SuccessForProfile(userName);
|
||||
}
|
||||
|
||||
void Login.INotify.SuccessForCredentials(string userName, string password)
|
||||
{
|
||||
mNotify.SuccessForCredentials(userName, password);
|
||||
}
|
||||
|
||||
void Login.INotify.SuccessForHomeView(string userName)
|
||||
{
|
||||
}
|
||||
|
||||
void Login.INotify.ValidationFailed(
|
||||
Login.ValidationResult validationResult)
|
||||
{
|
||||
if (validationResult.UserError != null)
|
||||
{
|
||||
mEmailNotificationLabel.text = validationResult.UserError;
|
||||
}
|
||||
|
||||
if (validationResult.PasswordError != null)
|
||||
{
|
||||
mPasswordNotificationLabel.text = validationResult.PasswordError;
|
||||
}
|
||||
}
|
||||
|
||||
void Login.INotify.SignUpNeeded(
|
||||
Login.Data loginData)
|
||||
{
|
||||
mNotify.SignUpNeeded(loginData.User, loginData.ClearPassword);
|
||||
}
|
||||
|
||||
void Login.INotify.Error(
|
||||
string message)
|
||||
{
|
||||
mProgressControls.ShowError(message);
|
||||
}
|
||||
|
||||
void CleanNotificationLabels()
|
||||
{
|
||||
mEmailNotificationLabel.text = string.Empty;
|
||||
mPasswordNotificationLabel.text = string.Empty;
|
||||
}
|
||||
|
||||
void BuildComponents()
|
||||
{
|
||||
mEmailField = this.Q<TextField>("email");
|
||||
mPasswordField = this.Q<TextField>("password");
|
||||
mEmailNotificationLabel = this.Q<Label>("emailNotification");
|
||||
mPasswordNotificationLabel = this.Q<Label>("passwordNotification");
|
||||
mSignInButton = this.Q<Button>("signIn");
|
||||
mBackButton = this.Q<Button>("back");
|
||||
mProgressContainer = this.Q<VisualElement>("progressContainer");
|
||||
|
||||
mSignInButton.clicked += SignInButton_Clicked;
|
||||
mBackButton.clicked += BackButton_Clicked;
|
||||
mEmailField.FocusOnceLoaded();
|
||||
|
||||
mProgressControls = new ProgressControlsForDialogs(new VisualElement[] { mSignInButton });
|
||||
mProgressContainer.Add((VisualElement)mProgressControls);
|
||||
|
||||
this.SetControlText<Label>("signInLabel",
|
||||
PlasticLocalization.Name.SignInWithEmail);
|
||||
this.SetControlLabel<TextField>("email",
|
||||
PlasticLocalization.Name.Email);
|
||||
this.SetControlLabel<TextField>("password",
|
||||
PlasticLocalization.Name.Password);
|
||||
this.SetControlText<Button>("signIn",
|
||||
PlasticLocalization.Name.SignIn);
|
||||
this.SetControlText<Button>("back",
|
||||
PlasticLocalization.Name.BackButton);
|
||||
}
|
||||
|
||||
void InitializeLayoutAndStyles()
|
||||
{
|
||||
this.LoadLayout(typeof(SignInWithEmailPanel).Name);
|
||||
|
||||
this.LoadStyle("SignInSignUp");
|
||||
this.LoadStyle(typeof(SignInWithEmailPanel).Name);
|
||||
}
|
||||
|
||||
TextField mEmailField;
|
||||
TextField mPasswordField;
|
||||
|
||||
Label mEmailNotificationLabel;
|
||||
Label mPasswordNotificationLabel;
|
||||
|
||||
Button mSignInButton;
|
||||
Button mBackButton;
|
||||
|
||||
VisualElement mProgressContainer;
|
||||
|
||||
IProgressControls mProgressControls;
|
||||
|
||||
readonly CloudEditionWelcomeWindow mParentWindow;
|
||||
readonly IWelcomeWindowNotify mNotify;
|
||||
readonly IPlasticWebRestApi mRestApi;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 85f4628ae66f0eb439e59db66adbc696
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
|
@ -0,0 +1,104 @@
|
|||
using Codice.Client.Common;
|
||||
|
||||
using PlasticGui;
|
||||
using PlasticGui.Configuration.CloudEdition.Welcome;
|
||||
using PlasticGui.WebApi;
|
||||
using Unity.PlasticSCM.Editor.UI.UIElements;
|
||||
using UnityEngine.UIElements;
|
||||
|
||||
namespace Unity.PlasticSCM.Editor.Configuration.CloudEdition.Welcome
|
||||
{
|
||||
internal class WaitingSignInPanel : VisualElement
|
||||
{
|
||||
internal WaitingSignInPanel(
|
||||
IWelcomeWindowNotify parentNotify,
|
||||
OAuthSignIn.INotify notify,
|
||||
IPlasticWebRestApi restApi,
|
||||
CmConnection cmConnection)
|
||||
{
|
||||
mParentNotify = parentNotify;
|
||||
|
||||
mNotify = notify;
|
||||
mRestApi = restApi;
|
||||
mCmConnection = cmConnection;
|
||||
|
||||
InitializeLayoutAndStyles();
|
||||
|
||||
BuildComponents();
|
||||
}
|
||||
|
||||
internal void OAuthSignInForConfigure(string ssoProviderName)
|
||||
{
|
||||
mSignIn = new OAuthSignIn();
|
||||
|
||||
mSignIn.ForConfigure(
|
||||
mRestApi,
|
||||
ssoProviderName,
|
||||
mProgressControls,
|
||||
mNotify,
|
||||
mCmConnection);
|
||||
|
||||
ShowWaitingSpinner();
|
||||
}
|
||||
|
||||
internal void Dispose()
|
||||
{
|
||||
mCancelButton.clicked -= CancelButton_Clicked;
|
||||
}
|
||||
|
||||
void CancelButton_Clicked()
|
||||
{
|
||||
mSignIn.Cancel();
|
||||
mParentNotify.Back();
|
||||
}
|
||||
|
||||
void BuildComponents()
|
||||
{
|
||||
this.SetControlText<Label>("signInToPlasticSCM",
|
||||
PlasticLocalization.Name.SignInToPlasticSCM);
|
||||
|
||||
this.SetControlText<Label>("completeSignInOnBrowser",
|
||||
PlasticLocalization.Name.CompleteSignInOnBrowser);
|
||||
|
||||
mProgressContainer = this.Q<VisualElement>("progressContainer");
|
||||
|
||||
mProgressControls = new UI.Progress.ProgressControlsForDialogs();
|
||||
|
||||
mCancelButton = this.Query<Button>("cancelButton").First();
|
||||
mCancelButton.text = PlasticLocalization.GetString(
|
||||
PlasticLocalization.Name.CancelButton);
|
||||
mCancelButton.clicked += CancelButton_Clicked;
|
||||
}
|
||||
|
||||
void InitializeLayoutAndStyles()
|
||||
{
|
||||
this.LoadLayout(typeof(WaitingSignInPanel).Name);
|
||||
|
||||
this.LoadStyle("SignInSignUp");
|
||||
this.LoadStyle(typeof(WaitingSignInPanel).Name);
|
||||
}
|
||||
|
||||
void ShowWaitingSpinner()
|
||||
{
|
||||
var spinner = new LoadingSpinner();
|
||||
mProgressContainer.Add(spinner);
|
||||
spinner.Start();
|
||||
|
||||
var checkinMessageLabel = new Label(mProgressControls.ProgressData.ProgressMessage);
|
||||
checkinMessageLabel.style.paddingLeft = 10;
|
||||
mProgressContainer.Add(checkinMessageLabel);
|
||||
}
|
||||
|
||||
Button mCancelButton;
|
||||
VisualElement mProgressContainer;
|
||||
|
||||
OAuthSignIn mSignIn;
|
||||
|
||||
UI.Progress.ProgressControlsForDialogs mProgressControls;
|
||||
|
||||
readonly IPlasticWebRestApi mRestApi;
|
||||
readonly CmConnection mCmConnection;
|
||||
readonly OAuthSignIn.INotify mNotify;
|
||||
readonly IWelcomeWindowNotify mParentNotify;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
fileFormatVersion: 2
|
||||
guid: 077387e98bf29fb4a97bccfb592cfaf7
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Loading…
Add table
Add a link
Reference in a new issue