mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-06 20:27:12 +00:00
misc: addressed main page ui/ux concerns
This commit is contained in:
@@ -53,13 +53,12 @@ export const SecretMainPage = () => {
|
|||||||
const { currentWorkspace, isLoading: isWorkspaceLoading } = useWorkspace();
|
const { currentWorkspace, isLoading: isWorkspaceLoading } = useWorkspace();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { permission } = useProjectPermission();
|
const { permission } = useProjectPermission();
|
||||||
|
|
||||||
|
|
||||||
const [isVisible, setIsVisible] = useState(false);
|
const [isVisible, setIsVisible] = useState(false);
|
||||||
const [sortDir, setSortDir] = useState<SortDir>(SortDir.ASC);
|
const [sortDir, setSortDir] = useState<SortDir>(SortDir.ASC);
|
||||||
const [filter, setFilter] = useState<Filter>({
|
const [filter, setFilter] = useState<Filter>({
|
||||||
tags: {},
|
tags: {},
|
||||||
searchFilter: ""
|
searchFilter: (router.query.searchFilter as string) || ""
|
||||||
});
|
});
|
||||||
|
|
||||||
const [snapshotId, setSnapshotId] = useState<string | null>(null);
|
const [snapshotId, setSnapshotId] = useState<string | null>(null);
|
||||||
|
|||||||
@@ -334,7 +334,7 @@ export const ActionBar = ({
|
|||||||
className="h-10"
|
className="h-10"
|
||||||
isDisabled={!isAllowed}
|
isDisabled={!isAllowed}
|
||||||
>
|
>
|
||||||
{`${snapshotCount} ${snapshotCount === 1 ? "Commit" : "Commits"}`}
|
{`${snapshotCount} ${snapshotCount === 1 ? "Snapshot" : "Snapshots"}`}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
</ProjectPermissionCan>
|
</ProjectPermissionCan>
|
||||||
|
|||||||
@@ -250,7 +250,7 @@ export const SecretItem = memo(
|
|||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
className="flex flex-grow items-center border-x border-mineshaft-600 py-1 pl-4 pr-2"
|
className="flex w-80 flex-grow items-center border-x border-mineshaft-600 py-1 pl-4 pr-2"
|
||||||
tabIndex={0}
|
tabIndex={0}
|
||||||
role="button"
|
role="button"
|
||||||
>
|
>
|
||||||
@@ -498,7 +498,7 @@ export const SecretItem = memo(
|
|||||||
{!isDirty ? (
|
{!isDirty ? (
|
||||||
<motion.div
|
<motion.div
|
||||||
key="options"
|
key="options"
|
||||||
className="flex h-10 flex-shrink-0 items-center space-x-4 px-3"
|
className="flex h-10 flex-shrink-0 items-center space-x-4 px-[0.64rem]"
|
||||||
initial={{ x: 0, opacity: 0 }}
|
initial={{ x: 0, opacity: 0 }}
|
||||||
animate={{ x: 0, opacity: 1 }}
|
animate={{ x: 0, opacity: 1 }}
|
||||||
exit={{ x: 10, opacity: 0 }}
|
exit={{ x: 10, opacity: 0 }}
|
||||||
|
|||||||
@@ -425,7 +425,8 @@ export const SecretOverviewPage = () => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const query: Record<string, string> = { ...router.query, env: slug };
|
|
||||||
|
const query: Record<string, string> = { ...router.query, env: slug, searchFilter };
|
||||||
const envIndex = visibleEnvs.findIndex((el) => slug === el.slug);
|
const envIndex = visibleEnvs.findIndex((el) => slug === el.slug);
|
||||||
if (envIndex !== -1) {
|
if (envIndex !== -1) {
|
||||||
router.push({
|
router.push({
|
||||||
|
|||||||
Reference in New Issue
Block a user