Skip to content

Commit e9cf39a

Browse files
committed
Minor styling
2 parents ce39297 + e9e45f9 commit e9cf39a

18 files changed

+394
-57
lines changed

README.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,17 @@ You can manually refresh the view by clicking the refresh icon in the toolbar:
3939

4040
![image](https://github.com/timheuer/GitHubActionsVS/assets/4821/865d424d-29e1-40e8-96c4-1eeffb458682)
4141

42-
### Edit GitHub secrets (Coming soon...)
42+
### Edit GitHub secrets
43+
The limitation currently is this lists and enables editing of Repository-level secrets (not org or deployment environments yet).
44+
45+
To add a secret right-click on the Repository Secrets node and select `Add Secret`
46+
47+
![image](https://github.com/timheuer/GitHubActionsVS/assets/4821/264acf44-509b-4442-a9b9-80f93ff5cad5)
48+
49+
This will launch a modal dialog to add the repository secret. This is the same for edit (right-click on an existing secret) which will enable you to edit an existing one or delete.
50+
51+
![image](https://github.com/timheuer/GitHubActionsVS/assets/4821/ba12fe8b-9f33-46b7-a4a4-1ae343a0ce34)
4352

44-
Update or Add repo secrets directly from within Visual Studio.
4553

4654
## Contributors
4755

src/Converters/ConclusionColorConverter.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ public object ConvertBack(object value, Type targetType, object parameter, Cultu
2222
"success" => new SolidColorBrush(Colors.Green),
2323
"failure" => new SolidColorBrush(Colors.Red),
2424
"startup_failure" => new SolidColorBrush(Colors.Red),
25+
"waiting" => new SolidColorBrush(Color.FromRgb(154, 103, 0)),
2526
_ => new SolidColorBrush(Colors.Black),
2627
};
2728
}
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
using System.Globalization;
2+
using System.Windows;
3+
using System.Windows.Data;
4+
5+
namespace GitHubActionsVS.Converters;
6+
public class NullToVisibilityConverter : IValueConverter
7+
{
8+
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
9+
{
10+
return value == null ? Visibility.Hidden: Visibility.Visible;
11+
}
12+
13+
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
14+
{
15+
throw new NotImplementedException();
16+
}
17+
}

src/GitHubActionsVS.csproj

Lines changed: 20 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,11 @@
4949
<Compile Include="Commands\RefreshRepoCommand.cs" />
5050
<Compile Include="Converters\ConclusionColorConverter.cs" />
5151
<Compile Include="Converters\ConclusionIconConverter.cs" />
52+
<Compile Include="Converters\NullToVisibilityConverter.cs" />
5253
<Compile Include="Helpers\CredentialManager.cs" />
5354
<Compile Include="Helpers\RepoInfo.cs" />
5455
<Compile Include="Models\BaseWorkflowType.cs" />
56+
<Compile Include="Models\SimpleEnvironment.cs" />
5557
<Compile Include="Models\SimpleJob.cs" />
5658
<Compile Include="Models\SimpleRun.cs" />
5759
<Compile Include="Options\ExtensionOptions.cs" />
@@ -65,13 +67,21 @@
6567
<Compile Include="ToolWindows\MessagePayload.cs" />
6668
<Compile Include="ToolWindows\MessageCommand.cs" />
6769
<Compile Include="ToolWindows\ToolWindowMessenger.cs" />
70+
<Compile Include="UserControls\AddEditSecret.xaml.cs">
71+
<DependentUpon>AddEditSecret.xaml</DependentUpon>
72+
</Compile>
6873
<Compile Include="VSCommandTable.cs">
6974
<AutoGen>True</AutoGen>
7075
<DesignTime>True</DesignTime>
7176
<DependentUpon>VSCommandTable.vsct</DependentUpon>
7277
</Compile>
7378
</ItemGroup>
7479
<ItemGroup>
80+
<Content Include="libsodium.dll">
81+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
82+
<IncludeInVSIX>true</IncludeInVSIX>
83+
</Content>
84+
<Resource Include="Resources\OpenWebSite.png" />
7585
<Resource Include="Resources\codicon.ttf" />
7686
<Content Include="LICENSE">
7787
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
@@ -81,18 +91,13 @@
8191
<SubType>Designer</SubType>
8292
<Generator>VsixManifestGenerator</Generator>
8393
</None>
84-
<Content Include="lib\win32\arm64\git2-e632535.dll">
85-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
86-
<IncludeInVSIX>true</IncludeInVSIX>
87-
</Content>
8894
<Content Include="lib\win32\x64\git2-e632535.dll">
8995
<IncludeInVSIX>true</IncludeInVSIX>
9096
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
9197
</Content>
92-
<Content Include="lib\win32\x86\git2-e632535.dll">
93-
<IncludeInVSIX>true</IncludeInVSIX>
94-
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
95-
</Content>
98+
<Resource Include="Resources\AddItem.png" />
99+
<Resource Include="Resources\Delete.png" />
100+
<Resource Include="Resources\Edit.png" />
96101
<Content Include="Resources\Icon.png">
97102
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
98103
<IncludeInVSIX>true</IncludeInVSIX>
@@ -111,6 +116,10 @@
111116
<SubType>Designer</SubType>
112117
<Generator>MSBuild:Compile</Generator>
113118
</Page>
119+
<Page Include="UserControls\AddEditSecret.xaml">
120+
<SubType>Designer</SubType>
121+
<Generator>MSBuild:Compile</Generator>
122+
</Page>
114123
</ItemGroup>
115124
<ItemGroup>
116125
<Reference Include="System" />
@@ -150,6 +159,9 @@
150159
<PackageReference Include="Octokit">
151160
<Version>7.0.1</Version>
152161
</PackageReference>
162+
<PackageReference Include="Sodium.Core">
163+
<Version>1.3.3</Version>
164+
</PackageReference>
153165
</ItemGroup>
154166
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
155167
<Import Project="$(VSToolsPath)\VSSDK\Microsoft.VsSDK.targets" Condition="'$(VSToolsPath)' != ''" />

src/Models/SimpleEnvironment.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
using System.Collections.Generic;
2+
3+
namespace GitHubActionsVS.Models;
4+
public class SimpleEnvironment
5+
{
6+
public string Name { get; set; }
7+
public string Url { get; set; }
8+
}
9+
10+

src/Options/ExtensionOptions.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,16 @@ public class ExtensionOptions : BaseOptionModel<ExtensionOptions>
1717
[Description("The maximum number of runs to retrieve")]
1818
[DefaultValue(10)]
1919
public int MaxRuns { get; set; } = 10;
20+
21+
[Category("Query Settings")]
22+
[DisplayName("Refresh Active Jobs")]
23+
[Description("Whether to poll/refresh when pending/active jobs are going")]
24+
[DefaultValue(false)]
25+
public bool RefreshActiveJobs { get; set; } = false;
26+
27+
[Category("Query Settings")]
28+
[DisplayName("Refresh Interval (in seconds)")]
29+
[Description("The interval (in seconds) to poll/refresh when pending/active jobs are going")]
30+
[DefaultValue(5)]
31+
public int RefreshInterval { get; set; } = 5;
2032
}

src/Properties/AssemblyInfo.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
[assembly: ComVisible(false)]
1515

1616
[assembly: ProvideCodeBase(CodeBase = @"$PackageFolder$\LibGit2Sharp.dll")]
17+
[assembly: ProvideCodeBase(CodeBase = @"$PackageFolder$\Sodium.Core.dll")]
1718

1819
namespace System.Runtime.CompilerServices;
1920
public class IsExternalInit { }

src/Resources/AddItem.png

271 Bytes
Loading

src/Resources/Delete.png

291 Bytes
Loading

src/Resources/Edit.png

643 Bytes
Loading

0 commit comments

Comments
 (0)