mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-22 08:21:35 +01:00
Yaak Proxy: square app icons beside long names, and the final uncovered why line
App icons keep their square however a long app name squeezes them, in the card's buttons, the strip's Choose menu and the sidebar, and a long entry hint truncates instead of the button's label. A connection nothing on the list covers reads "Encrypted Content: Enable decryption to see requests to <host>", with the host as code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e3ff29ee6d
commit
c0f75bcfc2
7 files changed
+48
-16
No files matched your search
@@ -42,8 +42,13 @@ export function AppIcon({ path, className = "size-4" }: { path: string; classNam
|
||||
}, [path]);
|
||||
|
||||
return url == null ? (
|
||||
<span aria-hidden className={classNames(className, "inline-block shrink-0")} />
|
||||
<span aria-hidden className={classNames(className, "inline-block shrink-0 aspect-square")} />
|
||||
) : (
|
||||
<img alt="" src={url} className={classNames(className, "shrink-0")} />
|
||||
// Square whatever squeezes it, beside text that truncates
|
||||
<img
|
||||
alt=""
|
||||
src={url}
|
||||
className={classNames(className, "shrink-0 aspect-square object-contain")}
|
||||
/>
|
||||
);
|
||||
}
|
||||
@@ -185,6 +185,11 @@ function LineText({ line }: { line: Line }) {
|
||||
typeof part === "string" ? (
|
||||
// oxlint-disable-next-line react/no-array-index-key -- the parts of one fixed line
|
||||
<span key={i}>{part}</span>
|
||||
) : "bold" in part ? (
|
||||
// oxlint-disable-next-line react/no-array-index-key -- the parts of one fixed line
|
||||
<span key={i} className="font-semibold">
|
||||
{part.bold}
|
||||
</span>
|
||||
) : (
|
||||
// oxlint-disable-next-line react/no-array-index-key -- the parts of one fixed line
|
||||
<InlineCode key={i}>{part.code}</InlineCode>
|
||||
@@ -222,7 +227,7 @@ function ActionButton({
|
||||
flow.clientPath == null ? (
|
||||
<Icon icon="box" size="sm" />
|
||||
) : (
|
||||
<AppIcon path={flow.clientPath} className="size-4" />
|
||||
<AppIcon path={flow.clientPath} className="size-4 min-w-4" />
|
||||
)
|
||||
) : (
|
||||
<Icon icon={ICONS[action.icon]} size="sm" />
|
||||
@@ -241,7 +246,7 @@ function ActionButton({
|
||||
action.hint == null ? undefined : (
|
||||
<span
|
||||
className={classNames(
|
||||
"ml-auto pl-3 font-mono text-xs text-text-subtlest truncate max-w-[50%]",
|
||||
"block ml-auto pl-3 font-mono text-xs text-text-subtlest truncate max-w-[11rem]",
|
||||
action.removes && "line-through",
|
||||
)}
|
||||
>
|
||||
|
||||
@@ -77,9 +77,9 @@ export function HttpsStrip() {
|
||||
app.path == null ? (
|
||||
app.name
|
||||
) : (
|
||||
<span className="flex items-center gap-2">
|
||||
<AppIcon path={app.path} className="size-4" />
|
||||
{app.name}
|
||||
<span className="flex items-center gap-2 min-w-0">
|
||||
<AppIcon path={app.path} className="size-4 min-w-4" />
|
||||
<span className="truncate">{app.name}</span>
|
||||
</span>
|
||||
),
|
||||
keepOpenOnSelect: true,
|
||||
|
||||
@@ -85,7 +85,9 @@ function ItemInner({ item }: { item: SidebarItem }) {
|
||||
{item.kind === "encrypted" && <Icon icon="lock" size="sm" className="text-text-subtle" />}
|
||||
{item.kind === "saved" && <Icon icon="bookmark" size="sm" className="text-text-subtle" />}
|
||||
{item.kind === "folder" && <Icon icon="folder" size="sm" className="text-text-subtle" />}
|
||||
{item.appPath != null && <AppIcon path={item.appPath} className="size-[1.125rem]" />}
|
||||
{item.appPath != null && (
|
||||
<AppIcon path={item.appPath} className="size-[1.125rem] min-w-[1.125rem]" />
|
||||
)}
|
||||
{item.kind === "folder" && item.path != null ? (
|
||||
// Named by its last part; the whole path on hover
|
||||
<Tooltip wrap content={item.path} delay={CONTROL_TOOLTIP_DELAY}>
|
||||
|
||||
Reference in new issue
Block a user