mirror of
https://github.com/binaricat/Netcatty.git
synced 2026-11-23 16:42:19 +00:00
Address the SFTP UX list in #3240: wider bookmark management with confirm/reorder/rename, a compact file-list density, a host-list shortcut into the existing local/remote dual pane, faster local folder discovery, and higher small-file upload concurrency. Tree view already supports double-click to enter directories, so that item is left as-is.
28 lines
996 B
TypeScript
28 lines
996 B
TypeScript
import test from "node:test";
|
|
import assert from "node:assert/strict";
|
|
|
|
import {
|
|
getNextSftpListDensity,
|
|
getSftpListDensityToggleLabelKey,
|
|
parseSftpListDensity,
|
|
sftpFileRowDensityClass,
|
|
} from "./sftpListDensity.ts";
|
|
|
|
test("parseSftpListDensity falls back to comfortable", () => {
|
|
assert.equal(parseSftpListDensity("compact"), "compact");
|
|
assert.equal(parseSftpListDensity("comfortable"), "comfortable");
|
|
assert.equal(parseSftpListDensity("nope"), "comfortable");
|
|
assert.equal(parseSftpListDensity(null), "comfortable");
|
|
});
|
|
|
|
test("list density toggle flips compact and comfortable", () => {
|
|
assert.equal(getNextSftpListDensity("comfortable"), "compact");
|
|
assert.equal(getNextSftpListDensity("compact"), "comfortable");
|
|
assert.equal(
|
|
getSftpListDensityToggleLabelKey("comfortable"),
|
|
"sftp.listDensity.switchToCompact",
|
|
);
|
|
assert.ok(sftpFileRowDensityClass("compact").includes("py-0.5"));
|
|
assert.ok(sftpFileRowDensityClass("comfortable").includes("py-2"));
|
|
});
|