mirror of
https://github.com/zed-industries/zed.git
synced 2025-02-09 03:57:39 +00:00
Add button link to extension repository (#7880)
Fixes: https://github.com/zed-industries/zed/issues/7873 <img width="1165" alt="image" src="https://github.com/zed-industries/zed/assets/19867440/2338519c-bd48-4716-9f88-ed155b0dad67"> Release Notes: - Added a button to link to an extension's repository
This commit is contained in:
parent
2e0d18ee76
commit
577b244b03
1 changed files with 15 additions and 1 deletions
|
@ -194,6 +194,8 @@ impl ExtensionsPage {
|
|||
}
|
||||
.color(Color::Accent);
|
||||
|
||||
let repository_url = extension.repository.clone();
|
||||
|
||||
div().w_full().child(
|
||||
v_flex()
|
||||
.w_full()
|
||||
|
@ -256,8 +258,20 @@ impl ExtensionsPage {
|
|||
Label::new(description.clone())
|
||||
.size(LabelSize::Small)
|
||||
.color(Color::Default)
|
||||
}))
|
||||
.child(
|
||||
IconButton::new(
|
||||
SharedString::from(format!("repository-{}", extension.id)),
|
||||
IconName::Github,
|
||||
)
|
||||
.icon_color(Color::Accent)
|
||||
.icon_size(IconSize::Small)
|
||||
.style(ButtonStyle::Filled)
|
||||
.on_click(cx.listener(move |_, _, cx| {
|
||||
cx.open_url(&repository_url);
|
||||
})),
|
||||
),
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue