Browse Source
# Conflicts: # StabilityMatrix/Models/ConnectedModelInfo.cs # StabilityMatrix/ViewModels/CheckpointBrowserCardViewModel.cspull/5/head
Ionite
1 year ago
27 changed files with 146 additions and 76 deletions
@ -0,0 +1,8 @@
|
||||
namespace StabilityMatrix.Models; |
||||
|
||||
public enum ProgressType |
||||
{ |
||||
Generic, |
||||
Download, |
||||
Extract, |
||||
} |
@ -0,0 +1,8 @@
|
||||
using Wpf.Ui.Contracts; |
||||
|
||||
namespace StabilityMatrix.Services; |
||||
|
||||
public interface INotificationBarService : ISnackbarService |
||||
{ |
||||
public void ShowStartupNotifications(); |
||||
} |
@ -1,26 +1,33 @@
|
||||
using AsyncAwaitBestPractices; |
||||
using StabilityMatrix.Helper; |
||||
using Wpf.Ui.Common; |
||||
using Wpf.Ui.Contracts; |
||||
using Wpf.Ui.Controls; |
||||
using Wpf.Ui.Controls.IconElements; |
||||
using Wpf.Ui.Services; |
||||
using SnackbarService = Wpf.Ui.Services.SnackbarService; |
||||
|
||||
namespace StabilityMatrix.Services; |
||||
|
||||
public interface INotificationBarService : ISnackbarService |
||||
{ |
||||
public void ShowStartupNotifications(); |
||||
} |
||||
|
||||
public class NotificationBarService : SnackbarService, INotificationBarService |
||||
{ |
||||
private readonly ISettingsManager settingsManager; |
||||
|
||||
public NotificationBarService(ISettingsManager settingsManager) |
||||
{ |
||||
this.settingsManager = settingsManager; |
||||
} |
||||
|
||||
public void ShowStartupNotifications() |
||||
{ |
||||
if (settingsManager.Settings.HasSeenWelcomeNotification) |
||||
return; |
||||
|
||||
Timeout = 10000; |
||||
var linkIcon = new SymbolIcon(SymbolRegular.Link24); |
||||
var snackbar = ShowAsync( |
||||
"Welcome to StabilityMatrix!", |
||||
"You can join our Discord server for support and feedback.", linkIcon, ControlAppearance.Info); |
||||
snackbar.SafeFireAndForget(); |
||||
|
||||
settingsManager.SetHasSeenWelcomeNotification(true); |
||||
} |
||||
} |
||||
|
Loading…
Reference in new issue