mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-22 12:45:00 +00:00
style: add .editorconfig for code formatting. see issu #25
This commit is contained in:
parent
a8eeea4f78
commit
18aaa0a143
225 changed files with 7781 additions and 3911 deletions
|
@ -1,67 +1,84 @@
|
|||
using Avalonia.Collections;
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace SourceGit.ViewModels {
|
||||
public class RepositoryNode : ObservableObject {
|
||||
public string Id {
|
||||
using Avalonia.Collections;
|
||||
|
||||
using CommunityToolkit.Mvvm.ComponentModel;
|
||||
|
||||
namespace SourceGit.ViewModels
|
||||
{
|
||||
public class RepositoryNode : ObservableObject
|
||||
{
|
||||
public string Id
|
||||
{
|
||||
get => _id;
|
||||
set {
|
||||
set
|
||||
{
|
||||
var normalized = value.Replace('\\', '/');
|
||||
SetProperty(ref _id, normalized);
|
||||
}
|
||||
}
|
||||
|
||||
public string Name {
|
||||
public string Name
|
||||
{
|
||||
get => _name;
|
||||
set => SetProperty(ref _name, value);
|
||||
}
|
||||
|
||||
public int Bookmark {
|
||||
public int Bookmark
|
||||
{
|
||||
get => _bookmark;
|
||||
set => SetProperty(ref _bookmark, value);
|
||||
}
|
||||
|
||||
public bool IsRepository {
|
||||
public bool IsRepository
|
||||
{
|
||||
get => _isRepository;
|
||||
set => SetProperty(ref _isRepository, value);
|
||||
}
|
||||
|
||||
public bool IsExpanded {
|
||||
public bool IsExpanded
|
||||
{
|
||||
get => _isExpanded;
|
||||
set => SetProperty(ref _isExpanded, value);
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public bool IsVisible {
|
||||
public bool IsVisible
|
||||
{
|
||||
get => _isVisible;
|
||||
set => SetProperty(ref _isVisible, value);
|
||||
}
|
||||
|
||||
public AvaloniaList<RepositoryNode> SubNodes {
|
||||
|
||||
public AvaloniaList<RepositoryNode> SubNodes
|
||||
{
|
||||
get => _subNodes;
|
||||
set => SetProperty(ref _subNodes, value);
|
||||
}
|
||||
|
||||
public void Edit() {
|
||||
public void Edit()
|
||||
{
|
||||
if (PopupHost.CanCreatePopup()) PopupHost.ShowPopup(new EditRepositoryNode(this));
|
||||
}
|
||||
|
||||
public void AddSubFolder() {
|
||||
public void AddSubFolder()
|
||||
{
|
||||
if (PopupHost.CanCreatePopup()) PopupHost.ShowPopup(new CreateGroup(this));
|
||||
}
|
||||
|
||||
public void OpenInFileManager() {
|
||||
public void OpenInFileManager()
|
||||
{
|
||||
if (!IsRepository) return;
|
||||
Native.OS.OpenInFileManager(_id);
|
||||
}
|
||||
|
||||
public void OpenTerminal() {
|
||||
public void OpenTerminal()
|
||||
{
|
||||
if (!IsRepository) return;
|
||||
Native.OS.OpenTerminal(_id);
|
||||
}
|
||||
|
||||
public void Delete() {
|
||||
public void Delete()
|
||||
{
|
||||
if (PopupHost.CanCreatePopup()) PopupHost.ShowPopup(new DeleteRepositoryNode(this));
|
||||
}
|
||||
|
||||
|
@ -73,4 +90,4 @@ namespace SourceGit.ViewModels {
|
|||
private bool _isVisible = true;
|
||||
private AvaloniaList<RepositoryNode> _subNodes = new AvaloniaList<RepositoryNode>();
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue