diff --git a/MixItUp.Base/ViewModel/MainControls/CommunityCommandsMainControlViewModel.cs b/MixItUp.Base/ViewModel/MainControls/CommunityCommandsMainControlViewModel.cs
index 94b72eca2..a2d7f34cb 100644
--- a/MixItUp.Base/ViewModel/MainControls/CommunityCommandsMainControlViewModel.cs
+++ b/MixItUp.Base/ViewModel/MainControls/CommunityCommandsMainControlViewModel.cs
@@ -13,6 +13,13 @@ public class CommunityCommandsMainControlViewModel : WindowControlViewModelBase
{
private const int SearchResultsPageSize = 25;
+ ///
+ /// Set to true to disable all backend calls during infrastructure migration.
+ /// Set to false when the new backend is ready.
+ /// In the future, this will be an API call in MixItUpService.cs to enable/disable community commands from the dashboard
+ ///
+ public const bool IsMaintenanceMode = true;
+
public ICommand BackCommand { get; set; }
public bool ShowHome
@@ -383,6 +390,13 @@ await ServiceManager.Get().ReportCommand(new CommunityCommandRep
protected override async Task OnVisibleInternal()
{
+ // Skip all backend calls during maintenance mode
+ if (IsMaintenanceMode)
+ {
+ await base.OnVisibleInternal();
+ return;
+ }
+
if (this.firstLoadCompleted)
{
if (this.ShowHome)
@@ -396,6 +410,12 @@ protected override async Task OnVisibleInternal()
private async Task NavigateToCategories()
{
+ // Skip all backend calls during maintenance mode
+ if (IsMaintenanceMode)
+ {
+ return;
+ }
+
if (this.lastCategoryRefresh.TotalMinutesFromNow() > 1)
{
try
diff --git a/MixItUp.WPF/Controls/MainControls/CommunityCommandsControl.xaml b/MixItUp.WPF/Controls/MainControls/CommunityCommandsControl.xaml
index a2d048605..2be0837e8 100644
--- a/MixItUp.WPF/Controls/MainControls/CommunityCommandsControl.xaml
+++ b/MixItUp.WPF/Controls/MainControls/CommunityCommandsControl.xaml
@@ -20,6 +20,35 @@
+
+
+
+
+
+
+
+
+
+
+ Community Commands is temporarily unavailable while we work on switching and improving our backend infrastructure.
+
+
+
+ This feature will return in a future update. Thank you for your patience!
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/MixItUp.WPF/Controls/MainControls/CommunityCommandsControl.xaml.cs b/MixItUp.WPF/Controls/MainControls/CommunityCommandsControl.xaml.cs
index 39134f5c3..6ee2e51aa 100644
--- a/MixItUp.WPF/Controls/MainControls/CommunityCommandsControl.xaml.cs
+++ b/MixItUp.WPF/Controls/MainControls/CommunityCommandsControl.xaml.cs
@@ -19,6 +19,7 @@ namespace MixItUp.WPF.Controls.MainControls
{
///
/// Interaction logic for CommunityCommandsControl.xaml
+ /// Community Commands is temporarily disabled while backend infrastructure is being migrated.
///
public partial class CommunityCommandsControl : MainControlBase
{
@@ -26,6 +27,13 @@ public partial class CommunityCommandsControl : MainControlBase
public static async Task ProcessDownloadedCommunityCommand(CommunityCommandDetailsViewModel command)
{
+ // Community Commands is in maintenance mode
+ if (CommunityCommandsMainControlViewModel.IsMaintenanceMode)
+ {
+ await DialogHelper.ShowMessage("Community Commands is temporarily unavailable while we work on switching and improving our backend infrastructure. This feature will return in a future update.");
+ return;
+ }
+
try
{
if (bool.Equals(await DialogHelper.ShowCustom(new CommandImporterDialogControl(command.PrimaryCommand)), true))
@@ -59,13 +67,23 @@ public CommunityCommandsControl()
protected override async Task InitializeInternal()
{
this.DataContext = this.viewModel = new CommunityCommandsMainControlViewModel((MainWindowViewModel)this.Window.ViewModel);
- await this.viewModel.OnOpen();
+
+ // Skip loading data during maintenance mode
+ if (!CommunityCommandsMainControlViewModel.IsMaintenanceMode)
+ {
+ await this.viewModel.OnOpen();
+ }
+
await base.InitializeInternal();
}
protected override async Task OnVisibilityChanged()
{
- await this.viewModel.OnVisible();
+ // Skip refreshing data during maintenance mode
+ if (!CommunityCommandsMainControlViewModel.IsMaintenanceMode)
+ {
+ await this.viewModel.OnVisible();
+ }
}
private void CommandsList_PreviewMouseWheel(object sender, MouseWheelEventArgs e)
diff --git a/MixItUp.WPF/Windows/Commands/CommunityCommandUploadWindow.xaml.cs b/MixItUp.WPF/Windows/Commands/CommunityCommandUploadWindow.xaml.cs
index c0627e37c..664d1fe6c 100644
--- a/MixItUp.WPF/Windows/Commands/CommunityCommandUploadWindow.xaml.cs
+++ b/MixItUp.WPF/Windows/Commands/CommunityCommandUploadWindow.xaml.cs
@@ -4,6 +4,7 @@
using MixItUp.Base.Services;
using MixItUp.Base.Util;
using MixItUp.Base.ViewModel.CommunityCommands;
+using MixItUp.Base.ViewModel.MainControls;
using SixLabors.ImageSharp;
using SixLabors.ImageSharp.Processing;
using System;
@@ -50,6 +51,14 @@ protected override async Task OnLoaded()
{
await base.OnLoaded();
+ // Community Commands is in maintenance mode
+ if (CommunityCommandsMainControlViewModel.IsMaintenanceMode)
+ {
+ await DialogHelper.ShowMessage("Community Commands is temporarily unavailable while we work on switching and improving our backend infrastructure. This feature will return in a future update.");
+ this.Close();
+ return;
+ }
+
try
{
if (this.command != null)
@@ -158,6 +167,13 @@ await this.RunAsyncOperation(async () =>
{
try
{
+ // Community Commands is in maintenance mode
+ if (CommunityCommandsMainControlViewModel.IsMaintenanceMode)
+ {
+ await DialogHelper.ShowMessage("Community Commands is temporarily unavailable while we work on switching and improving our backend infrastructure. This feature will return in a future update.");
+ return;
+ }
+
if (this.commandContainsScript)
{
await DialogHelper.ShowMessage(MixItUp.Base.Resources.CommunityCommandsScriptActionsNotSupported);