Skip to content
This repository was archived by the owner on Apr 30, 2024. It is now read-only.

Commit 43a961c

Browse files
committed
Moved AboutPage navigation to CommandBar
1 parent 4bc2daa commit 43a961c

File tree

4 files changed

+29
-12
lines changed

4 files changed

+29
-12
lines changed

src/Quarrel.ViewModels/ViewModels/CurrentUserViewModel.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ public CurrentUserViewModel(IMessenger messenger, IDiscordService discordService
4848
[ICommand]
4949
public void NavigateToSettings()
5050
{
51-
_messenger.Send(new NavigateToSubPageMessage(typeof(AboutPageViewModel)));
5251
}
5352
}
5453
}

src/Quarrel/Controls/Shell/CurrentUserButton.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@
8585
</StackPanel>
8686

8787
<Button
88+
IsEnabled="False"
8889
Grid.Column="2"
8990
Margin="0,0,16,0"
9091
Padding="0"

src/Quarrel/Controls/Shell/QuarrelCommandBar.xaml

Lines changed: 24 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,29 +8,29 @@
88
mc:Ignorable="d"
99
d:DesignHeight="56"
1010
d:DesignWidth="800">
11-
11+
1212
<CommandBar.Content>
1313
<Grid Height="40">
1414
<Grid.ColumnDefinitions>
1515
<ColumnDefinition Width="72"/>
1616
<ColumnDefinition/>
1717
</Grid.ColumnDefinitions>
18-
18+
1919
<!--Hamburger button-->
20-
<AppBarButton Height="40"
20+
<AppBarButton Height="40"
2121
Canvas.ZIndex="1"
2222
Background="Transparent"
2323
HorizontalAlignment="Stretch"
2424
Click="HamburgerClicked">
25-
<AppBarButton.Content>
26-
<FontIcon Glyph="&#xE700;"
25+
<AppBarButton.Content>
26+
<FontIcon Glyph="&#xE700;"
2727
FontSize="24"
2828
Margin="0,4,0,0"/>
29-
</AppBarButton.Content>
30-
</AppBarButton>
29+
</AppBarButton.Content>
30+
</AppBarButton>
3131
</Grid>
3232
</CommandBar.Content>
33-
33+
3434
<CommandBar.PrimaryCommands>
3535
<AppBarButton x:Uid="CommandBar/CallABB"
3636
Label="Call"
@@ -39,7 +39,7 @@
3939
<FontIcon Glyph="&#xE13A;" FontSize="24" Margin="0,4,0,0"/>
4040
</AppBarButton.Content>
4141
</AppBarButton>
42-
42+
4343
<AppBarButton x:Uid="CommandBar/ToggleMembersABB"
4444
Label="Toggle Member List"
4545
Background="Transparent"
@@ -49,11 +49,24 @@
4949
</AppBarButton.Content>
5050
</AppBarButton>
5151
</CommandBar.PrimaryCommands>
52-
52+
5353
<CommandBar.SecondaryCommands>
5454
<AppBarButton x:Uid="CommandBar/DiscordStatusABB"
5555
Label="Discord Status"
5656
Background="Transparent"
57-
Click="GoToDiscordStatus"/>
57+
Click="GoToDiscordStatus">
58+
<FontIcon FontFamily="{ThemeResource SymbolThemeFontFamily}" Glyph="&#xECAD;"/>
59+
</AppBarButton>
60+
<AppBarButton x:Uid="CommandBar/SettingsABB"
61+
Label="Settings"
62+
Icon="Setting"
63+
Background="Transparent"
64+
IsEnabled="False"/>
65+
<AppBarButton x:Uid="CommandBar/AboutABB"
66+
Label="About"
67+
Background="Transparent"
68+
Click="GoToAbout">
69+
<FontIcon FontFamily="{ThemeResource SymbolThemeFontFamily}" Glyph="&#xF142;" />
70+
</AppBarButton>
5871
</CommandBar.SecondaryCommands>
5972
</CommandBar>

src/Quarrel/Controls/Shell/QuarrelCommandBar.xaml.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
using Quarrel.Messages.Navigation.SubPages;
77
using Quarrel.Messages.Panel;
88
using Quarrel.ViewModels.SubPages.DiscordStatus;
9+
using Quarrel.ViewModels.SubPages.Meta;
910
using Windows.UI.Xaml;
1011
using Windows.UI.Xaml.Controls;
1112

@@ -29,5 +30,8 @@ private void HamburgerClicked(object sender, RoutedEventArgs e)
2930

3031
private void GoToDiscordStatus(object sender, RoutedEventArgs e)
3132
=> _messenger.Send(new NavigateToSubPageMessage(typeof(DiscordStatusViewModel)));
33+
34+
private void GoToAbout(object sender, RoutedEventArgs e)
35+
=> _messenger.Send(new NavigateToSubPageMessage(typeof(AboutPageViewModel)));
3236
}
3337
}

0 commit comments

Comments
 (0)