mirror of
https://github.com/sourcegit-scm/sourcegit.git
synced 2024-11-01 13:13:21 -07:00
rename<FileHistories>: rename Views.Histories to Views.FileHistories
This commit is contained in:
parent
1ad5ff1bd8
commit
2b9d07479d
8 changed files with 12 additions and 12 deletions
|
@ -5,7 +5,7 @@ using System.Text.Json.Serialization;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
#if NET6_0_OR_GREATER
|
#if NET6_0
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
#else
|
#else
|
||||||
using System.Net;
|
using System.Net;
|
||||||
|
@ -50,7 +50,7 @@ namespace SourceGit.Models {
|
||||||
Preference.Instance.General.LastCheckDay = curDayOfYear;
|
Preference.Instance.General.LastCheckDay = curDayOfYear;
|
||||||
Task.Run(async () => {
|
Task.Run(async () => {
|
||||||
try {
|
try {
|
||||||
#if NET6_0_OR_GREATER
|
#if NET6_0
|
||||||
var req = new HttpClient();
|
var req = new HttpClient();
|
||||||
var rsp = await req.GetAsync("https://api.github.com/repos/sourcegit-scm/sourcegit/releases/latest");
|
var rsp = await req.GetAsync("https://api.github.com/repos/sourcegit-scm/sourcegit/releases/latest");
|
||||||
rsp.EnsureSuccessStatusCode();
|
rsp.EnsureSuccessStatusCode();
|
||||||
|
|
|
@ -11,7 +11,7 @@ using System.Windows.Controls;
|
||||||
using System.Windows.Media;
|
using System.Windows.Media;
|
||||||
using System.Windows.Media.Imaging;
|
using System.Windows.Media.Imaging;
|
||||||
|
|
||||||
#if NET6_0_OR_GREATER
|
#if NET6_0
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ namespace SourceGit.Views.Controls {
|
||||||
if (!requesting.ContainsKey(email)) return;
|
if (!requesting.ContainsKey(email)) return;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
#if NET6_0_OR_GREATER
|
#if NET6_0
|
||||||
var req = new HttpClient().GetAsync(Models.Preference.Instance.General.AvatarServer + md5 + "?d=404");
|
var req = new HttpClient().GetAsync(Models.Preference.Instance.General.AvatarServer + md5 + "?d=404");
|
||||||
req.Wait();
|
req.Wait();
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<controls:Window
|
<controls:Window
|
||||||
x:Class="SourceGit.Views.Histories"
|
x:Class="SourceGit.Views.FileHistories"
|
||||||
x:Name="me"
|
x:Name="me"
|
||||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
|
@ -8,12 +8,12 @@ namespace SourceGit.Views {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 文件历史
|
/// 文件历史
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public partial class Histories : Controls.Window {
|
public partial class FileHistories : Controls.Window {
|
||||||
private string repo = null;
|
private string repo = null;
|
||||||
private string file = null;
|
private string file = null;
|
||||||
private bool isLFSEnabled = false;
|
private bool isLFSEnabled = false;
|
||||||
|
|
||||||
public Histories(string repo, string file) {
|
public FileHistories(string repo, string file) {
|
||||||
this.repo = repo;
|
this.repo = repo;
|
||||||
this.file = file;
|
this.file = file;
|
||||||
this.isLFSEnabled = new Commands.LFS(repo).IsFiltered(file);
|
this.isLFSEnabled = new Commands.LFS(repo).IsFiltered(file);
|
|
@ -237,7 +237,7 @@ namespace SourceGit.Views.Widgets {
|
||||||
var history = new MenuItem();
|
var history = new MenuItem();
|
||||||
history.Header = App.Text("FileHistory");
|
history.Header = App.Text("FileHistory");
|
||||||
history.Click += (o, ev) => {
|
history.Click += (o, ev) => {
|
||||||
var viewer = new Views.Histories(repo, path);
|
var viewer = new FileHistories(repo, path);
|
||||||
viewer.Show();
|
viewer.Show();
|
||||||
ev.Handled = true;
|
ev.Handled = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -133,7 +133,7 @@ namespace SourceGit.Views.Widgets {
|
||||||
history.Header = App.Text("FileHistory");
|
history.Header = App.Text("FileHistory");
|
||||||
history.IsEnabled = change.Index != Models.Change.Status.Deleted;
|
history.IsEnabled = change.Index != Models.Change.Status.Deleted;
|
||||||
history.Click += (_, ev) => {
|
history.Click += (_, ev) => {
|
||||||
var viewer = new Views.Histories(repo, change.Path);
|
var viewer = new FileHistories(repo, change.Path);
|
||||||
viewer.Show();
|
viewer.Show();
|
||||||
ev.Handled = true;
|
ev.Handled = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -288,7 +288,7 @@ namespace SourceGit.Views.Widgets {
|
||||||
var history = new MenuItem();
|
var history = new MenuItem();
|
||||||
history.Header = App.Text("FileHistory");
|
history.Header = App.Text("FileHistory");
|
||||||
history.Click += (o, ev) => {
|
history.Click += (o, ev) => {
|
||||||
var viewer = new Views.Histories(repo, node.Path);
|
var viewer = new FileHistories(repo, node.Path);
|
||||||
viewer.Show();
|
viewer.Show();
|
||||||
ev.Handled = true;
|
ev.Handled = true;
|
||||||
};
|
};
|
||||||
|
|
|
@ -403,7 +403,7 @@ namespace SourceGit.Views.Widgets {
|
||||||
var history = new MenuItem();
|
var history = new MenuItem();
|
||||||
history.Header = App.Text("FileHistory");
|
history.Header = App.Text("FileHistory");
|
||||||
history.Click += (o, e) => {
|
history.Click += (o, e) => {
|
||||||
var viewer = new Views.Histories(repo, node.Path);
|
var viewer = new FileHistories(repo, node.Path);
|
||||||
viewer.Show();
|
viewer.Show();
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
};
|
};
|
||||||
|
@ -517,7 +517,7 @@ namespace SourceGit.Views.Widgets {
|
||||||
var history = new MenuItem();
|
var history = new MenuItem();
|
||||||
history.Header = App.Text("FileHistory");
|
history.Header = App.Text("FileHistory");
|
||||||
history.Click += (o, e) => {
|
history.Click += (o, e) => {
|
||||||
var viewer = new Views.Histories(repo, change.Path);
|
var viewer = new FileHistories(repo, change.Path);
|
||||||
viewer.Show();
|
viewer.Show();
|
||||||
e.Handled = true;
|
e.Handled = true;
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue