Show extension download counts with thousands separators (#12857)
This PR adjusts the extension download counts to be displayed using thousands separators. Release Notes: - Adjusted extension download counts to display with thousands separators (e.g., `1,000,000`).
This commit is contained in:
parent
0d5485bd6c
commit
57c40299a5
4 changed files with 19 additions and 2 deletions
|
@ -24,6 +24,7 @@ fs.workspace = true
|
|||
fuzzy.workspace = true
|
||||
gpui.workspace = true
|
||||
language.workspace = true
|
||||
num-format.workspace = true
|
||||
picker.workspace = true
|
||||
project.workspace = true
|
||||
release_channel.workspace = true
|
||||
|
|
|
@ -16,6 +16,7 @@ use gpui::{
|
|||
InteractiveElement, KeyContext, ParentElement, Render, Styled, Task, TextStyle,
|
||||
UniformListScrollHandle, View, ViewContext, VisualContext, WeakView, WhiteSpace, WindowContext,
|
||||
};
|
||||
use num_format::{Locale, ToFormattedString};
|
||||
use release_channel::ReleaseChannel;
|
||||
use settings::Settings;
|
||||
use std::ops::DerefMut;
|
||||
|
@ -487,8 +488,11 @@ impl ExtensionsPage {
|
|||
.size(LabelSize::Small),
|
||||
)
|
||||
.child(
|
||||
Label::new(format!("Downloads: {}", extension.download_count))
|
||||
.size(LabelSize::Small),
|
||||
Label::new(format!(
|
||||
"Downloads: {}",
|
||||
extension.download_count.to_formatted_string(&Locale::en)
|
||||
))
|
||||
.size(LabelSize::Small),
|
||||
),
|
||||
)
|
||||
.child(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue