PIT: add commits to snapshots and improve old role hidding

This commit is contained in:
carlosmonastyrski
2025-05-23 01:46:13 -03:00
parent 2b21c9d348
commit 4a391c7ac2
9 changed files with 197 additions and 60 deletions
@@ -328,39 +328,28 @@ export const RollbackPreviewTab = (): JSX.Element => {
<div className="border-t border-mineshaft-600 py-4">
<div className="flex w-full items-center justify-between gap-2">
<div className="flex-1">
<Input
placeholder="Restore Message"
value={message}
onChange={(e) => setMessage(e.target.value)}
className="w-full border-mineshaft-500 bg-mineshaft-700 text-sm"
/>
</div>
<div className="flex gap-2">
<Button
onClick={() => {
if (!message) {
createNotification({
type: "error",
text: "Please enter a restore message"
});
return;
}
handlePopUpOpen("rollbackConfirm");
}}
colorSchema="primary"
className="px-6 py-2"
isDisabled={
message.length === 0 ||
!rollbackChangesNested ||
!rollbackChangesNested?.some((folder) => {
return folder.changes.length > 0;
})
}
>
Restore
</Button>
</div>
<Input
placeholder="Restore Message"
value={message}
onChange={(e) => setMessage(e.target.value)}
className="w-full border-mineshaft-500 bg-mineshaft-700 py-2 text-sm"
/>
<Button
onClick={() => {
handlePopUpOpen("rollbackConfirm");
}}
colorSchema="primary"
className="px-6 py-2"
isDisabled={
message.length === 0 ||
!rollbackChangesNested ||
!rollbackChangesNested?.some((folder) => {
return folder.changes.length > 0;
})
}
>
Restore
</Button>
</div>
</div>
</div>
@@ -453,7 +453,7 @@ export const SecretVersionDiffView: React.FC<SecretVersionDiffViewProps> = ({
const differences = getVersionDifferences(item.versions);
if (differences.length === 0) {
return <div className="px-6 py-3 text-gray-400">No details available</div>;
return null;
}
const changedFields = new Set<string>();
@@ -57,7 +57,7 @@ const CommitItem = ({
</Button>
</div>
<p className="text-white-400 mt-2 flex flex-wrap items-center gap-4 text-sm">
<span className="flex items-center">
<span className="flex items-center text-mineshaft-300">
{commit.actorMetadata?.email || commit.actorMetadata?.name || commit.actorType}
<p className="ml-1 mr-1">committed</p>
<time dateTime={commit.createdAt}>{formatTimeAgo(commit.createdAt)}</time>