Skip to content

Commit bdc4efe

Browse files
Use kutt.it for links, added more info in the about tab
1 parent a447517 commit bdc4efe

File tree

2 files changed

+46
-23
lines changed

2 files changed

+46
-23
lines changed

PotatoNV-next/Controls/AboutTab.xaml

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -18,30 +18,38 @@
1818
</Grid.ColumnDefinitions>
1919

2020
<StackPanel
21-
Grid.Column="0"
22-
Grid.Row="0"
23-
Grid.ColumnSpan="2"
24-
VerticalAlignment="Center"
25-
HorizontalAlignment="Center">
21+
Grid.Column="0"
22+
Grid.Row="0"
23+
Grid.ColumnSpan="2"
24+
VerticalAlignment="Center"
25+
HorizontalAlignment="Center">
26+
<Image x:Name="fireLogo" Stretch="None" Height="96" Width="96" />
2627
<TextBlock FontSize="36">PotatoNV</TextBlock>
27-
<TextBlock>v{0} Next</TextBlock>
28-
28+
<TextBlock x:Name="version">v{0} Next</TextBlock>
29+
<TextBlock>GNU General Public License v3.0</TextBlock>
30+
<TextBlock>Icons by Icons8</TextBlock>
31+
<TextBlock>All bootloaders are Huawei Technologies Co., Ltd. property</TextBlock>
32+
<TextBlock Margin="0,15,0,0">
33+
<Hyperlink NavigateUri="pnv://gh" RequestNavigate="Hyperlink_RequestNavigate">
34+
mpotato.me/projects/PotatoNV
35+
</Hyperlink>
36+
</TextBlock>
2937
</StackPanel>
3038

3139
<controls:ImageButton
32-
Grid.Column="0"
33-
Grid.Row="1"
34-
Margin="5"
35-
Text="Donate"
36-
Icon="heart"
37-
ButtonClicked="DonateButton_ButtonClicked" />
40+
Grid.Column="0"
41+
Grid.Row="1"
42+
Margin="5"
43+
Text="Donate"
44+
Icon="heart"
45+
ButtonClicked="DonateButton_ButtonClicked" />
3846

3947
<controls:ImageButton
40-
Grid.Column="1"
41-
Grid.Row="1"
42-
Margin="5"
43-
Text="@RePotato"
44-
Icon="telegram"
45-
ButtonClicked="TelegramButton_ButtonClicked" />
48+
Grid.Column="1"
49+
Grid.Row="1"
50+
Margin="5"
51+
Text="@RePotato"
52+
Icon="telegram"
53+
ButtonClicked="TelegramButton_ButtonClicked" />
4654
</Grid>
4755
</UserControl>
Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
using PotatoNV_next.Utils;
22
using System;
33
using System.Diagnostics;
4+
using System.Linq;
45
using System.Windows.Controls;
56

67
namespace PotatoNV_next.Controls
@@ -10,18 +11,32 @@ public partial class AboutTab : UserControl
1011
public AboutTab()
1112
{
1213
InitializeComponent();
14+
version.Text = string.Format(version.Text, GetVersion(3));
15+
fireLogo.Source = MediaConverter.ImageSourceFromBitmap(Properties.Resources.Fire.ToBitmap());
1316
}
1417

1518
private void DonateButton_ButtonClicked(object sender, EventArgs e)
1619
{
17-
Log.Debug("Clicked to donate button!");
18-
Process.Start("https://mashed-potatoes.github.io/donate/?utm_source=potatonv&utm_medium=about-donate");
20+
Process.Start("https://kutt.it/pnv-donate");
1921
}
2022

2123
private void TelegramButton_ButtonClicked(object sender, EventArgs e)
2224
{
23-
Log.Debug("Clicked to Telegram button!");
24-
Process.Start("https://t.me/s/RePotato");
25+
Process.Start("https://kutt.it/pnv-tg");
26+
}
27+
28+
public static string GetVersion(int depth = 3)
29+
{
30+
return string.Join(".",
31+
typeof(MainWindow).Assembly.GetName().Version
32+
.ToString()
33+
.Split('.')
34+
.Take(depth));
35+
}
36+
37+
private void Hyperlink_RequestNavigate(object sender, System.Windows.Navigation.RequestNavigateEventArgs e)
38+
{
39+
Process.Start("https://kutt.it/pnv-src-about");
2540
}
2641
}
2742
}

0 commit comments

Comments
 (0)