mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-23 19:34:59 +00:00
ux: show only subject in Apply Stash
and Drop Stash
popup
Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
dcd8effc32
commit
8d74586970
5 changed files with 42 additions and 23 deletions
|
@ -11,6 +11,24 @@ namespace SourceGit.Models
|
|||
public ulong Time { get; set; } = 0;
|
||||
public string Message { get; set; } = "";
|
||||
|
||||
public string TimeStr => DateTime.UnixEpoch.AddSeconds(Time).ToLocalTime().ToString(DateTimeFormat.Active.DateTime);
|
||||
public string Subject
|
||||
{
|
||||
get
|
||||
{
|
||||
var idx = Message.IndexOf('\n', StringComparison.Ordinal);
|
||||
return idx > 0 ? Message.Substring(0, idx).Trim() : Message;
|
||||
}
|
||||
}
|
||||
|
||||
public string TimeStr
|
||||
{
|
||||
get
|
||||
{
|
||||
return DateTime.UnixEpoch
|
||||
.AddSeconds(Time)
|
||||
.ToLocalTime()
|
||||
.ToString(DateTimeFormat.Active.DateTime);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue