Open History to see the last commit
1import type { ExecutionEnvironmentPlatformOs, FileManagerRevealKind } from "@t3tools/contracts";
2
3export function revealInFileExplorerLabel(platform: string): string {
4 const normalized = platform.toLowerCase();
5 if (normalized.includes("mac")) return "Reveal in Finder";
6 if (normalized.includes("win")) return "Reveal in File Explorer";
7 return "Reveal in Files";
8}
9
10export function revealInFileExplorerLabelForOs(os: ExecutionEnvironmentPlatformOs): string {
11 if (os === "darwin") return "Reveal in Finder";
12 if (os === "windows") return "Reveal in File Explorer";
13 return "Reveal in Files";
14}
15
16export function revealInFileExplorerLabelForKind(kind: FileManagerRevealKind): string {
17 if (kind === "finder") return "Reveal in Finder";
18 if (kind === "file-explorer") return "Reveal in File Explorer";
19 return "Reveal in Files";
20}