This commit is contained in:
2026-09-04 08:16:05 +07:00
parent 212f35d6bb
commit 17de4f6376
43 changed files with 376 additions and 721 deletions
-5
View File
@@ -5,7 +5,6 @@ use gpui_component::menu::PopupMenuItem;
use gpui_component::{ActiveTheme, StyledExt, h_flex};
/// A muted command row with a copy button.
/// The value renders truncated and a [`Clipboard`] button copies the full value.
pub fn copy_row<E>(copy_id: E, command: &SharedString, cx: &App) -> Div
where
E: Into<ElementId>,
@@ -35,10 +34,6 @@ where
}
/// One row of a copy menu, with a small title above the compact label.
/// A copy button flips to a check while the value is on the clipboard.
/// Clicking the row copies and dismisses the menu.
/// The copy button stops propagation so the menu stays open.
/// Both copy `copy`, never the label.
pub fn menu_copy_row(
id: &'static str,
title: &'static str,
+1
View File
@@ -1,4 +1,5 @@
/// `[head chars]...[tail chars]` middle truncation.
///
/// Values too short for the ellipsis to save space are left alone.
pub fn middle_truncate(value: &str, head: usize, tail: usize) -> String {
let len = value.chars().count();