Skip to content

Commit f0fce54

Browse files
Merge pull request #46 from nullinside-development-group/feat/version
Feat/version
2 parents c14d9c1 + 23c1b06 commit f0fce54

File tree

5 files changed

+24
-5
lines changed

5 files changed

+24
-5
lines changed

src/TwitchStreamingTools/ViewModels/Pages/AccountViewModel.cs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using System;
22
using System.Diagnostics;
33
using System.Reactive;
4+
using System.Reflection;
45
using System.Threading.Tasks;
56

67
using ReactiveUI;
@@ -79,6 +80,11 @@ public string? TwitchUsername {
7980
set => this.RaiseAndSetIfChanged(ref _twitchUsername, value);
8081
}
8182

83+
/// <summary>
84+
/// The application version number.
85+
/// </summary>
86+
public string? Version => Assembly.GetEntryAssembly()?.GetName().Version?.ToString();
87+
8288
/// <inheritdoc />
8389
public void Dispose() {
8490
_clipboardPoller?.Dispose();

src/TwitchStreamingTools/Views/Loading.axaml.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
using Avalonia;
2-
using Avalonia.Controls;
1+
using Avalonia.Controls;
32

43
namespace TwitchStreamingTools.Views;
54

src/TwitchStreamingTools/Views/MainWindow.axaml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,15 @@
2222
Icon="/Assets/logo.ico"
2323
Title="Twitch Streaming Tools">
2424
<Window.Styles>
25+
<Style Selector="Label">
26+
<Setter Property="Foreground">rgb(204, 200, 175)</Setter>
27+
</Style>
28+
<Style Selector="TextBox">
29+
<Setter Property="Foreground">rgb(204, 200, 175)</Setter>
30+
</Style>
31+
<Style Selector="TextBox:focus">
32+
<Setter Property="Foreground">rgb(204, 200, 175)</Setter>
33+
</Style>
2534
<Style Selector="TextBlock">
2635
<Setter Property="Foreground">rgb(204, 200, 175)</Setter>
2736
</Style>

src/TwitchStreamingTools/Views/MainWindow.axaml.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
using System.Threading.Tasks;
55

66
using Avalonia.Controls;
7-
using Avalonia.Threading;
87

98
using Nullinside.Api.Common.Desktop;
10-
11-
using TwitchStreamingTools.ViewModels;
129
#if !DEBUG
1310
using Microsoft.Extensions.DependencyInjection;
1411

12+
using Avalonia.Threading;
13+
14+
using TwitchStreamingTools.ViewModels;
1515
#else
1616
using Avalonia;
1717
#endif

src/TwitchStreamingTools/Views/Pages/AccountView.axaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,14 @@
1414
<DockPanel HorizontalAlignment="Stretch"
1515
VerticalAlignment="Stretch"
1616
Name="ContentWrapper">
17+
<Label HorizontalAlignment="Right"
18+
VerticalAlignment="Top"
19+
DockPanel.Dock="Top"
20+
Content="{Binding Version, StringFormat='Version: {0}'}" />
1721
<StackPanel Orientation="Vertical"
1822
HorizontalAlignment="Center"
1923
VerticalAlignment="Center"
24+
DockPanel.Dock="Top"
2025
Spacing="25">
2126
<Image Width="200" Source="/Assets/twitch-wordart.png" />
2227
<Button IsVisible="{Binding !HasValidOAuthToken}"

0 commit comments

Comments
 (0)