changed release archive name / fixed log scrollbar
All checks were successful
Build and Relase / build-release (push) Successful in 1m22s
Build and Relase / create-release (push) Successful in 38s

This commit is contained in:
krjan02 2025-03-26 17:25:10 +01:00
parent efbcaa773f
commit 55ca9934df
5 changed files with 38 additions and 29 deletions

View File

@ -53,13 +53,13 @@ jobs:
path: ${{ github.workspace }}/artifact path: ${{ github.workspace }}/artifact
- name: Archive Release - name: Archive Release
run: (cd ${{ github.workspace }}/artifact && zip -r ${{ github.workspace }}/artifact/NetphoneTeamsLink${{github.ref_name}}.zip .) run: (cd ${{ github.workspace }}/artifact && zip -r ${{ github.workspace }}/artifact/TeamsNetphoneLink${{github.ref_name}}.zip .)
- name: Release - name: Release
uses: akkuman/gitea-release-action@v1 uses: akkuman/gitea-release-action@v1
with: with:
name: "Netphone Teams Link ${{github.ref_name}}" name: "Netphone Teams Link ${{github.ref_name}}"
files: |- files: |-
${{ github.workspace }}/artifact/NetphoneTeamsLink${{github.ref_name}}.zip ${{ github.workspace }}/artifact/TeamsNetphoneLink${{github.ref_name}}.zip
token: '${{secrets.KRJAN02_RELEASE_TOKEN}}' token: '${{secrets.KRJAN02_RELEASE_TOKEN}}'
tag_name: ${{github.ref_name}} tag_name: ${{github.ref_name}}

View File

@ -1,16 +1,6 @@
using Azure.Identity.Broker; using System.Runtime.InteropServices;
using Microsoft.Identity.Client;
using Microsoft.Identity.Client.NativeInterop;
using System;
using System.Configuration;
using System.Data;
using System.Printing;
using System.Reflection;
using System.Runtime.InteropServices;
using System.Windows; using System.Windows;
using System.Windows.Interop;
using System.Windows.Media; using System.Windows.Media;
using TeamsNetphoneLink.WPF;
using TeamsNetphoneLink.WPF.MVVM; using TeamsNetphoneLink.WPF.MVVM;
namespace TeamsNetphoneLink namespace TeamsNetphoneLink

View File

@ -74,6 +74,9 @@
<Setter Property="Height" Value="32"/> <Setter Property="Height" Value="32"/>
<Setter Property="FontSize" Value="12"/> <Setter Property="FontSize" Value="12"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/> <Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="IsHitTestVisible" Value="False"/>
<Setter Property="Focusable" Value="False"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
</Style> </Style>
</Window.Resources> </Window.Resources>
@ -92,7 +95,7 @@
<!-- Header --> <!-- Header -->
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,15"> <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,15">
<TextBlock FontSize="24" FontWeight="Bold" Text="{Binding AppTitle2}" Foreground="White"/> <TextBlock FontSize="24" FontWeight="Bold" Text="{Binding AppTitle2}" Foreground="White"/>
<Border Visibility="{Binding VersionVisibility}" Background="{Binding VersionBackground}" CornerRadius="12" Padding="12,4" Margin="15,0"> <Border Visibility="{Binding VersionVisibility}" Background="{Binding VersionBackground}" CornerRadius="12" Padding="12,4" Margin="15,0" MouseDown="VersionBorder_MouseDown">
<TextBlock Text="{Binding VersionText}" Foreground="White" FontSize="16"/> <TextBlock Text="{Binding VersionText}" Foreground="White" FontSize="16"/>
</Border> </Border>
</StackPanel> </StackPanel>
@ -171,12 +174,18 @@
FontWeight="Bold" FontWeight="Bold"
Foreground="White" Foreground="White"
Margin="15,10"/> Margin="15,10"/>
<ListView x:Name="Log" Grid.Row="1" <ListView x:Name="Log" Grid.Row="1"
ItemsSource="{Binding LogEntries}" ItemsSource="{Binding LogEntries}"
Margin="10,0,10,10" Margin="10,0,10,10"
VirtualizingPanel.IsVirtualizing="True" VirtualizingPanel.IsVirtualizing="True"
IsHitTestVisible="False"> >
<ListView.ItemContainerStyle>
<Style TargetType="{x:Type ListViewItem}">
<Setter Property="Focusable" Value="False"/>
<Setter Property="IsHitTestVisible" Value="False"/>
</Style>
</ListView.ItemContainerStyle>
<ListView.View> <ListView.View>
<GridView> <GridView>
<GridViewColumn Width="80" Header="Time"> <GridViewColumn Width="80" Header="Time">
@ -224,6 +233,9 @@
<DataTrigger Binding="{Binding Subsystem}" Value="TeamsLocalAPI"> <DataTrigger Binding="{Binding Subsystem}" Value="TeamsLocalAPI">
<Setter Property="Foreground" Value="#4E5FBF"/> <Setter Property="Foreground" Value="#4E5FBF"/>
</DataTrigger> </DataTrigger>
<DataTrigger Binding="{Binding Subsystem}" Value="Syncronisation">
<Setter Property="Foreground" Value="#5ed602"/>
</DataTrigger>
</Style.Triggers> </Style.Triggers>
</Style> </Style>
</TextBlock.Style> </TextBlock.Style>
@ -232,7 +244,7 @@
</GridViewColumn.CellTemplate> </GridViewColumn.CellTemplate>
</GridViewColumn> </GridViewColumn>
<GridViewColumn Width="Auto" Header="Message" <GridViewColumn Width="475" Header="Message"
DisplayMemberBinding="{Binding Message}"/> DisplayMemberBinding="{Binding Message}"/>
</GridView> </GridView>
</ListView.View> </ListView.View>
@ -256,8 +268,8 @@
<TextBlock Text="Entwickelt von Jan Krampitz" <TextBlock Text="Entwickelt von Jan Krampitz"
VerticalAlignment="Center" VerticalAlignment="Center"
Foreground="White" Foreground="White"
FontSize="10" FontSize="14"
Margin="15,0"/> Margin="15,0" MouseDown="Credit_MouseDown"/>
</StackPanel> </StackPanel>
</Grid> </Grid>
</Window> </Window>

