Skip to content

Commit

Permalink
Add OpenOnCivitAi command to Connected Models
Browse files Browse the repository at this point in the history
  • Loading branch information
mohnjiles committed Jul 5, 2023
1 parent 5c7d3bc commit ebece70
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions StabilityMatrix/CheckpointManagerPage.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@
<MenuItem Command="{Binding RenameCommand}" Header="Rename" />
<!-- ReSharper disable once Xaml.RedundantResource -->
<MenuItem Command="{Binding DeleteCommand}" Header="Delete" />
<!-- ReSharper disable once Xaml.RedundantResource -->
<MenuItem Header="Open on CivitAI"
Command="{Binding OpenOnCivitAiCommand}"
Visibility="{Binding IsConnectedModel, Converter={StaticResource BoolToVisibilityConverter}}"/>
</ContextMenu>
</ui:Card.ContextMenu>
<Grid>
Expand Down
6 changes: 6 additions & 0 deletions StabilityMatrix/Models/CheckpointFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,12 @@ private async Task RenameAsync()
throw;
}
}

[RelayCommand]
private void OpenOnCivitAi()
{
ProcessRunner.OpenUrl($"https://civitai.com/models/{ConnectedModel.ModelId}");
}

// Loads image from path
private async Task LoadPreviewImage()
Expand Down

0 comments on commit ebece70

Please sign in to comment.