Skip to content

Commit

Permalink
Rearranged file:user after modified time.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ricardo Gonzalez committed Dec 12, 2024
1 parent 2d1a8c5 commit a18ab79
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/files-footer-detail.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Popover } from "@patternfly/react-core/dist/esm/components/Popover";
import { Text } from "@patternfly/react-core/dist/esm/components/Text";
import { Tooltip } from "@patternfly/react-core/dist/esm/components/Tooltip";

import cockpit, { file } from "cockpit";
import cockpit from "cockpit";
import type { FileInfo } from "cockpit/fsinfo.ts";
import * as timeformat from "timeformat";

Expand Down Expand Up @@ -117,13 +117,13 @@ export const FilesFooterDetail = ({
return (
<div className="files-footer-info">
{fileInfoText}
{userGroup}
{selectedFile.mtime &&
<Tooltip content={timeformat.dateTimeSeconds(selectedFile.mtime * 1000)}>
<Text className="files-footer-mtime">
{timeformat.distanceToNow(selectedFile.mtime * 1000)}
</Text>
</Tooltip>}
{userGroup}
{permsPopover}
</div>
);
Expand Down Expand Up @@ -162,7 +162,7 @@ const UserGroupPopover = ({ file }: { file: FileInfo }) => (
isInline
component="pre"
>
{file.user}:{file.group}
{ (file.user === file.group) ? file.user : `${file.user}:${file.group}` }
</Button>
</Popover>
);

0 comments on commit a18ab79

Please sign in to comment.