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