Skip to content
This repository was archived by the owner on Nov 25, 2023. It is now read-only.

Commit 3e1cd08

Browse files
authored
Merge pull request #110 from Invvard/release/v1.2.0
Release/v1.2.0
2 parents 379ffcd + 964c571 commit 3e1cd08

File tree

11 files changed

+86
-28
lines changed

11 files changed

+86
-28
lines changed

src/InvvardDev.EZLayoutDisplay.Desktop/App.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<userSettings>
2121
<InvvardDev.EZLayoutDisplay.Desktop.Properties.Settings>
2222
<setting name="ErgodoxLayoutUrl" serializeAs="String">
23-
<value>https://configure.ergodox-ez.com/ergodox-ez/layouts/default/latest/0</value>
23+
<value>https://configure.zsa.io/ergodox-ez/layouts/default/latest/0</value>
2424
</setting>
2525
<setting name="HotkeyShowLayout" serializeAs="String">
2626
<value>{"modifiers":[0,1,2,4],"keycode":32}</value>

src/InvvardDev.EZLayoutDisplay.Desktop/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,6 @@
5151
// by using the '*' as shown below:
5252
// [assembly: AssemblyVersion("1.0.*")]
5353
[assembly: AssemblyVersion("1.0.1.0")]
54-
[assembly: AssemblyFileVersion("1.1.4")]
54+
[assembly: AssemblyFileVersion("1.2.0")]
5555
[assembly: NeutralResourcesLanguage("en-US")]
5656

src/InvvardDev.EZLayoutDisplay.Desktop/Properties/Settings.Designer.cs

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/InvvardDev.EZLayoutDisplay.Desktop/Properties/Settings.settings

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<Profiles />
44
<Settings>
55
<Setting Name="ErgodoxLayoutUrl" Type="System.String" Scope="User">
6-
<Value Profile="(Default)">https://configure.ergodox-ez.com/ergodox-ez/layouts/default/latest/0</Value>
6+
<Value Profile="(Default)">https://configure.zsa.io/ergodox-ez/layouts/default/latest/0</Value>
77
</Setting>
88
<Setting Name="HotkeyShowLayout" Type="System.String" Scope="User">
99
<Value Profile="(Default)">{"modifiers":[0,1,2,4],"keycode":32}</Value>

src/InvvardDev.EZLayoutDisplay.Desktop/Service/Design/SettingsService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class SettingsService : ISettingsService
1414
public SettingsService()
1515
{
1616
HotkeyShowLayout = new Hotkey(0x60, ModifierKeys.Alt);
17-
ErgodoxLayoutUrl = "https://configure.ergodox-ez.com/layouts/default/latest/0";
17+
ErgodoxLayoutUrl = "https://configure.zsa.io/ergodox-ez/layouts/default/latest/0";
1818
}
1919

2020
public void Save()

src/InvvardDev.EZLayoutDisplay.Desktop/Service/Implementation/LayoutService.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public class LayoutService : ILayoutService
3131
private readonly string GetLayoutInfoRequestBody =
3232
"{{\"operationName\":\"getLayout\",\"variables\":{{\"hashId\":\"{0}\",\"revisionId\":\"{1}\"}},\"query\":\"query getLayout($hashId: String!, $revisionId: String!) {{\\n Layout(hashId: $hashId, revisionId: $revisionId) {{\\n ...LayoutData\\n __typename\\n }}\\n}}\\n\\nfragment LayoutData on Layout {{\\n geometry\\n hashId\\n title\\n tags {{\\n id\\n hashId\\n name\\n }}\\n revision {{\\n hashId\\n title\\n hexUrl\\n model\\n zipUrl\\n qmkVersion\\n qmkUptodate\\n layers {{\\n position\\n title\\n }}\\n }}\\n __typename\\n}}\\n\"}}";
3333

34-
private const string GetLayoutRequestUri = "https://oryx.ergodox-ez.com/graphql";
34+
private const string GetLayoutRequestUri = "https://oryx.zsa.io/graphql";
3535

3636
#region ILayoutService implementation
3737

src/InvvardDev.EZLayoutDisplay.Desktop/View/AboutWindow.xaml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
55
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
66
mc:Ignorable="d"
7-
Title="{Binding WindowTitle}" Height="330" Width="500"
7+
Title="{Binding WindowTitle}" Height="350" Width="500"
88
ResizeMode="NoResize" Background="{StaticResource WindowBackgroundBrush}"
99
WindowStartupLocation="CenterScreen" Icon="{StaticResource WindowIcon}"
1010
DataContext="{Binding About, Source={StaticResource Locator}}">
@@ -22,6 +22,7 @@
2222
<RowDefinition/>
2323
<RowDefinition/>
2424
<RowDefinition/>
25+
<RowDefinition/>
2526
<RowDefinition Height="10"/>
2627
<RowDefinition/>
2728
</Grid.RowDefinitions>
@@ -67,7 +68,13 @@
6768
Command="{Binding NavigateRedditUrlCommand}" />
6869
</StackPanel>
6970

