Skip to content

Commit

Permalink
v0.4.5
Browse files Browse the repository at this point in the history
  • Loading branch information
d3ara1n committed Jun 17, 2023
1 parent 0728070 commit 1637a85
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 6 deletions.
16 changes: 13 additions & 3 deletions src/Polymerium.App/ViewModels/MainViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Collections.Specialized;
using System.Diagnostics;
using System.Linq;
using System.Windows.Input;
using CommunityToolkit.Mvvm.ComponentModel;
Expand Down Expand Up @@ -256,8 +257,17 @@ public void GotoInstanceView(string id)

public void GotoSearchView(string query)
{
_navigationService.Navigate<SearchCenterView>(
new SearchCenterNavigationArguments(query, true)
);
switch (query.ToLower().Trim())
{
case "github":
Process.Start(new ProcessStartInfo("https://github.com/d3ara1n/Polymerium")
{
UseShellExecute = true
});
break;
default:
_navigationService.Navigate<SearchCenterView>(new SearchCenterNavigationArguments(query, true));
break;
}
}
}
8 changes: 5 additions & 3 deletions src/Polymerium.App/Views/InstanceView.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
</Grid>
</controls:Card>
<controls:Card Margin="5,5,10,5" Padding="5">
<Grid ColumnDefinitions="*,*,*">
<Grid ColumnDefinitions="*,1,*,1,*">
<Grid.ChildrenTransitions>
<ContentThemeTransition />
</Grid.ChildrenTransitions>
Expand All @@ -145,7 +145,8 @@
</StackPanel>
</Grid>
</Button>
<Button x:Name="OpenModButton" Grid.Column="1" Style="{StaticResource IconButtonStyle}"
<Border BorderThickness="1,0,0,0" Margin="0,5" BorderBrush="{ThemeResource CardStrokeBrush}" Grid.Column="1"/>
<Button x:Name="OpenModButton" Grid.Column="2" Style="{StaticResource IconButtonStyle}"
Click="OpenModButton_Click"
IsEnabled="{x:Bind ViewModel.IsModSupported}">
<Grid ColumnDefinitions="Auto,*" HorizontalAlignment="Center">
Expand All @@ -163,7 +164,8 @@
</StackPanel>
</Grid>
</Button>
<Button x:Name="OpenShaderPackButton" Grid.Column="2" Style="{StaticResource IconButtonStyle}"
<Border BorderThickness="1,0,0,0" Margin="0,5" BorderBrush="{ThemeResource CardStrokeBrush}" Grid.Column="3"/>
<Button x:Name="OpenShaderPackButton" Grid.Column="4" Style="{StaticResource IconButtonStyle}"
Click="OpenShaderPackButton_Click"
IsEnabled="{x:Bind ViewModel.IsShaderSupported}">
<Grid ColumnDefinitions="Auto,*" HorizontalAlignment="Center">
Expand Down

0 comments on commit 1637a85

Please sign in to comment.