Skip to content

Commit

Permalink
fix: adjust card style
Browse files Browse the repository at this point in the history
Signed-off-by: Innei <i@innei.in>
  • Loading branch information
Innei committed Aug 13, 2024
1 parent 9177a34 commit bec6d1a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/renderer/src/components/ui/collapse/Collapse.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const CollapseControlled: Component<
>
<span className="w-0 shrink grow truncate">{props.title}</span>
{!props.hideArrow && (
<div className="shrink-0 text-gray-400">
<div className="inline-flex shrink-0 items-center text-gray-400">
<i
className={cn(
"i-mingcute-down-line duration-200",
Expand Down
8 changes: 4 additions & 4 deletions src/renderer/src/modules/settings/action-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ const SettingCollapsible = ({
onOpenChange={onOpenChange}
title={title}
>
<div className="pt-2">{children}</div>
<div className="px-1 pt-2">{children}</div>
</CollapseControlled>
)
}
Expand Down Expand Up @@ -320,7 +320,7 @@ export function ActionCard({
</div>
)}
>
<div className="mt-4 space-y-4">
<div className="mt-4 space-y-4 px-1">
<div className="space-y-3">
<p className="font-medium text-zinc-500">When feeds match…</p>
<div className="flex flex-col gap-2">
Expand Down Expand Up @@ -430,7 +430,7 @@ export function ActionCard({
<div className="space-y-4">
<p className="font-medium text-zinc-500">Then do…</p>
<div className="w-full space-y-4">
<div className="flex w-full cursor-pointer items-center justify-between">
<div className="flex w-full items-center justify-between">
<span className="w-0 shrink grow truncate">
Generate summary using AI
</span>
Expand All @@ -444,7 +444,7 @@ export function ActionCard({
</div>
<Divider />

<div className="flex w-full cursor-pointer items-center justify-between">
<div className="flex w-full items-center justify-between">
<span className="w-0 shrink grow truncate">
Translate into
</span>
Expand Down
5 changes: 4 additions & 1 deletion src/renderer/src/pages/settings/(settings)/actions.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { StyledButton } from "@renderer/components/ui/button"
import { useAuthQuery } from "@renderer/hooks/common"
import { apiClient } from "@renderer/lib/api-fetch"
import { apiClient, getFetchErrorMessage } from "@renderer/lib/api-fetch"
import type { ActionsResponse } from "@renderer/models"
import { ActionCard } from "@renderer/modules/settings/action-card"
import { SettingsTitle } from "@renderer/modules/settings/title"
Expand Down Expand Up @@ -86,6 +86,9 @@ export function Component() {
Queries.action.getAll().invalidate()
toast("🎉 Actions saved.")
},
onError: (error) => {
toast.error(getFetchErrorMessage(error))
},
})

return (
Expand Down

0 comments on commit bec6d1a

Please sign in to comment.