diff --git a/src/Converters/NullToVisibilityConverter.cs b/src/Converters/NullToVisibilityConverter.cs
new file mode 100644
index 0000000..87a1d69
--- /dev/null
+++ b/src/Converters/NullToVisibilityConverter.cs
@@ -0,0 +1,17 @@
+using System.Globalization;
+using System.Windows;
+using System.Windows.Data;
+
+namespace GitHubActionsVS.Converters;
+public class NullToVisibilityConverter : IValueConverter
+{
+ public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ return value == null ? Visibility.Hidden: Visibility.Visible;
+ }
+
+ public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
+ {
+ throw new NotImplementedException();
+ }
+}
diff --git a/src/GitHubActionsVS.csproj b/src/GitHubActionsVS.csproj
index ac42425..5bca954 100644
--- a/src/GitHubActionsVS.csproj
+++ b/src/GitHubActionsVS.csproj
@@ -49,6 +49,7 @@
+
@@ -80,6 +81,7 @@
Always
true
+
Always
@@ -93,10 +95,12 @@
true
Always
-
+
+
+
+
PreserveNewest
- true
-
+
diff --git a/src/Resources/AddItem.png b/src/Resources/AddItem.png
new file mode 100644
index 0000000..67b0658
Binary files /dev/null and b/src/Resources/AddItem.png differ
diff --git a/src/Resources/Delete.png b/src/Resources/Delete.png
new file mode 100644
index 0000000..1c63353
Binary files /dev/null and b/src/Resources/Delete.png differ
diff --git a/src/Resources/Edit.png b/src/Resources/Edit.png
new file mode 100644
index 0000000..0fdfdfa
Binary files /dev/null and b/src/Resources/Edit.png differ
diff --git a/src/Resources/OpenWebSite.png b/src/Resources/OpenWebSite.png
new file mode 100644
index 0000000..830c775
Binary files /dev/null and b/src/Resources/OpenWebSite.png differ
diff --git a/src/ToolWindows/GHActionsToolWindow.xaml b/src/ToolWindows/GHActionsToolWindow.xaml
index 1b9aef8..599e199 100644
--- a/src/ToolWindows/GHActionsToolWindow.xaml
+++ b/src/ToolWindows/GHActionsToolWindow.xaml
@@ -19,6 +19,7 @@
pack://application:,,,/GitHubActionsVS;component/Resources/#codicon
+
@@ -35,7 +36,11 @@
-
+
@@ -45,7 +50,17 @@
-
+
+
+
+
+
+
+
@@ -75,8 +90,16 @@
-
-
+
+
diff --git a/src/ToolWindows/GHActionsToolWindow.xaml.cs b/src/ToolWindows/GHActionsToolWindow.xaml.cs
index aea0d7b..78c71a1 100644
--- a/src/ToolWindows/GHActionsToolWindow.xaml.cs
+++ b/src/ToolWindows/GHActionsToolWindow.xaml.cs
@@ -333,7 +333,7 @@ private async void EditSecret_Click(object sender, RoutedEventArgs e)
{
MenuItem menuItem = (MenuItem)sender;
TextBlock tvi = GetParentTreeViewItem(menuItem);
- if (tvi is not null)
+ if (tvi is not null && tvi.Text.ToLowerInvariant() != "no repository secrets defined") // yes a hack
{
string header = tvi.Text.ToString();
string secretName = header.Substring(0, header.IndexOf(" ("));
@@ -360,7 +360,7 @@ private async void DeleteSecret_Click(object sender, RoutedEventArgs e)
MenuItem menuItem = (MenuItem)sender;
TextBlock tvi = GetParentTreeViewItem(menuItem);
- if (tvi is not null)
+ if (tvi is not null && tvi.Text.ToLowerInvariant() != "no repository secrets defined") // yes a hack
{
await ThreadHelper.JoinableTaskFactory.SwitchToMainThreadAsync();
// confirm the delete first
@@ -405,5 +405,18 @@ private async Task UpsertRepositorySecret(string secretName)
await RefreshSecretsAsync(client);
}
}
+
+ private void ViewLog_Click(object sender, RoutedEventArgs e)
+ {
+ MenuItem menuItem = (MenuItem)sender;
+ TextBlock tvi = GetParentTreeViewItem(menuItem);
+
+ // check the tag value to ensure it isn't null
+ if (tvi is not null && tvi.Tag is not null)
+ {
+ string logUrl = tvi.Tag.ToString();
+ Process.Start(logUrl);
+ }
+ }
}