70-
<Button Grid.Row="8" Grid.Column="2" Content="{Binding CloseButtonLabel}"
71+
<Label Grid.Row="7" Grid.Column="1" Content="{Binding ContributorsTitleLabel}" Style="{StaticResource TitleLabelStyle}" />
72+
<StackPanel Orientation="Horizontal" Grid.Row="7" Grid.Column="2">
73+
<Button Style="{StaticResource HyperlinkStyledButton}" Content="{Binding VladZahariaLabel}"
74+
Command="{Binding NavigateGithubVZUrlCommand}" />
75+
</StackPanel>
76+
77+
<Button Grid.Row="9" Grid.Column="2" Content="{Binding CloseButtonLabel}"
7178
Command="{Binding CloseAboutCommand}"
7279
Width="100" Margin="0,5,5,5" HorizontalAlignment="Right"/>
7380
</Grid>

src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/AboutViewModel.cs

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,25 @@ public class AboutViewModel : ViewModelBase
2828
private string _projectHomeTitleLabel;
2929
private string _contactTitleLabel;
3030
private string _creatorInfoLabel;
31+
private string _contributorsLabel;
3132
private string _basedOnInfoLabel;
3233
private string _projectHomeInfoLabel;
3334
private string _twitterInfoLabel;
3435
private string _redditInfoLabel;
36+
private string _vladZahariaLabel;
3537
private string _closeButtonLabel;
3638

3739
private readonly string _basedOnUrl;
3840
private readonly string _projectHomeUrl;
3941
private readonly string _twitterUrl;
4042
private readonly string _redditUrl;
43+
private readonly string _githubVZUrl;
4144

4245
private ICommand _navigateBasedOnUrlCommand;
4346
private ICommand _navigateProjectHomeUrlCommand;
4447
private ICommand _navigateTwitterUrlCommand;
4548
private ICommand _navigateRedditUrlCommand;
49+
private ICommand _navigateGithubVZUrlCommand;
4650
private ICommand _closeAboutCommand;
4751

4852
#endregion
@@ -100,6 +104,12 @@ public string CreatorInfoLabel
100104
set => Set(ref _creatorInfoLabel, value);
101105
}
102106

107+
public string ContributorsTitleLabel
108+
{
109+
get => _contributorsLabel;
110+
set => Set(ref _contributorsLabel, value);
111+
}
112+
103113
public string BasedOnInfoLabel
104114
{
105115
get => _basedOnInfoLabel;
@@ -124,6 +134,12 @@ public string RedditInfoLabel
124134
set => Set(ref _redditInfoLabel, value);
125135
}
126136

137+
public string VladZahariaLabel
138+
{
139+
get => _vladZahariaLabel;
140+
set => Set(ref _vladZahariaLabel, value);
141+
}
142+
127143
public string CloseButtonLabel
128144
{
129145
get => _closeButtonLabel;
@@ -162,6 +178,13 @@ public string CloseButtonLabel
162178
_navigateRedditUrlCommand
163179
?? (_navigateRedditUrlCommand = new RelayCommand(NavigateRedditUrl));
164180

181+
/// <summary>
182+
/// Navigate to Vlad Zaharia Github URL command.
183+
/// </summary>
184+
public ICommand NavigateGithubVZUrlCommand =>
185+
_navigateGithubVZUrlCommand
186+
?? (_navigateGithubVZUrlCommand = new RelayCommand(NavigateGithubVZUrl));
187+
165188
/// <summary>
166189
/// Close about window command.
167190
/// </summary>
@@ -180,10 +203,11 @@ public AboutViewModel(IWindowService windowService, IProcessService processServi
180203
_windowService = windowService;
181204
_processService = processService;
182205

183-
_basedOnUrl = "https://configure.ergodox-ez.com/layouts/default/latest/0";
206+
_basedOnUrl = "https://configure.zsa.io/ergodox-ez/";
184207
_projectHomeUrl = "https://github.com/Invvard/EZLayoutDisplay";
185208
_twitterUrl = "https://twitter.com/invvard";
186209
_redditUrl = "https://www.reddit.com/r/EZLayoutDisplay/";
210+
_githubVZUrl = "https://github.com/vladzaharia";
187211

188212
SetLabelUi();
189213
}
@@ -208,6 +232,8 @@ private void SetLabelUi()
208232
ProjectHomeInfoLabel = appTitle;
209233
TwitterInfoLabel = "@Invvard";
210234
RedditInfoLabel = "r/EZLayoutDisplay";
235+
ContributorsTitleLabel = "Contributors";
236+
VladZahariaLabel = "Vlad Zaharia";
211237
CloseButtonLabel = "OK";
212238
}
213239