View File

@ -1,6 +1,8 @@
using System.Windows; using System.Diagnostics;
using System.Windows;
using System.Windows.Controls; using System.Windows.Controls;
using System.Windows.Input; using System.Windows.Input;
using System.Windows.Media;
using TeamsNetphoneLink.WPF.MVVM; using TeamsNetphoneLink.WPF.MVVM;
namespace TeamsNetphoneLink.WPF namespace TeamsNetphoneLink.WPF
@ -80,16 +82,21 @@ namespace TeamsNetphoneLink.WPF
} }
} }
private void LogListView_UpdateColumnsWidth(object sender, SizeChangedEventArgs e) private void VersionBorder_MouseDown(object sender, MouseButtonEventArgs e)
{ {
ListView _ListView = sender as ListView; if(UpdateCheck.UpdateAvailable)
GridView _GridView = _ListView.View as GridView;
var _ActualWidth = _ListView.ActualWidth - SystemParameters.VerticalScrollBarWidth;
for (Int32 i = 1; i < _GridView.Columns.Count; i++)
{ {
_ActualWidth = _ActualWidth - _GridView.Columns[i].ActualWidth; var latestTag = UpdateCheck.GetLatestReleaseTagAsync().GetAwaiter().GetResult();
var currentTag = UpdateCheck.GetCurrentVersion();
// Erstellen und Anzeigen des Update-Fensters
var updateWindow = new WPF.UpdateWindow(currentTag, latestTag);
updateWindow.ShowDialog();
} }
_GridView.Columns[0].Width = _ActualWidth; }
private void Credit_MouseDown(object sender, MouseButtonEventArgs e)
{
Process.Start(new ProcessStartInfo("https://jan.sx") { UseShellExecute = true });
} }
} }
} }

View File

@ -116,7 +116,7 @@ namespace TeamsNetphoneLink.WPF
UpdateProgress.Value = 0; UpdateProgress.Value = 0;
// Step 2: Download the new release // Step 2: Download the new release
string downloadUrl = $"https://git.jan.sx/krjan02/TeamsNetphoneLink/releases/download/latest/NetphoneTeamsLink{_latestVersion}.zip"; string downloadUrl = $"https://git.jan.sx/krjan02/TeamsNetphoneLink/releases/download/latest/TeamsNetphoneLink{_latestVersion}.zip";
var tempZipPath = Path.GetTempFileName(); var tempZipPath = Path.GetTempFileName();
tempZipPath = tempZipPath + ".TEAMSNETPHONEUPDATE"; tempZipPath = tempZipPath + ".TEAMSNETPHONEUPDATE";
Console.WriteLine(tempZipPath); Console.WriteLine(tempZipPath);
@ -182,7 +182,7 @@ namespace TeamsNetphoneLink.WPF
foreach (JsonElement asset in assets.EnumerateArray()) foreach (JsonElement asset in assets.EnumerateArray())
{ {
string name = asset.GetProperty("name").GetString(); string name = asset.GetProperty("name").GetString();
if (name == $"NetphoneTeamsLink{_latestVersion}.zip") if (name == $"TeamsNetphoneLink{_latestVersion}.zip")
{ {
long size = asset.GetProperty("size").GetInt64(); long size = asset.GetProperty("size").GetInt64();
return size; return size;