Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,19 @@ Alle nennenswerten Änderungen an SyncDrive. Format nach [Keep a Changelog](http
Korrekturen heben PATCH. Die Version steht an einer Stelle (`04-umsetzung/Directory.Build.props`); ein Test prüft, dass sie mit dem obersten
Eintrag hier übereinstimmt. Jede Version bekommt ein Git-Tag `vX.Y.Z`. Die Versionen 0.1.0 bis 0.11.0 wurden nachträglich vergeben.

## [0.39.2] – 2026-10-23 – Mac: Panel wie unter Windows

### Geändert
- Mac-Vorschau: Ein Klick auf das Symbol in der Menüleiste öffnet jetzt das **Panel wie unter Windows** (Status, Zuletzt geändert,
Benachrichtigungen, Schnellzugriffe) unter der Menüleiste, statt nur ein Menü zu zeigen. Pause, Fehlersuche und Beenden stehen im
neuen „⋯“-Knopf der Fußleiste (nur auf dem Mac; unter Windows bleibt das Rechtsklick-Menü).

### Behoben
- Mac: Aus dem geöffneten Disk-Image gestartet, legte die App einen Autostart auf das Disk-Image an, der nach dem Auswerfen ins Leere
lief. Jetzt nur noch aus „Programme“; beim Start aus dem Disk-Image erscheint ein Hinweis, die App in „Programme“ zu ziehen.
- Test auf dem Mac-Runner: Vom Sync geschriebene Dateien sind im Finder normal (nicht versteckt, lesbar, kein „in Arbeit“-Datum,
keine Zusatzattribute).

## [0.39.1] – 2026-10-23 – Mac: kein „On-Demand braucht NTFS“ mehr

### Behoben
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PropertyGroup>
<!-- Einzige Quelle der Produktversion (Semantic Versioning, siehe ../CHANGELOG.md). Vor 1.0.0 darf sich das Protokoll noch ändern.
Jeder Meilenstein hebt MINOR, reine Korrekturen PATCH; dazu ein Eintrag im CHANGELOG und ein Git-Tag vX.Y.Z. -->
<Version>0.39.1</Version>
<Version>0.39.2</Version>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
<LangVersion>latest</LangVersion>
Expand Down
6 changes: 5 additions & 1 deletion src/SyncDrive.Client.Daemon/LocalEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,13 @@ public sealed class MacLaunchAgent(string executable, string? launchAgents = nul
public string PlistPath { get; } = Path.Combine(
launchAgents ?? Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile), "Library", "LaunchAgents"), Label + ".plist");

/// <summary>Aus dem geöffneten Disk-Image gestartet (<c>/Volumes/…</c>): der Pfad verschwindet beim Auswerfen.</summary>
public static bool RunsFromDiskImage(string executable) => executable.StartsWith("/Volumes/", StringComparison.Ordinal);

public void Apply(bool enabled)
{
if (!enabled)
// Ein Autostart auf das Disk-Image liefe nach dem Auswerfen ins Leere; erst aus „Programme“ heraus anlegen
if (!enabled || RunsFromDiskImage(executable))
{
File.Delete(PlistPath);
return;
Expand Down
1 change: 1 addition & 0 deletions src/SyncDrive.Client.Tray/App.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
<StreamGeometry x:Key="IconFolder">M3.5 4H9L11 6H20.5A1.5 1.5 0 0 1 22 7.5V18.5A1.5 1.5 0 0 1 20.5 20H3.5A1.5 1.5 0 0 1 2 18.5V5.5A1.5 1.5 0 0 1 3.5 4Z</StreamGeometry>
<StreamGeometry x:Key="IconMenu">M3 4.9H21V7.3H3Z M3 10.8H21V13.2H3Z M3 16.7H21V19.1H3Z</StreamGeometry>
<StreamGeometry x:Key="IconHelp">M12 2A10 10 0 1 1 12 22A10 10 0 1 1 12 2Z M12 4.2A7.8 7.8 0 1 0 12 19.8A7.8 7.8 0 1 0 12 4.2Z M10.8 15.8H13.2V18.2H10.8Z M8.6 9.4A3.4 3.4 0 1 1 13.6 12.4C12.9 12.8 13.1 13.2 13.1 14.4H10.9C10.9 12.6 11.1 11.9 12.4 11.1A1.3 1.3 0 1 0 10.7 9.4Z</StreamGeometry>
<StreamGeometry x:Key="IconMore">M3.5 12A2.5 2.5 0 1 1 8.5 12A2.5 2.5 0 1 1 3.5 12Z M9.5 12A2.5 2.5 0 1 1 14.5 12A2.5 2.5 0 1 1 9.5 12Z M15.5 12A2.5 2.5 0 1 1 20.5 12A2.5 2.5 0 1 1 15.5 12Z</StreamGeometry>
<SolidColorBrush x:Key="FolderFill" Color="#F2B84B" /> <!-- filetype-folder -->
<StreamGeometry x:Key="IconSettings">M19.55 12.86L22.02 14.4 20.78 17.38 17.95 16.73 16.73 17.95 17.38 20.78 14.4 22.02 12.86 19.55 11.14 19.55 9.6 22.02 6.62 20.78 7.27 17.95 6.05 16.73 3.22 17.38 1.98 14.4 4.45 12.86 4.45 11.14 1.98 9.6 3.22 6.62 6.05 7.27 7.27 6.05 6.62 3.22 9.6 1.98 11.14 4.45 12.86 4.45 14.4 1.98 17.38 3.22 16.73 6.05 17.95 7.27 20.78 6.62 22.02 9.6 19.55 11.14Z M15.3 12A3.3 3.3 0 1 0 8.7 12A3.3 3.3 0 1 0 15.3 12Z</StreamGeometry>
</Application.Resources>
Expand Down
10 changes: 9 additions & 1 deletion src/SyncDrive.Client.Tray/App.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,12 @@ private static async Task OpenStartAsync(ShellViewModel shell, WindowManager win
{
windows.OpenMainWindow(MainPage.SyncTasks);
}

// macOS: direkt aus dem Disk-Image gestartet – dort fehlt SyncDrive in „Programme“, und der Autostart bliebe aus
if (OperatingSystem.IsMacOS() && SyncDrive.Client.Daemon.MacLaunchAgent.RunsFromDiskImage(AppContext.BaseDirectory))
{
_ = windows.ShowMessageAsync(shell.Texts.MoveToApplications);
}
});
}

