diff --git a/BodyshopUploader/Properties/Resources.Designer.cs b/BodyshopUploader/Properties/Resources.Designer.cs
index af5437c..dc5d3dc 100644
--- a/BodyshopUploader/Properties/Resources.Designer.cs
+++ b/BodyshopUploader/Properties/Resources.Designer.cs
@@ -60,6 +60,15 @@ namespace BodyshopPartner.Properties {
}
}
+ ///
+ /// Looks up a localized string similar to Log out.
+ ///
+ public static string Actions_Logout {
+ get {
+ return ResourceManager.GetString("Actions_Logout", resourceCulture);
+ }
+ }
+
///
/// Looks up a localized string similar to An issue has occured. Please check the log files..
///
diff --git a/BodyshopUploader/Properties/Resources.resx b/BodyshopUploader/Properties/Resources.resx
index ef3d204..080817d 100644
--- a/BodyshopUploader/Properties/Resources.resx
+++ b/BodyshopUploader/Properties/Resources.resx
@@ -117,6 +117,9 @@
System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
+
+ Log out
+
An issue has occured. Please check the log files.
diff --git a/BodyshopUploader/ViewModels/MainViewModel.commands.cs b/BodyshopUploader/ViewModels/MainViewModel.commands.cs
index 3b632c8..5e62334 100644
--- a/BodyshopUploader/ViewModels/MainViewModel.commands.cs
+++ b/BodyshopUploader/ViewModels/MainViewModel.commands.cs
@@ -174,5 +174,25 @@ namespace BodyshopPartner.ViewModels
}
}
+ private ICommand _logoutCommand;
+ public ICommand LogoutCommand
+ {
+ get
+ {
+ if (_logoutCommand == null)
+ {
+ _logoutCommand = new RelayCommand(
+ p => true,
+ p =>
+ {
+ Logout();
+ });
+ }
+ return _logoutCommand;
+ }
+ }
+
+
+
}
}
diff --git a/BodyshopUploader/ViewModels/MainViewModel.cs b/BodyshopUploader/ViewModels/MainViewModel.cs
index d7732b1..3f8d6e4 100644
--- a/BodyshopUploader/ViewModels/MainViewModel.cs
+++ b/BodyshopUploader/ViewModels/MainViewModel.cs
@@ -189,7 +189,16 @@ namespace BodyshopPartner.ViewModels
IndeterminateLoading = false;
}
- public async Task LoadBodyshopData()
+
+ public void Logout()
+ {
+ Properties.Settings.Default.AuthToken = "";
+ Properties.Settings.Default.RefreshToken = "";
+ Properties.Settings.Default.Save();
+ App.Current.Shutdown();
+ }
+
+ public async Task LoadBodyshopData()
{
var r = new GraphQLRequest
{
diff --git a/BodyshopUploader/Views/Main.xaml b/BodyshopUploader/Views/Main.xaml
index 4e2eaec..6d87e32 100644
--- a/BodyshopUploader/Views/Main.xaml
+++ b/BodyshopUploader/Views/Main.xaml
@@ -110,7 +110,7 @@
+