mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-25 22:17:51 +01:00
Merge pull request #350 from Cyberboss/CPMinorInitImprovement
Speeds up ControlPanel loading some
This commit is contained in:
@@ -47,7 +47,6 @@ namespace TGControlPanel
|
||||
InitRepoPage();
|
||||
InitBYONDPage();
|
||||
InitServerPage();
|
||||
InitStaticPage();
|
||||
UpdateSelectedPanel();
|
||||
InstancesInUse.Add(I.InstanceName, this);
|
||||
}
|
||||
@@ -97,6 +96,9 @@ namespace TGControlPanel
|
||||
case 3: //chat
|
||||
LoadChatPage();
|
||||
break;
|
||||
case 4: //static
|
||||
InitStaticPage();
|
||||
break;
|
||||
}
|
||||
Properties.Settings.Default.LastPageIndex = Panels.SelectedIndex;
|
||||
}
|
||||
|
||||
@@ -12,6 +12,10 @@ namespace TGControlPanel
|
||||
IDictionary<int, string> IndexesToPaths = new Dictionary<int, string>();
|
||||
IList<string> EnumeratedPaths = new List<string>() { "" };
|
||||
bool enumerating = false;
|
||||
/// <summary>
|
||||
/// Whether or not the static page has been initialized yet
|
||||
/// </summary>
|
||||
bool initializedStaticPage = false;
|
||||
|
||||
enum EnumResult
|
||||
{
|
||||
@@ -23,9 +27,12 @@ namespace TGControlPanel
|
||||
|
||||
void InitStaticPage()
|
||||
{
|
||||
if (initializedStaticPage)
|
||||
return;
|
||||
if(!Interface.ConnectToInstance().HasFlag(ConnectivityLevel.Administrator))
|
||||
RecreateStaticButton.Visible = false;
|
||||
BuildFileList();
|
||||
initializedStaticPage = true;
|
||||
}
|
||||
|
||||
void BuildFileList()
|
||||
|
||||
Reference in New Issue
Block a user