in Editor/Window/Components/ProfileTable.cs [112:182]
private VisualElement CreateTableMember(bool _withRadioButton, UserProfile _fullProfile)
{
VisualElement _tableMember = new VisualElement();
_tableMember.AddToClassList("table__labels__member");
VisualElement _buttonContainer = new VisualElement();
_buttonContainer.AddToClassList("table__button__container");
if (showRadioButtons)
{
RadioButton _selectButton = new RadioButton();
if (ProfileIsSelected(_fullProfile))
{
_selectButton.value = true;
}
_selectButton.name = _fullProfile.Name;
_selectButton.RegisterCallback<ClickEvent>(_ => _stateManager.SelectedRadioButton = _selectButton.name);
_buttonContainer.Add(_selectButton);
}
_tableMember.Add(_buttonContainer);
VisualElement _nameContainer = new VisualElement();
_nameContainer.AddToClassList("table__labels__container");
Label _nameLabel;
if (ProfileIsSelected(_fullProfile))
{
_nameLabel = new Label(_fullProfile.Name + " [ selected ]");
}
else
{
_nameLabel = new Label(_fullProfile.Name);
}
_nameLabel.AddToClassList("table__labels__text");
_nameContainer.Add(_nameLabel);
_tableMember.Add(_nameContainer);
VisualElement _regionContainer = new VisualElement();
_regionContainer.AddToClassList("table__labels__container");
Label _regionLabel = new Label(_fullProfile.Region);
_regionLabel.AddToClassList("table__labels__text");
_regionContainer.Add(_regionLabel);
_tableMember.Add(_regionContainer);
VisualElement _bucketContainer = new VisualElement();
_bucketContainer.AddToClassList("table__labels__container__long");
Label _bucketLabel = new Label(_fullProfile.BucketName != null ? _fullProfile.BucketName : "-");
_bucketLabel.AddToClassList("table__labels__text");
_bucketContainer.Add(_bucketLabel);
_tableMember.Add(_bucketContainer);
VisualElement _statusContainer = new VisualElement();
_statusContainer.AddToClassList("table__labels__container");
StatusIndicator _statusIndicator = new StatusIndicator();
_statusIndicator.AddToClassList("status-indicator--small");
if (_stateManager.IsBootstrapped(_fullProfile))
{
_statusIndicator.Set(State.Success, _textProvider.Get(Strings.BootstrapStatusActive));
}
else
{
_statusIndicator.Set(State.Inactive, _textProvider.Get(Strings.BootstrapStatusInactive));
}
_statusContainer.Add(_statusIndicator);
_tableMember.Add(_statusContainer);
return _tableMember;
}