@@ -259,6 +285,12 @@ private void NavigateRedditUrl()
259285
_processService.StartWebUrl(_redditUrl);
260286
}
261287

288+
private void NavigateGithubVZUrl()
289+
{
290+
Logger.TraceRelayCommand();
291+
_processService.StartWebUrl(_githubVZUrl);
292+
}
293+
262294
private void CloseAboutWindow()
263295
{
264296
Logger.TraceRelayCommand();

src/InvvardDev.EZLayoutDisplay.Desktop/ViewModel/SettingsViewModel.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public class SettingsViewModel : ViewModelBase
2020
{
2121
#region Constants
2222

23-
private const string TagSearchBaseUri = "https://configure.ergodox-ez.com/{0}/search?q={1}";
23+
private const string TagSearchBaseUri = "https://configure.zsa.io/{0}/search?q={1}";
2424
private const string DefaultLatestRevisionId = "latest";
2525

2626
#endregion

src/InvvardDev.EZLayoutDisplay.Tests/ViewModel/AboutViewModelTest.cs

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ public void AboutViewModelConstructor()
2121
// Assert
2222
Assert.Equal("About EZ Layout Display", aboutViewModel.WindowTitle);
2323
Assert.Equal("EZ Layout Display", aboutViewModel.AppTitleLabel);
24-
Assert.Equal("v1.1.4", aboutViewModel.AppVersionLabel);
24+
Assert.Equal("v1.2.0", aboutViewModel.AppVersionLabel);
2525
Assert.Equal("Created by", aboutViewModel.CreatedTitleLabel);
2626
Assert.Equal("Based on", aboutViewModel.BasedOnTitleLabel);
2727
Assert.Equal("Project home", aboutViewModel.ProjectHomeTitleLabel);
@@ -31,6 +31,8 @@ public void AboutViewModelConstructor()
3131
Assert.Equal("EZ Layout Display", aboutViewModel.ProjectHomeInfoLabel);
3232
Assert.Equal("@Invvard", aboutViewModel.TwitterInfoLabel);
3333
Assert.Equal("r/EZLayoutDisplay", aboutViewModel.RedditInfoLabel);
34+
Assert.Equal("Contributors", aboutViewModel.ContributorsTitleLabel);
35+
Assert.Equal("Vlad Zaharia", aboutViewModel.VladZahariaLabel);
3436
Assert.Equal("OK", aboutViewModel.CloseButtonLabel);
3537
}
3638

@@ -54,7 +56,7 @@ [ Fact ]
5456
public void NavigateBasedOnUrl_Execute()
5557
{
5658
// Arrange
57-
var expectedUrl = "https://configure.ergodox-ez.com/layouts/default/latest/0";
59+
var expectedUrl = "https://configure.zsa.io/ergodox-ez/";
5860
var mockWindowService = new Mock<IWindowService>();
5961
var mockProcessService = new Mock<IProcessService>();
6062
mockProcessService.Setup(p => p.StartWebUrl(expectedUrl)).Verifiable();
@@ -117,5 +119,22 @@ public void NavigateRedditUrl_Execute()
117119
// Assert
118120
mockProcessService.Verify(p => p.StartWebUrl(expectedUrl));
119121
}
122+
123+
[ Fact ]
124+
public void NavigateGithubVZUrl_Execute()
125+
{
126+
// Arrange
127+
var expectedUrl = "https://github.com/vladzaharia";
128+
var mockWindowService = new Mock<IWindowService>();
129+
var mockProcessService = new Mock<IProcessService>();
130+
mockProcessService.Setup(p => p.StartWebUrl(expectedUrl)).Verifiable();
131+
132+
// Act
133+
var aboutViewModel = new AboutViewModel(mockWindowService.Object, mockProcessService.Object);
134+
aboutViewModel.NavigateGithubVZUrlCommand.Execute(null);
135+
136+
// Assert
137+
mockProcessService.Verify(p => p.StartWebUrl(expectedUrl));
138+
}
120139
}
121140
}

0 commit comments

Comments
 (0)