Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
55ca9934df | |||
efbcaa773f |
4
.github/workflows/build-release.yml
vendored
4
.github/workflows/build-release.yml
vendored
@ -53,13 +53,13 @@ jobs:
|
||||
path: ${{ github.workspace }}/artifact
|
||||
|
||||
- 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
|
||||
uses: akkuman/gitea-release-action@v1
|
||||
with:
|
||||
name: "Netphone Teams Link ${{github.ref_name}}"
|
||||
files: |-
|
||||
${{ github.workspace }}/artifact/NetphoneTeamsLink${{github.ref_name}}.zip
|
||||
${{ github.workspace }}/artifact/TeamsNetphoneLink${{github.ref_name}}.zip
|
||||
token: '${{secrets.KRJAN02_RELEASE_TOKEN}}'
|
||||
tag_name: ${{github.ref_name}}
|
51
README.md
Normal file
51
README.md
Normal file
@ -0,0 +1,51 @@
|
||||
# Teams-NetPhone Status Synchronisation
|
||||
|
||||
## Überblick
|
||||
Dieses Programm synchronisiert den Anruf- und Meeting-Status zwischen Microsoft Teams und NetPhone (SwyxIt!). Dabei werden verschiedene APIs genutzt:
|
||||
- **Microsoft Graph API**: Setzt und liest den Status von Teams.
|
||||
- **Lokale Teams Drittanbieter API**: Liest den Meeting-Status aus Teams.
|
||||
- **SwyxIt! Client SDK**: Setzt und liest den NetPhone-Anrufstatus.
|
||||
|
||||
## Funktionen
|
||||
- **Teams Meeting-/Anruf-Status wird abgerufen und zu NetPhone synchronisiert**
|
||||
- **NetPhone Anruf-Status wird zu Teams synchronisiert**
|
||||
- **Update Check und Updater für dieses Repository**
|
||||
- **Speicherung der Microsoft-Anmeldedaten mit MSAL (optional)**
|
||||
- **Abruf des Teams-Status nur über die Graph API (optional)**
|
||||
|
||||
## Voraussetzungen
|
||||
### 1. Microsoft Tenant Anwendung einrichten
|
||||
Für die Nutzung des Programms muss eine App im Microsoft 365 Tenant erstellt werden:
|
||||
|
||||
1. **Gehe zum Azure-Portal**: [https://portal.azure.com](https://portal.azure.com)
|
||||
2. **Navigiere zu "App-Registrierungen"** und erstelle eine neue Anwendung.
|
||||
3. **Vergib einen Namen** und wähle "Konten in diesem Organisationsverzeichnis".
|
||||
4. **API-Berechtigungen setzen**:
|
||||
- Füge die Berechtigung `Presence.ReadWrite` unter Microsoft Graph hinzu.
|
||||
- Erteile Administratorzustimmung für diese Berechtigung.
|
||||
5. **Plattformkonfiguration anpassen**:
|
||||
- Gehe zu **"Authentifizierung"**.
|
||||
- Unter "Plattformen" wähle **"Mobilgerät- und Desktopanwendungen"**.
|
||||
- Füge die folgenden **Umleitungs-URIs** hinzu:
|
||||
```
|
||||
ms-appx-web://Microsoft.AAD.BrokerPlugin/<App-ID>
|
||||
msal<App-ID>://auth
|
||||
http://localhost
|
||||
```
|
||||
6. **App-ID und Tenant-ID speichern**, diese werden später im Programm benötigt.
|
||||
|
||||
### 2. Teams Drittanbieter API aktivieren
|
||||
Um den Meeting-Status von Teams lokal abzurufen, muss die Teams Drittanbieter API aktiviert sein:
|
||||
- Anleitung: [Microsoft Support](https://support.microsoft.com/de-de/office/herstellen-einer-verbindung-mit-drittanbieterger%C3%A4ten-in-microsoft-teams-aabca9f2-47bb-407f-9f9b-81a104a883d6)
|
||||
|
||||
## Technische Details
|
||||
- **Graph API** wird genutzt, um den Status in Teams zu setzen.
|
||||
- **Lokale Teams Drittanbieter API** wird genutzt, um den Meeting-Status abzurufen.
|
||||
- **SwyxIt! Client SDK** wird genutzt, um den NetPhone-Anrufstatus abzurufen und dort den Status zu setzen.
|
||||
|
||||
## Installation & Nutzung
|
||||
1. **Konfiguriere die App in M365 gemäß den oben beschriebenen Schritten.**
|
||||
2. **Installiere und starte das Programm.**
|
||||
3. **Hinterlege die App-ID und Tenant-ID in den Programmeinstellungen.**
|
||||
4. **Synchronisation startet automatisch basierend auf den Statusänderungen in Teams und NetPhone.**
|
||||
|
@ -1,16 +1,6 @@
|
||||
using Azure.Identity.Broker;
|
||||
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.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Interop;
|
||||
using System.Windows.Media;
|
||||
using TeamsNetphoneLink.WPF;
|
||||
using TeamsNetphoneLink.WPF.MVVM;
|
||||
|
||||
namespace TeamsNetphoneLink
|
||||
|
@ -74,6 +74,9 @@
|
||||
<Setter Property="Height" Value="32"/>
|
||||
<Setter Property="FontSize" Value="12"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||
<Setter Property="IsHitTestVisible" Value="False"/>
|
||||
<Setter Property="Focusable" Value="False"/>
|
||||
<Setter Property="HorizontalContentAlignment" Value="Left"/>
|
||||
</Style>
|
||||
</Window.Resources>
|
||||
|
||||
@ -92,7 +95,7 @@
|
||||
<!-- Header -->
|
||||
<StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center" Margin="0,15">
|
||||
<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"/>
|
||||
</Border>
|
||||
</StackPanel>
|
||||
@ -171,12 +174,18 @@
|
||||
FontWeight="Bold"
|
||||
Foreground="White"
|
||||
Margin="15,10"/>
|
||||
|
||||
|
||||
<ListView x:Name="Log" Grid.Row="1"
|
||||
ItemsSource="{Binding LogEntries}"
|
||||
Margin="10,0,10,10"
|
||||
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>
|
||||
<GridView>
|
||||
<GridViewColumn Width="80" Header="Time">
|
||||
@ -224,6 +233,9 @@
|
||||
<DataTrigger Binding="{Binding Subsystem}" Value="TeamsLocalAPI">
|
||||
<Setter Property="Foreground" Value="#4E5FBF"/>
|
||||
</DataTrigger>
|
||||
<DataTrigger Binding="{Binding Subsystem}" Value="Syncronisation">
|
||||
<Setter Property="Foreground" Value="#5ed602"/>
|
||||
</DataTrigger>
|
||||
</Style.Triggers>
|
||||
</Style>
|
||||
</TextBlock.Style>
|
||||
@ -232,7 +244,7 @@
|
||||
</GridViewColumn.CellTemplate>
|
||||
</GridViewColumn>
|
||||
|
||||
<GridViewColumn Width="Auto" Header="Message"
|
||||
<GridViewColumn Width="475" Header="Message"
|
||||
DisplayMemberBinding="{Binding Message}"/>
|
||||
</GridView>
|
||||
</ListView.View>
|
||||
@ -256,8 +268,8 @@
|
||||
<TextBlock Text="Entwickelt von Jan Krampitz"
|
||||
VerticalAlignment="Center"
|
||||
Foreground="White"
|
||||
FontSize="10"
|
||||
Margin="15,0"/>
|
||||
FontSize="14"
|
||||
Margin="15,0" MouseDown="Credit_MouseDown"/>
|
||||
</StackPanel>
|
||||
</Grid>
|
||||
</Window>
|
@ -1,6 +1,8 @@
|
||||
using System.Windows;
|
||||
using System.Diagnostics;
|
||||
using System.Windows;
|
||||
using System.Windows.Controls;
|
||||
using System.Windows.Input;
|
||||
using System.Windows.Media;
|
||||
using TeamsNetphoneLink.WPF.MVVM;
|
||||
|
||||
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;
|
||||
GridView _GridView = _ListView.View as GridView;
|
||||
var _ActualWidth = _ListView.ActualWidth - SystemParameters.VerticalScrollBarWidth;
|
||||
for (Int32 i = 1; i < _GridView.Columns.Count; i++)
|
||||
if(UpdateCheck.UpdateAvailable)
|
||||
{
|
||||
_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 });
|
||||
}
|
||||
}
|
||||
}
|
@ -116,7 +116,7 @@ namespace TeamsNetphoneLink.WPF
|
||||
UpdateProgress.Value = 0;
|
||||
|
||||
// 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();
|
||||
tempZipPath = tempZipPath + ".TEAMSNETPHONEUPDATE";
|
||||
Console.WriteLine(tempZipPath);
|
||||
@ -182,7 +182,7 @@ namespace TeamsNetphoneLink.WPF
|
||||
foreach (JsonElement asset in assets.EnumerateArray())
|
||||
{
|
||||
string name = asset.GetProperty("name").GetString();
|
||||
if (name == $"NetphoneTeamsLink{_latestVersion}.zip")
|
||||
if (name == $"TeamsNetphoneLink{_latestVersion}.zip")
|
||||
{
|
||||
long size = asset.GetProperty("size").GetInt64();
|
||||
return size;
|
||||
|
Loading…
Reference in New Issue
Block a user