Browse Source

- Rearranged data directory dialog a little bit

- update check now checks every hour
- added current data directory label to 'Select new Data Directory' setting description
pull/165/head
JT 1 year ago
parent
commit
eb5c3e9fa8
  1. 3
      README.md
  2. 20
      StabilityMatrix.Avalonia/Languages/Resources.Designer.cs
  3. 8
      StabilityMatrix.Avalonia/Languages/Resources.resx
  4. 3
      StabilityMatrix.Avalonia/ViewModels/SettingsViewModel.cs
  5. 86
      StabilityMatrix.Avalonia/Views/Dialogs/SelectDataDirectoryDialog.axaml
  6. 11
      StabilityMatrix.Avalonia/Views/SettingsPage.axaml
  7. 2
      StabilityMatrix.Core/Updater/UpdateHelper.cs

3
README.md

@ -14,13 +14,14 @@
[voltaml]: https://github.com/VoltaML/voltaML-fast-stable-diffusion
[invokeai]: https://github.com/invoke-ai/InvokeAI
[fooocus]: https://github.com/lllyasviel/Fooocus
[fooocus-mre]: https://github.com/MoonRide303/Fooocus-MRE
[civitai]: https://civitai.com/
Multi-Platform Package Manager for Stable Diffusion
### 🖱 One click install and update for Stable Diffusion Web UI Packages
- Supports [Automatic 1111][auto1111], [Comfy UI][comfy], [SD.Next (Vladmandic)][sdnext], [VoltaML][voltaml], [InvokeAI][invokeai], and [Fooocus][fooocus]
- Supports [Automatic 1111][auto1111], [Comfy UI][comfy], [SD.Next (Vladmandic)][sdnext], [VoltaML][voltaml], [InvokeAI][invokeai], [Fooocus][fooocus], and [Fooocus-MRE][fooocus-mre]
- Embedded Git and Python dependencies, with no need for either to be globally installed
- Fully portable - move Stability Matrix's Data Directory to a new drive or computer at any time

20
StabilityMatrix.Avalonia/Languages/Resources.Designer.cs generated