Expand All @@ -114,7 +120,9 @@ private void SetUpTray(ShellViewModel shell, WindowManager windows, Texts texts)
var troubleshoot = new NativeMenuItem(texts.MenuTroubleshoot) { Command = shell.TroubleshootCommand };
var exit = new NativeMenuItem(texts.MenuExit) { Command = shell.ExitCommand };
var menu = new NativeMenu { pause, settings, new NativeMenuItemSeparator(), about, troubleshoot, new NativeMenuItemSeparator(), exit };
var tray = new TrayIcon { Menu = menu, ToolTipText = shell.Tooltip, IsVisible = true };
// macOS zeigt bei einem Menü am Symbol nur das Menü und meldet keinen Klick: dort öffnet der Klick das Panel wie unter Windows,
// Pause, Info, Fehlersuche und Beenden stehen im „⋯“-Menü des Panels.
var tray = new TrayIcon { Menu = OperatingSystem.IsMacOS() ? null : menu, ToolTipText = shell.Tooltip, IsVisible = true };
tray.Clicked += (_, _) => windows.TogglePanel();
MacOSProperties.SetIsTemplateIcon(tray, true); // nur macOS: Vorlagenbild, hell oder dunkel wie die Menüleiste
TrayIcon.SetIcons(this, [tray]);
Expand Down
12 changes: 12 additions & 0 deletions src/SyncDrive.Client.Tray/Views/PanelWindow.axaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@
<Button Classes="tool" ToolTip.Tip="{Binding Texts.MenuAbout}" Command="{Binding HelpCommand}">
<PathIcon Classes="tool-icon" Data="{StaticResource IconHelp}" />
</Button>
<!-- macOS: kein Rechtsklick-Menü am Symbol, daher hier -->
<Button Classes="tool" IsVisible="{Binding ShowMoreMenu}" ToolTip.Tip="{Binding Texts.More}">
<PathIcon Classes="tool-icon" Data="{StaticResource IconMore}" />
<Button.Flyout>
<MenuFlyout Placement="TopEdgeAlignedRight">
<MenuItem Header="{Binding Shell.PauseMenuText}" Command="{Binding Shell.TogglePauseCommand}" />
<MenuItem Header="{Binding Texts.MenuTroubleshoot}" Command="{Binding Shell.TroubleshootCommand}" />
<Separator />
<MenuItem Header="{Binding Texts.MenuExit}" Command="{Binding Shell.ExitCommand}" />
</MenuFlyout>
</Button.Flyout>
</Button>
</StackPanel>
</Border>

Expand Down
3 changes: 2 additions & 1 deletion src/SyncDrive.Client.Tray/Views/PanelWindow.axaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,10 @@ public void ShowNearTray(PanelViewModel viewModel)
{
var area = screen.WorkingArea;
var scale = screen.Scaling;
// Windows: über der Taskleiste unten rechts; macOS: unter der Menüleiste oben rechts, dort sitzt das Symbol
Position = new PixelPoint(
area.Right - (int)(Width * scale) - (int)(12 * scale),
area.Bottom - (int)(Height * scale) - (int)(12 * scale));
OperatingSystem.IsMacOS() ? area.Y + (int)(6 * scale) : area.Bottom - (int)(Height * scale) - (int)(12 * scale));
}

