ux: add a warning icon when the tracking upstream of a local branch is gone (#1006)

Co-authored-by: Davide Tentori <dtentori@softeam.it>
This commit is contained in:
leo 2025-02-20 10:12:12 +08:00
parent 0e1dfba7ef
commit 53f591bdad
No known key found for this signature in database
7 changed files with 32 additions and 4 deletions

View file

@ -1,9 +1,6 @@
using System;
using System.Collections.Generic;
using Avalonia;
using Avalonia.Media;
using CommunityToolkit.Mvvm.ComponentModel;
namespace SourceGit.ViewModels
@ -45,6 +42,11 @@ namespace SourceGit.ViewModels
get => Backend is Models.Branch { IsCurrent: true };
}
public bool ShowUpstreamGoneTip
{
get => Backend is Models.Branch { IsUpsteamGone: true };
}
public string Tooltip
{
get => Backend is Models.Branch b ? b.FriendlyName : null;