Rename Join button to Open, rework message slightly

This commit is contained in:
Nathan Sobo 2022-10-10 18:12:00 -06:00
parent b8c2acf0f2
commit e0b6b0df2a
3 changed files with 8 additions and 8 deletions

View file

@ -102,7 +102,7 @@ impl ProjectSharedNotification {
.with_child(
Label::new(
format!(
"shared a project in Zed{}",
"is sharing a project in Zed{}",
if self.worktree_root_names.is_empty() {
""
} else {
@ -140,7 +140,7 @@ impl ProjectSharedNotification {
}
fn render_buttons(&self, cx: &mut RenderContext<Self>) -> ElementBox {
enum Join {}
enum Open {}
enum Dismiss {}
let project_id = self.project_id;
@ -148,12 +148,12 @@ impl ProjectSharedNotification {
Flex::column()
.with_child(
MouseEventHandler::<Join>::new(0, cx, |_, cx| {
MouseEventHandler::<Open>::new(0, cx, |_, cx| {
let theme = &cx.global::<Settings>().theme.project_shared_notification;
Label::new("Join".to_string(), theme.join_button.text.clone())
Label::new("Open".to_string(), theme.open_button.text.clone())
.aligned()
.contained()
.with_style(theme.join_button.container)
.with_style(theme.open_button.container)
.boxed()
})
.with_cursor_style(CursorStyle::PointingHand)

View file

@ -482,7 +482,7 @@ pub struct ProjectSharedNotification {
pub message: ContainedText,
pub worktree_roots: ContainedText,
pub button_width: f32,
pub join_button: ContainedText,
pub open_button: ContainedText,
pub dismiss_button: ContainedText,
}

View file

@ -5,7 +5,7 @@ export default function projectSharedNotification(theme: Theme): Object {
const avatarSize = 48;
return {
windowHeight: 72,
windowWidth: 360,
windowWidth: 380,
background: backgroundColor(theme, 300),
ownerContainer: {
padding: 12,
@ -31,7 +31,7 @@ export default function projectSharedNotification(theme: Theme): Object {
margin: { top: -3 },
},
buttonWidth: 96,
joinButton: {
openButton: {
background: backgroundColor(theme, "info", "active"),
border: { left: true, bottom: true, width: 1, color: borderColor(theme, "primary") },
...text(theme, "sans", "info", { size: "xs", weight: "extra_bold" })