Installed Apps page revamp (#2751)
* First round of changes * Some missing styling * Last round of core changes * Color tweaks * Improving code readability * Reverting unneeded changes * Reverting yarn.lock * Removing yarn.lock * Empty state updated * Fixing webhook test * Cleaning up code * Fixing test and simplifying code a bit * Merging API Keys into developer section * Unifying Empty Screen with monorepo version * Cleaning up * Installed apps logic consistency + cleaning up * Type fixes * Apply suggestions from code review Co-authored-by: Omar López <[email protected]> Co-authored-by: alannnc <[email protected]> * Improvements, still WIP * Update apps/web/pages/apps/installed.tsx Co-authored-by: Omar López <[email protected]> * Apply suggestions from code review Co-authored-by: Omar López <[email protected]> * App active install status * Apple Calendar setup, Daily.co preinstalled * Final pass * Minor tweaks * Conflicts with migration ignored * Fixing merge * Fixing merge yet again * Adopting main changes * Removing unneeded data-testid * Fixing reported bugs * Simplifying webhook query * Moving teams settings tab to second Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> Co-authored-by: zomars <[email protected]> Co-authored-by: alannnc <[email protected]> Co-authored-by: Peer Richelsen <[email protected]>
This commit is contained in:
40 files changed
+605
-894
No files matched your search
@@ -11,6 +11,8 @@ import { QueryCell } from "@lib/QueryCell";
|
||||
import { trpc } from "@lib/trpc";
|
||||
|
||||
import { List } from "@components/List";
|
||||
import { ShellSubHeading } from "@components/Shell";
|
||||
import SkeletonLoader from "@components/apps/SkeletonLoader";
|
||||
|
||||
import LicenseRequired from "../LicenseRequired";
|
||||
|
||||
@@ -22,25 +24,28 @@ function ApiKeyListContainer() {
|
||||
const [editModalOpen, setEditModalOpen] = useState(false);
|
||||
const [apiKeyToEdit, setApiKeyToEdit] = useState<(TApiKeys & { neverExpires?: boolean }) | null>(null);
|
||||
return (
|
||||
<>
|
||||
<div className="flex flex-col justify-between truncate pl-2 pr-1 sm:flex-row">
|
||||
<div className="mt-9">
|
||||
<h2 className="font-cal text-lg font-medium leading-6 text-gray-900">{t("api_keys")}</h2>
|
||||
<p className="mt-1 mb-5 text-sm text-gray-500">{t("api_keys_subtitle")}</p>
|
||||
</div>
|
||||
<div className="mb-9 sm:self-center">
|
||||
<Button StartIcon={PlusIcon} color="secondary" onClick={() => setNewApiKeyModal(true)}>
|
||||
{t("generate_new_api_key")}
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div className="border-b border-gray-200 py-8 pl-2 pr-1">
|
||||
<ShellSubHeading
|
||||
className="mt-2"
|
||||
title={t("api_keys")}
|
||||
subtitle={t("api_keys_subtitle")}
|
||||
actions={
|
||||
<Button
|
||||
color="secondary"
|
||||
size="icon"
|
||||
StartIcon={PlusIcon}
|
||||
onClick={() => setNewApiKeyModal(true)}
|
||||
/>
|
||||
}
|
||||
/>
|
||||
<LicenseRequired>
|
||||
<QueryCell
|
||||
query={query}
|
||||
customLoader={<SkeletonLoader />}
|
||||
success={({ data }) => (
|
||||
<>
|
||||
{data.length > 0 && (
|
||||
<List className="pb-6">
|
||||
<List className="mt-6">
|
||||
{data.map((item) => (
|
||||
<ApiKeyListItem
|
||||
key={item.id}
|
||||
@@ -80,7 +85,7 @@ function ApiKeyListContainer() {
|
||||
)}
|
||||
/>
|
||||
</LicenseRequired>
|
||||
</>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ export default function ApiKeyListItem(props: { apiKey: TApiKeys; onEditApiKey:
|
||||
},
|
||||
});
|
||||
return (
|
||||
<ListItem className="-mt-px flex w-full p-4">
|
||||
<ListItem className="flex w-full p-4">
|
||||
<div className="flex w-full justify-between">
|
||||
<div className="flex max-w-full flex-col truncate">
|
||||
<div className="flex space-x-2">
|
||||
|
||||
Reference in new issue
Block a user