Skip to content

Commit 21cc805

Browse files
authored
Merge pull request #4 from voltaney/refactor/add-repository-info
Add repository info to SettingPage
2 parents b48d16d + 3a73807 commit 21cc805

File tree

4 files changed

+47
-1
lines changed

4 files changed

+47
-1
lines changed

TouchSenderTablet.GUI/Strings/en-us/Resources.resw

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@
144144
<data name="Settings_About.Text" xml:space="preserve">
145145
<value>About</value>
146146
</data>
147+
<data name="Settings_About_GitHubRepository.Header" xml:space="preserve">
148+
<value>GitHub Repository</value>
149+
</data>
150+
<data name="Settings_About_GitHubIssues.Header" xml:space="preserve">
151+
<value>Report a bug or send feedback</value>
152+
</data>
147153
<data name="Settings_AboutDescription.Text" xml:space="preserve">
148154
<value>TODO: Replace with your app description.</value>
149155
</data>

TouchSenderTablet.GUI/Strings/ja-jp/Resources.resw

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,12 @@
144144
<data name="Settings_About.Text" xml:space="preserve">
145145
<value>About</value>
146146
</data>
147+
<data name="Settings_About_GitHubRepository.Header" xml:space="preserve">
148+
<value>GitHubリポジトリ</value>
149+
</data>
150+
<data name="Settings_About_GitHubIssues.Header" xml:space="preserve">
151+
<value>バグ報告またはフィードバックの送信</value>
152+
</data>
147153
<data name="Settings_AboutDescription.Text" xml:space="preserve">
148154
<value>TODO: Replace with your app description.</value>
149155
</data>

TouchSenderTablet.GUI/Views/SettingsPage.xaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,20 @@
5151
Foreground="{ThemeResource TextFillColorSecondaryBrush}"
5252
IsTextSelectionEnabled="True"
5353
Text="{x:Bind ViewModel.Version}" />
54+
<toolkit:SettingsExpander.Items>
55+
<toolkit:SettingsCard
56+
x:Name="GitHubRepositorySettingsCard"
57+
x:Uid="Settings_About_GitHubRepository"
58+
ActionIcon="{ui:FontIcon Glyph=&#xE8A7;}"
59+
Click="GitHubRepositorySettingsCard_Click"
60+
IsClickEnabled="True" />
61+
<toolkit:SettingsCard
62+
x:Name="GitHubIssuesSettingsCard"
63+
x:Uid="Settings_About_GitHubIssues"
64+
ActionIcon="{ui:FontIcon Glyph=&#xE8A7;}"
65+
Click="GitHubIssuesSettingsCard_Click"
66+
IsClickEnabled="True" />
67+
</toolkit:SettingsExpander.Items>
5468
</toolkit:SettingsExpander>
5569
<toolkit:SettingsCard x:Uid="LogFile" HeaderIcon="{ui:FontIcon Glyph=&#xE8E5;}">
5670
<StackPanel Orientation="Horizontal" Spacing="12">

TouchSenderTablet.GUI/Views/SettingsPage.xaml.cs

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
using Microsoft.UI.Xaml;
1+
using System.Diagnostics;
2+
3+
using Microsoft.UI.Xaml;
24
using Microsoft.UI.Xaml.Controls;
35

46
using TouchSenderTablet.GUI.Helpers;
@@ -28,4 +30,22 @@ private void OnThemeSelectionChanged(object sender, SelectionChangedEventArgs e)
2830
ViewModel.SwitchThemeCommand.Execute(EnumHelper.GetEnum<ElementTheme>(selectedTheme));
2931
}
3032
}
33+
34+
private void GitHubRepositorySettingsCard_Click(object sender, RoutedEventArgs e)
35+
{
36+
Process.Start(new ProcessStartInfo
37+
{
38+
FileName = "https://github.com/voltaney/TouchSenderTablet",
39+
UseShellExecute = true,
40+
});
41+
}
42+
43+
private void GitHubIssuesSettingsCard_Click(object sender, RoutedEventArgs e)
44+
{
45+
Process.Start(new ProcessStartInfo
46+
{
47+
FileName = "https://github.com/voltaney/TouchSenderTablet/issues",
48+
UseShellExecute = true,
49+
});
50+
}
3151
}

0 commit comments

Comments
 (0)