Skip to content

Commit

Permalink
Add read-only git management
Browse files Browse the repository at this point in the history
  • Loading branch information
jackpot51 committed Dec 1, 2023
1 parent b9b46e0 commit e2e92d5
Show file tree
Hide file tree
Showing 9 changed files with 782 additions and 79 deletions.
81 changes: 81 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ grep = "0.3.1"
ignore = "0.4.21"
lazy_static = "1.4.0"
log = "0.4.20"
patch = "0.7.0"
notify = "6.1.1"
#TODO: this is using gtk for file dialogues
rfd = { version = "0.12.0", optional = true }
serde = { version = "1", features = ["serde_derive"] }
tokio = { version = "1", features = ["time"] }
tokio = { version = "1", features = ["process", "time"] }
# Extra syntax highlighting
syntect = "5.1.0"
two-face = "0.3.0"
Expand Down
6 changes: 6 additions & 0 deletions i18n/en/cosmic_edit.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ character-count = Characters
character-count-no-spaces = Characters (without spaces)
line-count = Lines
## Git management
git-management = Git management
unstaged-changes = Unstaged changes
staged-changes = Staged changes
## Project search
project-search = Project search
Expand Down Expand Up @@ -50,6 +55,7 @@ revert-all-changes = Revert all changes
menu-document-statistics = Document statistics...
document-type = Document type...
encoding = Encoding...
menu-git-management = Git management...
print = Print
quit = Quit
Expand Down
3 changes: 3 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ pub enum Action {
Redo,
Save,
SelectAll,
ToggleGitManagement,
ToggleProjectSearch,
ToggleSettingsPage,
ToggleWordWrap,
Expand All @@ -50,6 +51,7 @@ impl Action {
Self::Redo => Message::Redo,
Self::Save => Message::Save,
Self::SelectAll => Message::SelectAll,
Self::ToggleGitManagement => Message::ToggleContextPage(ContextPage::GitManagement),
Self::ToggleProjectSearch => Message::ToggleContextPage(ContextPage::ProjectSearch),
Self::ToggleSettingsPage => Message::ToggleContextPage(ContextPage::Settings),
Self::ToggleWordWrap => Message::ToggleWordWrap,
Expand Down Expand Up @@ -118,6 +120,7 @@ impl KeyBind {
bind!([Ctrl, Shift], Z, Redo);
bind!([Ctrl], S, Save);
bind!([Ctrl], A, SelectAll);
bind!([Ctrl, Shift], G, ToggleGitManagement);
bind!([Ctrl, Shift], F, ToggleProjectSearch);
bind!([Ctrl], Comma, ToggleSettingsPage);
bind!([Alt], Z, ToggleWordWrap);
Expand Down
Loading

0 comments on commit e2e92d5

Please sign in to comment.