Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

improvement: adjust commit modal wording and icons and autofocus commit message

Scott Wilson1b40f5d47584
diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/SecretDashboardPage.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/SecretDashboardPage.tsx
index 3d9e58b3c8..9241c2c6f3 100644
--- a/frontend/src/pages/secret-manager/SecretDashboardPage/SecretDashboardPage.tsx
+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/SecretDashboardPage.tsx
@@ -328,12 +328,12 @@ const Page = () => {
createNotification({
text: isProtectedBranch
? "Requested changes have been sent for review"
- : "Changes committed successfully",
+ : "Changes saved successfully",
type: "success"
});
} catch (error) {
createNotification({
- text: "Failed to commit changes",
+ text: "Failed to save changes",
type: "error"
});
console.error(error);
diff --git a/frontend/src/pages/secret-manager/SecretDashboardPage/components/CommitForm/CommitForm.tsx b/frontend/src/pages/secret-manager/SecretDashboardPage/components/CommitForm/CommitForm.tsx
index c2e3ab12bc..0d49832476 100644
--- a/frontend/src/pages/secret-manager/SecretDashboardPage/components/CommitForm/CommitForm.tsx
+++ b/frontend/src/pages/secret-manager/SecretDashboardPage/components/CommitForm/CommitForm.tsx
@@ -1,6 +1,14 @@
/* eslint-disable jsx-a11y/label-has-associated-control */
import React, { useCallback, useState } from "react";
-import { faCodeCommit, faEye, faFolder, faKey } from "@fortawesome/free-solid-svg-icons";
+import {
+ faClipboardCheck,
+ faClipboardList,
+ faCodeCommit,
+ faEye,
+ faFolder,
+ faKey,
+ faSave
+} from "@fortawesome/free-solid-svg-icons";
import { FontAwesomeIcon } from "@fortawesome/react-fontawesome";
import { Badge, Button, Input, Modal, ModalContent } from "@app/components/v2";
@@ -328,12 +336,12 @@ export const CommitForm: React.FC<CommitFormProps> = ({
</Button>
<Button
variant="solid"
- leftIcon={<FontAwesomeIcon icon={faEye} />}
+ leftIcon={<FontAwesomeIcon icon={faSave} />}
onClick={() => setIsModalOpen(true)}
isDisabled={totalChangesCount === 0}
className="px-6"
>
- Review Changes
+ Save Changes
</Button>
</div>
</div>
@@ -345,14 +353,14 @@ export const CommitForm: React.FC<CommitFormProps> = ({
<ModalContent
title={
<div className="flex items-center gap-2">
- <FontAwesomeIcon icon={faCodeCommit} className="text-mineshaft-400" />
- Commit Changes
+ <FontAwesomeIcon icon={faClipboardCheck} className="text-mineshaft-400" />
+ Review Changes
<Badge variant="primary" className="mt-[0.05rem]">
{totalChangesCount} Change{totalChangesCount !== 1 ? "s" : ""}
</Badge>
</div>
}
- subTitle={"Write a commit message and review the changes you&apos;re about to commit."}
+ subTitle="Write a commit message and review the changes you're about to save."
className="max-h-[90vh] max-w-[95%] md:max-w-7xl"
>
<div className="space-y-6">
@@ -413,6 +421,7 @@ export const CommitForm: React.FC<CommitFormProps> = ({
onChange={(e) => setCommitMessage(e.target.value)}
placeholder="Describe your changes..."
className="w-full"
+ autoFocus
required
/>
</div>
@@ -435,7 +444,7 @@ export const CommitForm: React.FC<CommitFormProps> = ({
colorSchema="primary"
variant="outline_bg"
>
- {isCommitting ? "Committing..." : "Commit Changes"}
+ {isCommitting ? "Save..." : "Save Changes"}
</Button>
</div>
</div>