feat: clone repository #4
@@ -11,6 +11,7 @@ use gpui::{
|
||||
AnyElement, App, Context, Entity, EventEmitter, FocusHandle, Focusable, PathPromptOptions,
|
||||
Pixels, Render, SharedString, Size, Subscription, Task, WeakEntity, Window, div, px, size,
|
||||
};
|
||||
use gpui_base::Disableable;
|
||||
use gpui_component::avatar::{Avatar, AvatarGroup};
|
||||
use gpui_component::button::{Button, ButtonVariants};
|
||||
use gpui_component::combobox::{
|
||||
@@ -444,7 +445,7 @@ impl RepoDetailView {
|
||||
files: false,
|
||||
directories: true,
|
||||
multiple: false,
|
||||
prompt: Some("Choose folder".into()),
|
||||
prompt: Some("Clone".into()),
|
||||
});
|
||||
|
||||
let task = cx.spawn_in(window, async move |this, cx| {
|
||||
@@ -1067,6 +1068,7 @@ impl RepoDetailView {
|
||||
.child(
|
||||
h_flex()
|
||||
.mt_2()
|
||||
.w_full()
|
||||
.gap_2()
|
||||
.child(
|
||||
div()
|
||||
@@ -1124,8 +1126,9 @@ impl RepoDetailView {
|
||||
.child(
|
||||
Button::new("clone")
|
||||
.icon(CustomIconName::GitClone)
|
||||
.tooltip("Clone to folder…")
|
||||
.tooltip("Clone to folder...")
|
||||
.loading(self.cloning)
|
||||
.disabled(self.cloning)
|
||||
.primary()
|
||||
.on_click(cx.listener(|this, _event, window, cx| {
|
||||
this.clone_to_folder(window, cx);
|
||||
@@ -1262,7 +1265,6 @@ impl RepoDetailView {
|
||||
.w_full()
|
||||
.gap_3()
|
||||
.items_center()
|
||||
.flex_wrap()
|
||||
.child(
|
||||
h_flex()
|
||||
.gap_1()
|
||||
|
||||
Reference in New Issue
Block a user