Skip to content

Commit 5044a21

Browse files
authored
Merge pull request #1569 from onesounds/AddSponsorButton
Add 'Become A Sponsor' Button
2 parents 5bc6acf + 92634e6 commit 5044a21

File tree

5 files changed

+29
-8
lines changed

5 files changed

+29
-8
lines changed

Flow.Launcher.Infrastructure/Constant.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ public static class Constant
4545
public const string Logs = "Logs";
4646

4747
public const string Website = "https://flowlauncher.com";
48+
public const string SponsorPage = "https://github.com/sponsors/Flow-Launcher";
4849
public const string GitHub = "https://github.com/Flow-Launcher/Flow.Launcher";
4950
public const string Docs = "https://flowlauncher.com/docs";
5051
}

Flow.Launcher/Languages/en.xaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,7 @@
191191
<system:String x:Key="icons">Icons</system:String>
192192
<system:String x:Key="about_activate_times">You have activated Flow Launcher {0} times</system:String>
193193
<system:String x:Key="checkUpdates">Check for Updates</system:String>
194+
<system:String x:Key="BecomeASponsor">Become A Sponsor</system:String>
194195
<system:String x:Key="newVersionTips">New version {0} is available, would you like to restart Flow Launcher to use the update?</system:String>
195196
<system:String x:Key="checkUpdatesFailed">Check updates failed, please check your connection and proxy settings to api.github.com.</system:String>
196197
<system:String x:Key="downloadUpdatesFailed">

Flow.Launcher/SettingWindow.xaml

Lines changed: 24 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<Window
1+
<Window
22
x:Class="Flow.Launcher.SettingWindow"
33
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
44
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
@@ -2848,13 +2848,29 @@
28482848
Text="{Binding Version}" />
28492849
<TextBlock Style="{DynamicResource SettingSubTitleLabel}" Text="{DynamicResource version}" />
28502850
</StackPanel>
2851-
<Button
2852-
Grid.Column="1"
2853-
Margin="0,0,-14,0"
2854-
HorizontalAlignment="Right"
2855-
Click="OnCheckUpdates"
2856-
Content="{DynamicResource checkUpdates}"
2857-
Style="{StaticResource AccentButtonStyle}" />
2851+
<StackPanel Grid.Column="2" Orientation="Horizontal">
2852+
<Button
2853+
Margin="0,0,10,0"
2854+
HorizontalAlignment="Right"
2855+
Click="OnCheckUpdates"
2856+
Content="{DynamicResource checkUpdates}" />
2857+
<Button
2858+
Margin="0,0,14,0"
2859+
Padding="0"
2860+
HorizontalAlignment="Right"
2861+
Style="{StaticResource AccentButtonStyle}">
2862+
<Hyperlink
2863+
NavigateUri="{Binding SponsorPage, Mode=OneWay}"
2864+
RequestNavigate="OnRequestNavigate"
2865+
TextDecorations="None">
2866+
<TextBlock
2867+
Padding="10,5,10,5"
2868+
Foreground="White"
2869+
Text="{DynamicResource BecomeASponsor}" />
2870+
</Hyperlink>
2871+
</Button>
2872+
2873+
</StackPanel>
28582874
<TextBlock Style="{StaticResource Glyph}">
28592875
&#xe946;
28602876
</TextBlock>

Flow.Launcher/SettingWindow.xaml.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@
1010
using ModernWpf;
1111
using ModernWpf.Controls;
1212
using System;
13+
using System.Diagnostics;
1314
using System.IO;
15+
using System.Security.Policy;
1416
using System.Windows;
1517
using System.Windows.Data;
1618
using System.Windows.Forms;

Flow.Launcher/ViewModel/SettingWindowViewModel.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -799,6 +799,7 @@ public bool ShortcutExists(string key)
799799
#region about
800800

801801
public string Website => Constant.Website;
802+
public string SponsorPage => Constant.SponsorPage;
802803
public string ReleaseNotes => _updater.GitHubRepository + @"/releases/latest";
803804
public string Documentation => Constant.Documentation;
804805
public string Docs => Constant.Docs;

0 commit comments

Comments
 (0)