diff --git a/DesktopUI2/DesktopUI2/ViewModels/OneClickViewModel.cs b/DesktopUI2/DesktopUI2/ViewModels/OneClickViewModel.cs index 88795f6bb3..35a8a622d9 100644 --- a/DesktopUI2/DesktopUI2/ViewModels/OneClickViewModel.cs +++ b/DesktopUI2/DesktopUI2/ViewModels/OneClickViewModel.cs @@ -1,7 +1,6 @@ using System; using System.Collections.Generic; using System.Diagnostics; -using System.Globalization; using System.Linq; using System.Threading.Tasks; using Avalonia; @@ -299,13 +298,21 @@ private string Url { get { - var commit = ""; - if (!string.IsNullOrEmpty(Id)) + var account = AccountManager.GetDefaultAccount(); + if (account.serverInfo.frontend2) { - commit = "commits/" + Id; + return $"{_fileStream.ServerUrl.TrimEnd('/')}/projects/{_fileStream.StreamId}"; } + else + { + var commit = ""; + if (!string.IsNullOrEmpty(Id)) + { + commit = "commits/" + Id; + } - return $"{_fileStream.ServerUrl.TrimEnd('/')}/streams/{_fileStream.StreamId}/{commit}"; + return $"{_fileStream.ServerUrl.TrimEnd('/')}/streams/{_fileStream.StreamId}/{commit}"; + } } }