Skip to content

Commit 093849d

Browse files
committed
Add website button
1 parent 5d72cd2 commit 093849d

3 files changed

Lines changed: 40 additions & 8 deletions

File tree

CollapseLauncher/XAMLs/MainApp/Pages/SettingsPage.xaml

Lines changed: 38 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!-- ReSharper disable IdentifierTypo -->
1+
<!-- ReSharper disable IdentifierTypo -->
22
<!-- ReSharper disable UnusedMember.Local -->
33
<!-- ReSharper disable Xaml.ConstructorWarning -->
44
<Page x:Class="CollapseLauncher.Pages.SettingsPage"
@@ -1121,23 +1121,23 @@
11211121
IsSpellCheckEnabled="False"
11221122
PlaceholderText="{x:Bind helper:Locale.Lang._SettingsPage.Database_Url_Example}"
11231123
Text="{x:Bind DbUrl, Mode=TwoWay}"
1124-
TextChanged="DbTextBox_OnTextChanged"/>
1124+
TextChanged="DbTextBox_OnTextChanged" />
11251125
<PasswordBox x:Name="DbTokenPasswordBox"
11261126
Grid.Row="1"
1127-
Grid.ColumnSpan="2"
11281127
Grid.Column="0"
1128+
Grid.ColumnSpan="2"
11291129
Margin="0,8,0,8"
11301130
HorizontalAlignment="Stretch"
11311131
Header="{x:Bind helper:Locale.Lang._SettingsPage.Database_Token}"
11321132
InputScope="Password"
11331133
IsEnabled="{Binding Path=IsOn, ElementName=DbToggle}"
11341134
Password="{x:Bind DbToken, Mode=TwoWay}"
1135-
PlaceholderText="{x:Bind helper:Locale.Lang._SettingsPage.Database_Placeholder_DbTokenPasswordBox}"
1136-
PasswordChanged="DbTokenPasswordBox_OnPasswordChanged"/>
1135+
PasswordChanged="DbTokenPasswordBox_OnPasswordChanged"
1136+
PlaceholderText="{x:Bind helper:Locale.Lang._SettingsPage.Database_Placeholder_DbTokenPasswordBox}" />
11371137
<TextBox x:Name="DbUserIdTextBox"
11381138
Grid.Row="2"
1139-
Grid.ColumnSpan="2"
11401139
Grid.Column="0"
1140+
Grid.ColumnSpan="2"
11411141
Margin="0,8,0,8"
11421142
HorizontalAlignment="Stretch"
11431143
GotFocus="DbUserIdTextBox_GotFocus"
@@ -1147,7 +1147,7 @@
11471147
LostFocus="DbUserIdTextBox_LostFocus"
11481148
PlaceholderText="{x:Bind helper:Locale.Lang._SettingsPage.Database_Placeholder_DbUserIdTextBox}"
11491149
Text="{x:Bind DbUserId, Mode=TwoWay}"
1150-
TextChanged="DbTextBox_OnTextChanged"/>
1150+
TextChanged="DbTextBox_OnTextChanged" />
11511151
<Button x:Name="GenerateGuidButton"
11521152
Grid.Row="3"
11531153
Grid.Column="0"
@@ -1580,6 +1580,37 @@
15801580
<Run Text="~neon-nyan" />
15811581
</TextBlock>
15821582
</StackPanel>
1583+
<Button x:Name="ButtonLinkWebsiteCollapse"
1584+
Margin="0,8,0,8"
1585+
Padding="16,12"
1586+
HorizontalAlignment="Stretch"
1587+
HorizontalContentAlignment="Stretch"
1588+
Click="ClickButtonLinkFromTag"
1589+
CornerRadius="{x:Bind ext:UIElementExtensions.AttachRoundedKindCornerRadius(ButtonLinkWebsiteCollapse)}"
1590+
Style="{ThemeResource AccentButtonStyle}"
1591+
Tag="https://collapselauncher.com">
1592+
<Grid Margin="0,-2,0,0"
1593+
HorizontalAlignment="Stretch">
1594+
<Grid.ColumnDefinitions>
1595+
<ColumnDefinition />
1596+
<ColumnDefinition Width="Auto" />
1597+
</Grid.ColumnDefinitions>
1598+
<Grid HorizontalAlignment="Left">
1599+
<TextBlock HorizontalAlignment="Left"
1600+
VerticalAlignment="Center"
1601+
FontWeight="Medium"
1602+
HorizontalTextAlignment="Left"
1603+
Text="{x:Bind helper:Locale.Lang._SettingsPage.WebsiteBtn}" />
1604+
</Grid>
1605+
<FontIcon Grid.Column="1"
1606+
Margin="8,0,3,0"
1607+
HorizontalAlignment="Left"
1608+
VerticalAlignment="Center"
1609+
FontFamily="{ThemeResource FontAwesomeSolid}"
1610+
FontSize="20"
1611+
Glyph="&#xF0AC;" />
1612+
</Grid>
1613+
</Button>
15831614
<Button x:Name="ButtonLinkDiscordCollapse"
15841615
Margin="0,8,0,8"
15851616
Padding="16,12"

Hi3Helper.Core/Lang/Locale/LangSettingsPage.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,7 @@ public sealed partial class LangSettingsPage
100100
public string DiscordBtn1 { get; set; } = LangFallback?._SettingsPage.DiscordBtn1;
101101
public string DiscordBtn2 { get; set; } = LangFallback?._SettingsPage.DiscordBtn2;
102102
public string DiscordBtn3 { get; set; } = LangFallback?._SettingsPage.DiscordBtn3;
103+
public string WebsiteBtn { get; set; } = LangFallback?._SettingsPage.WebsiteBtn;
103104
public string AppChangeReleaseChannel { get; set; } = LangFallback?._SettingsPage.AppChangeReleaseChannel;
104105
public string EnableAcrylicEffect { get; set; } = LangFallback?._SettingsPage.EnableAcrylicEffect;
105106
public string EnableDownloadChunksMerging { get; set; } = LangFallback?._SettingsPage.EnableDownloadChunksMerging;

Hi3Helper.Core/Lang/en_US.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@
538538
"Disclaimer1": "This app is not affiliated with",
539539
"Disclaimer2": "by any means",
540540
"Disclaimer3": "and completely open-sourced. Any contribution is welcomed.",
541-
541+
"WebsiteBtn": "Visit our Website",
542542
"DiscordBtn1": "Join our Armada Discord!",
543543
"DiscordBtn2": "Honkai Impact 3rd Discord",
544544
"DiscordBtn3": "Collapse's Official Discord!",

0 commit comments

Comments
 (0)