mirror of
https://github.com/zed-industries/zed.git
synced 2024-11-08 07:35:01 +03:00
Indicate which extension version is installed when on an older version (#10574)
This PR adds an indicator to show what extension version is currently installed when on an extension version that is not the latest. <img width="1156" alt="Screenshot 2024-04-15 at 2 10 33 PM" src="https://github.com/zed-industries/zed/assets/1486634/61c5e4cf-a0b8-48fc-8e52-f04f1c351794"> Release Notes: - Added an indicator to show the currently-installed extension version when not on the latest version.
This commit is contained in:
parent
57a736d74a
commit
fda21232ae
@ -421,8 +421,14 @@ impl ExtensionsPage {
|
||||
let extension_id = extension.id.clone();
|
||||
let (install_or_uninstall_button, upgrade_button) =
|
||||
self.buttons_for_entry(extension, &status, cx);
|
||||
let version = extension.manifest.version.clone();
|
||||
let repository_url = extension.manifest.repository.clone();
|
||||
|
||||
let installed_version = match status {
|
||||
ExtensionStatus::Installed(installed_version) => Some(installed_version),
|
||||
_ => None,
|
||||
};
|
||||
|
||||
ExtensionCard::new()
|
||||
.child(
|
||||
h_flex()
|
||||
@ -435,9 +441,14 @@ impl ExtensionsPage {
|
||||
Headline::new(extension.manifest.name.clone())
|
||||
.size(HeadlineSize::Medium),
|
||||
)
|
||||
.child(
|
||||
Headline::new(format!("v{}", extension.manifest.version))
|
||||
.size(HeadlineSize::XSmall),
|
||||
.child(Headline::new(format!("v{version}")).size(HeadlineSize::XSmall))
|
||||
.children(
|
||||
installed_version
|
||||
.filter(|installed_version| *installed_version != version)
|
||||
.map(|installed_version| {
|
||||
Headline::new(format!("(v{installed_version} installed)",))
|
||||
.size(HeadlineSize::XSmall)
|
||||
}),
|
||||
),
|
||||
)
|
||||
.child(
|
||||
|
Loading…
Reference in New Issue
Block a user