onboarding: Link git clone button with action (#35999)
Release Notes: - N/A
This commit is contained in:
parent
dc87f4b32e
commit
96093aa465
5 changed files with 5 additions and 8 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -11157,6 +11157,7 @@ dependencies = [
|
||||||
"feature_flags",
|
"feature_flags",
|
||||||
"fs",
|
"fs",
|
||||||
"fuzzy",
|
"fuzzy",
|
||||||
|
"git",
|
||||||
"gpui",
|
"gpui",
|
||||||
"itertools 0.14.0",
|
"itertools 0.14.0",
|
||||||
"language",
|
"language",
|
||||||
|
|
|
@ -2105,7 +2105,7 @@ impl GitPanel {
|
||||||
Ok(_) => cx.update(|window, cx| {
|
Ok(_) => cx.update(|window, cx| {
|
||||||
window.prompt(
|
window.prompt(
|
||||||
PromptLevel::Info,
|
PromptLevel::Info,
|
||||||
"Git Clone",
|
&format!("Git Clone: {}", repo_name),
|
||||||
None,
|
None,
|
||||||
&["Add repo to project", "Open repo in new project"],
|
&["Add repo to project", "Open repo in new project"],
|
||||||
cx,
|
cx,
|
||||||
|
|
|
@ -181,10 +181,6 @@ pub fn init(cx: &mut App) {
|
||||||
workspace.toggle_modal(window, cx, |window, cx| {
|
workspace.toggle_modal(window, cx, |window, cx| {
|
||||||
GitCloneModal::show(panel, window, cx)
|
GitCloneModal::show(panel, window, cx)
|
||||||
});
|
});
|
||||||
|
|
||||||
// panel.update(cx, |panel, cx| {
|
|
||||||
// panel.git_clone(window, cx);
|
|
||||||
// });
|
|
||||||
});
|
});
|
||||||
workspace.register_action(|workspace, _: &git::OpenModifiedFiles, window, cx| {
|
workspace.register_action(|workspace, _: &git::OpenModifiedFiles, window, cx| {
|
||||||
open_modified_files(workspace, window, cx);
|
open_modified_files(workspace, window, cx);
|
||||||
|
|
|
@ -26,6 +26,7 @@ editor.workspace = true
|
||||||
feature_flags.workspace = true
|
feature_flags.workspace = true
|
||||||
fs.workspace = true
|
fs.workspace = true
|
||||||
fuzzy.workspace = true
|
fuzzy.workspace = true
|
||||||
|
git.workspace = true
|
||||||
gpui.workspace = true
|
gpui.workspace = true
|
||||||
itertools.workspace = true
|
itertools.workspace = true
|
||||||
language.workspace = true
|
language.workspace = true
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
use gpui::{
|
use gpui::{
|
||||||
Action, App, Context, Entity, EventEmitter, FocusHandle, Focusable, InteractiveElement,
|
Action, App, Context, Entity, EventEmitter, FocusHandle, Focusable, InteractiveElement,
|
||||||
NoAction, ParentElement, Render, Styled, Window, actions,
|
ParentElement, Render, Styled, Window, actions,
|
||||||
};
|
};
|
||||||
use menu::{SelectNext, SelectPrevious};
|
use menu::{SelectNext, SelectPrevious};
|
||||||
use ui::{ButtonLike, Divider, DividerColor, KeyBinding, Vector, VectorName, prelude::*};
|
use ui::{ButtonLike, Divider, DividerColor, KeyBinding, Vector, VectorName, prelude::*};
|
||||||
|
@ -38,8 +38,7 @@ const CONTENT: (Section<4>, Section<3>) = (
|
||||||
SectionEntry {
|
SectionEntry {
|
||||||
icon: IconName::CloudDownload,
|
icon: IconName::CloudDownload,
|
||||||
title: "Clone a Repo",
|
title: "Clone a Repo",
|
||||||
// TODO: use proper action
|
action: &git::Clone,
|
||||||
action: &NoAction,
|
|
||||||
},
|
},
|
||||||
SectionEntry {
|
SectionEntry {
|
||||||
icon: IconName::ListCollapse,
|
icon: IconName::ListCollapse,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue