fix: КНОПКА ПРИВЯЗАТЬ ДИСКОРД
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<lobbyUi:LobbyGui xmlns="https://spacestation14.io"
|
||||
<lobbyUi:LobbyGui xmlns="https://spacestation14.io"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:maths="clr-namespace:Robust.Shared.Maths;assembly=Robust.Shared.Maths"
|
||||
xmlns:controls="clr-namespace:Content.Client.UserInterface.Controls"
|
||||
@@ -58,7 +58,7 @@
|
||||
<Control VerticalExpand="True" />
|
||||
|
||||
<RichTextLabel Name="LabelName" Access="Public" HorizontalAlignment="Left"
|
||||
VerticalAlignment="Center" Margin="0 0 0 380" />
|
||||
VerticalAlignment="Center" Margin="0 0 0 420" />
|
||||
|
||||
<!-- Ohio Container -->
|
||||
<PanelContainer HorizontalAlignment="Left" Name="Center" VerticalAlignment="Center">
|
||||
@@ -92,6 +92,12 @@
|
||||
ButtonText="Options"
|
||||
Margin="0 10 0 10" />
|
||||
|
||||
<buttons:OhioLobbyTextButton
|
||||
Name="DiscordButton"
|
||||
Access="Public"
|
||||
ButtonText="Привязать Discord"
|
||||
Margin="0 10 0 10" />
|
||||
|
||||
<buttons:OhioLobbyTextButton
|
||||
Name="QuitButton"
|
||||
Access="Public"
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
using Content.Client._White.Stalin;
|
||||
using Content.Client.UserInterface.Systems.EscapeMenu;
|
||||
using Robust.Client.AutoGenerated;
|
||||
using Robust.Client.Console;
|
||||
@@ -11,6 +12,7 @@ namespace Content.Client.Lobby.UI
|
||||
{
|
||||
[Dependency] private readonly IClientConsoleHost _consoleHost = default!;
|
||||
[Dependency] private readonly IUserInterfaceManager _userInterfaceManager = default!;
|
||||
[Dependency] private readonly StalinManager _stalinManager = default!;
|
||||
|
||||
public LobbyGui()
|
||||
{
|
||||
@@ -20,6 +22,7 @@ namespace Content.Client.Lobby.UI
|
||||
SetAnchorPreset(Background, LayoutPreset.Wide);
|
||||
|
||||
OptionsButton.OnPressed += _ => _userInterfaceManager.GetUIController<OptionsUIController>().ToggleWindow();
|
||||
DiscordButton.OnPressed += _ => _stalinManager.RequestUri();
|
||||
QuitButton.OnPressed += _ => _consoleHost.ExecuteCommand("disconnect");
|
||||
}
|
||||
|
||||
|
||||
@@ -37,7 +37,7 @@ public sealed class StalinManager
|
||||
private readonly Dictionary<string, DateTime> _nextStalinAllowedCheck = new();
|
||||
private string _stalinApiUrl = string.Empty;
|
||||
private string _stalinAuthUrl = string.Empty;
|
||||
private float _minimalDiscordAccountAge = 0f;
|
||||
private float _minimalDiscordAccountAge = 228f;
|
||||
|
||||
public void Initialize()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user