Show();
Expand Down
3 changes: 3 additions & 0 deletions src/SyncDrive.Client.Ui/ShellViewModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,9 @@ public PanelViewModel(ShellViewModel shell, IUiServices ui, Texts texts, TimePro

public bool ShowNotifications => !ShowRecent;

/// <summary>„⋯“ mit Pause, Fehlersuche, Beenden: unter macOS, wo das Symbol in der Menüleiste kein eigenes Menü hat.</summary>
public bool ShowMoreMenu { get; init; } = OperatingSystem.IsMacOS();

public ObservableCollection<ActivityItemViewModel> Recent { get; } = [];

public ObservableCollection<NotificationItemViewModel> Notifications { get; } = [];
Expand Down
9 changes: 9 additions & 0 deletions src/SyncDrive.Client.Ui/Texts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ public sealed record Texts

public required string MenuExit { get; init; }

public required string More { get; init; }

/// <summary>macOS: aus dem Disk-Image gestartet.</summary>
public required string MoveToApplications { get; init; }

// Panel
public required string TabRecentlyChanged { get; init; }

Expand Down Expand Up @@ -390,6 +395,8 @@ public sealed record Texts
MenuAbout = "About",
MenuTroubleshoot = "Troubleshoot",
MenuExit = "Exit",
More = "More",
MoveToApplications = "SyncDrive is running from the disk image. Quit it, drag SyncDrive into the Applications folder and start it from there – only then does it open at login.",
TabRecentlyChanged = "Recently Changed",
TabNotifications = "Notifications",
EmptyRecent = "Nothing has changed yet",
Expand Down Expand Up @@ -560,6 +567,8 @@ public sealed record Texts
MenuAbout = "Info",
MenuTroubleshoot = "Fehlersuche",
MenuExit = "Beenden",
More = "Weitere",
MoveToApplications = "SyncDrive läuft aus dem Disk-Image. Beenden Sie es, ziehen Sie SyncDrive in den Ordner „Programme“ und starten Sie es dort – nur dann öffnet es sich beim Anmelden.",
TabRecentlyChanged = "Zuletzt geändert",
TabNotifications = "Benachrichtigungen",
EmptyRecent = "Noch keine Änderungen",
Expand Down
45 changes: 45 additions & 0 deletions tests/SyncDrive.Client.Tests/LocalFileStoreTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,51 @@ public async Task Names_written_in_another_unicode_form_are_found_under_their_nf
Assert.Null(await _store.StatAsync(path, Ct));
}

/// <summary>
/// macOS: Eine vom Sync geschriebene Datei muss im Finder normal erscheinen und sich öffnen lassen – nicht versteckt, lesbar, kein
/// „in Arbeit“-Datum (Finder graut Dateien mit Erstellungsdatum 24.01.1984 aus), keine fremden Zusatzattribute.
/// </summary>
[Fact]
public async Task On_macos_a_downloaded_file_looks_like_any_other_file_in_finder()
{
if (!OperatingSystem.IsMacOS())
{
return;
}

await using (var staged = await _store.StageAsync(P("Ordner/Bericht.pdf"), Ct))
{
await staged.Content.WriteAsync("%PDF-1.4"u8.ToArray(), Ct);
await staged.CommitAsync(new DateTimeOffset(2026, 9, 11, 13, 35, 0, TimeSpan.Zero), Ct);
}

var file = Full("Ordner/Bericht.pdf");
var stat = Run("/usr/bin/stat", "-f", "%SB|%Sm|%Sf|%Sp|%Su", file);
var folder = Run("/usr/bin/stat", "-f", "%Sf|%Sp", Full("Ordner"));
var xattr = Run("/usr/bin/xattr", "-l", file);
var parts = stat.Split('|');

Assert.True(
!parts[2].Contains("hidden", StringComparison.Ordinal) && parts[3].StartsWith("-rw", StringComparison.Ordinal)
&& !parts[0].Contains("1984", StringComparison.Ordinal) && !folder.Contains("hidden", StringComparison.Ordinal)
&& xattr.Length == 0,
$"Datei: {stat} | Ordner: {folder} | xattr: {xattr}");
}

private static string Run(string program, params string[] arguments)
{
var start = new System.Diagnostics.ProcessStartInfo(program) { RedirectStandardOutput = true, UseShellExecute = false };
foreach (var argument in arguments)
{
start.ArgumentList.Add(argument);
}

using var process = System.Diagnostics.Process.Start(start)!;
var output = process.StandardOutput.ReadToEnd().Trim();
process.WaitForExit();
return output;
}

private string Full(string relative) => Path.Combine(_root, relative.Replace('/', Path.DirectorySeparatorChar));

private void Write(string relative, string content = "x")
Expand Down
11 changes: 11 additions & 0 deletions tests/SyncDrive.Server.Host.Tests/MacLaunchAgentTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,15 @@ public void Enabling_writes_a_launch_agent_that_starts_the_app_in_the_background
agent.Apply(false);
Assert.False(File.Exists(agent.PlistPath));
}

[Fact]
public void Started_from_the_disk_image_no_launch_agent_points_to_a_path_that_disappears_on_eject()
{
new MacLaunchAgent("/Applications/SyncDrive.app/Contents/MacOS/syncdrive", _folder).Apply(true);
var fromImage = new MacLaunchAgent("/Volumes/SyncDrive/SyncDrive.app/Contents/MacOS/syncdrive", _folder);

fromImage.Apply(true);

Assert.False(File.Exists(fromImage.PlistPath)); // auch ein alter Eintrag ist weg; aus „Programme“ entsteht er neu
}
}
Loading