@ -618,7 +618,7 @@ namespace StabilityMatrix.Avalonia.Languages {
}
/// <summary>
/// Looks up a localized string similar to This is where model checkpoints, LORAs, web UIs, settings, etc. will be installed..
/// Looks up a localized string similar to This is where application data (model checkpoints, web UIs, etc.) will be installed..
/// </summary>
public static string Label_DataDirectoryExplanation {
get {
@ -626,6 +626,15 @@ namespace StabilityMatrix.Avalonia.Languages {
}
}
/// <summary>
/// Looks up a localized string similar to Data Folder Name.
/// </summary>
public static string Label_DataFolderName {
get {
return ResourceManager.GetString("Label_DataFolderName", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Data provided by CivitAI.
/// </summary>
@ -1130,6 +1139,15 @@ namespace StabilityMatrix.Avalonia.Languages {
}
}
/// <summary>
/// Looks up a localized string similar to Please Select a Data Directory.
/// </summary>
public static string Label_PleaseSelectDataDirectory {
get {
return ResourceManager.GetString("Label_PleaseSelectDataDirectory", resourceCulture);
}
}
/// <summary>
/// Looks up a localized string similar to Portable Mode.
/// </summary>

8
StabilityMatrix.Avalonia/Languages/Resources.resx

@ -280,7 +280,7 @@
<value>Data Directory</value>
</data>
<data name="Label_DataDirectoryExplanation" xml:space="preserve">
<value>This is where model checkpoints, LORAs, web UIs, settings, etc. will be installed.</value>
<value>This is where application data (model checkpoints, web UIs, etc.) will be installed.</value>
</data>
<data name="Label_FatWarning" xml:space="preserve">
<value>You may encounter errors when using a FAT32 or exFAT drive. Select a different drive for a smoother experience.</value>
@ -648,4 +648,10 @@
<data name="Label_SharedModelStrategyShort" xml:space="preserve">
<value>Model Sharing</value>
</data>
<data name="Label_PleaseSelectDataDirectory" xml:space="preserve">
<value>Please Select a Data Directory</value>
</data>
<data name="Label_DataFolderName" xml:space="preserve">
<value>Data Folder Name</value>
</data>
</root>

3
StabilityMatrix.Avalonia/ViewModels/SettingsViewModel.cs

@ -134,6 +134,9 @@ public partial class SettingsViewModel : PageViewModelBase
public string VersionFlyoutText =>
$"You are {VersionTapCountThreshold - VersionTapCount} clicks away from enabling Debug options.";
public string DataDirectory =>
settingsManager.IsLibraryDirSet ? settingsManager.LibraryDir : "Not set";
public SettingsViewModel(
INotificationService notificationService,
ISettingsManager settingsManager,

86
StabilityMatrix.Avalonia/Views/Dialogs/SelectDataDirectoryDialog.axaml

@ -10,26 +10,42 @@
d:DataContext="{x:Static mocks:DesignData.SelectDataDirectoryViewModel}"
x:DataType="dialogs:SelectDataDirectoryViewModel"
x:CompileBindings="True"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="550"
x:Class="StabilityMatrix.Avalonia.Views.Dialogs.SelectDataDirectoryDialog">
<Grid RowDefinitions="Auto,1*,1*"
<Grid RowDefinitions="Auto,Auto,Auto,*,*"
Margin="16,0,16,16"
MinHeight="450"
MaxWidth="700" >
<StackPanel Grid.Row="0" Margin="0,0,0,16">
<ui:InfoBar
IsClosable="False"
IsOpen="True"
Margin="0,0,0,16"
IsVisible="{Binding HasOldData}"
Title="Welcome back! In this update, you can optionally choose a custom location to store all data. If you choose a new location, or opt to use Portable Mode, you'll be able to migrate your existing data on the next page."/>
<StackPanel Orientation="Vertical">
<TextBlock Text="{x:Static lang:Resources.Text_WelcomeToStabilityMatrix}"
TextWrapping="Wrap"
Margin="8,0,8,0"
VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="36" FontWeight="Light" />
<TextBlock Text="{x:Static lang:Resources.Label_PleaseSelectDataDirectory}"
TextWrapping="Wrap"
Margin="8,4,8,0"
VerticalAlignment="Center" HorizontalAlignment="Center"
FontSize="20" FontWeight="Light" />
<TextBlock
Text="{x:Static lang:Resources.Label_DataDirectoryExplanation}"
TextWrapping="Wrap"
Foreground="LightGray"
FontSize="14"
FontWeight="Light"
TextAlignment="Center"
Margin="0,8,0,0" />
</StackPanel>
<StackPanel Grid.Row="1" Margin="0,0,0,16">
<Label
Content="{x:Static lang:Resources.Label_DataDirectory}"
FontSize="13"
Margin="0,16,0,0" />
<Grid ColumnDefinitions="*,Auto">
<TextBox
@ -49,14 +65,7 @@
<ui:SymbolIcon Symbol="OpenFolder" />
</Button>
</Grid>
<TextBlock
Text="{x:Static lang:Resources.Label_DataDirectoryExplanation}"
TextWrapping="Wrap"
Foreground="LightGray"
FontSize="12"
Margin="0,8,0,0" />
<TextBlock
Text="{x:Static lang:Resources.Label_FatWarning}"
TextWrapping="Wrap"
@ -64,11 +73,13 @@
IsVisible="{Binding ShowFatWarning}"
FontSize="14"
Margin="0,8,0,0" />
</StackPanel>
<StackPanel Grid.Row="2" Orientation="Vertical">
<CheckBox
Content="{x:Static lang:Resources.Label_PortableMode}"
IsChecked="{Binding IsPortableMode, Mode=TwoWay}"
Margin="0,32,0,0" />
Margin="0,8,0,0" />
<ui:InfoBar
IsClosable="False"
@ -77,14 +88,13 @@
Margin="0,8,0,0"
Padding="16"
Title="{x:Static lang:Resources.Label_PortableModeExplanation}" />
</StackPanel>
<!-- Indicator of existing or new data directory -->
<StackPanel
Grid.Row="1"
Grid.Row="3"
HorizontalAlignment="Center"
Margin="8,0,8,8"
Margin="8,0,8,0"
Orientation="Horizontal"
IsVisible="{Binding IsStatusBadgeVisible}">
<controls:RefreshBadge DataContext="{Binding ValidatorRefreshBadge}" />
@ -94,15 +104,27 @@
VerticalAlignment="Center" />
</StackPanel>
<Button
Content="{x:Static lang:Resources.Action_Continue}"
IsDefault="True"
Command="{Binding OnPrimaryButtonClick}"
FontSize="16"
Grid.Row="2"
HorizontalAlignment="Center"
IsEnabled="{Binding IsDirectoryValid}"
Padding="16,8" />
<UniformGrid Grid.Row="4" HorizontalAlignment="Center" VerticalAlignment="Bottom"
Margin="0,8,0,0">
<Button
Content="{x:Static lang:Resources.Action_Cancel}"
IsDefault="True"
Command="{Binding OnCloseButtonClick}"
FontSize="16"
HorizontalAlignment="Center"
IsEnabled="{Binding IsDirectoryValid}"
Padding="16,8" />
<Button
Content="{x:Static lang:Resources.Action_Continue}"
IsDefault="True"
Command="{Binding OnPrimaryButtonClick}"
FontSize="16"
Classes="success"
HorizontalAlignment="Center"
IsEnabled="{Binding IsDirectoryValid}"
Padding="16,8" />
</UniformGrid>
</Grid>
</controls:UserControlBase>

11
StabilityMatrix.Avalonia/Views/SettingsPage.axaml

@ -262,8 +262,17 @@
Grid.Row="2"
Margin="8,0"
Description="{x:Static lang:Resources.Label_SelectNewDataDirectory_Details}"
Header="{x:Static lang:Resources.Label_SelectNewDataDirectory}"
IconSource="MoveToFolder">
<ui:SettingsExpander.Header>
<StackPanel Orientation="Vertical">
<TextBlock Text="{x:Static lang:Resources.Label_SelectNewDataDirectory}"/>
<TextBlock Foreground="{DynamicResource TextFillColorSecondaryBrush}"
FontSize="12">
<Run Text="Current directory:"/>
<Run Text="{Binding DataDirectory}"/>
</TextBlock>
</StackPanel>
</ui:SettingsExpander.Header>
<ui:SettingsExpander.Footer>
<Button Command="{Binding PickNewDataDirectory}">
<Grid ColumnDefinitions="Auto, Auto">

2
StabilityMatrix.Core/Updater/UpdateHelper.cs

@ -18,7 +18,7 @@ public class UpdateHelper : IUpdateHelper
private readonly IHttpClientFactory httpClientFactory;
private readonly IDownloadService downloadService;
private readonly DebugOptions debugOptions;
private readonly System.Timers.Timer timer = new(TimeSpan.FromMinutes(5));
private readonly System.Timers.Timer timer = new(TimeSpan.FromMinutes(60));
private string UpdateManifestUrl =>
debugOptions.UpdateManifestUrl ?? "https://cdn.lykos.ai/update-v2.json";

Loading…
Cancel
Save