Skip to content

Commit

Permalink
improve checks
Browse files Browse the repository at this point in the history
  • Loading branch information
vincelwt committed Apr 30, 2024
1 parent ea6710e commit d861e1b
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 16 deletions.
30 changes: 18 additions & 12 deletions packages/frontend/components/checks/SmartSelectInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,23 @@ export default function SmartCheckSelect({
.toLowerCase()
.includes(search.trim().toLowerCase())
}
const renderedOptions = data?.filter(optionsFilter).map((item) => (
<Combobox.Option
value={getItemValue(item)}
key={getItemValue(item)}
active={value?.includes(getItemValue(item))}
>
<Group gap="sm" wrap="nowrap">
{value?.includes(getItemValue(item)) ? <CheckIcon size={12} /> : null}
{renderListItem ? renderListItem(item) : renderLabel(item)}
</Group>
</Combobox.Option>
))
const renderedOptions = data?.filter(optionsFilter).map((item) => {
const active = multiple
? fixedValue.includes(getItemValue(item))
: getItemValue(item) === value
return (
<Combobox.Option
value={getItemValue(item)}
key={getItemValue(item)}
active={active}
>
<Group gap="sm" wrap="nowrap">
{active ? <CheckIcon size={12} /> : null}
{renderListItem ? renderListItem(item) : renderLabel(item)}
</Group>
</Combobox.Option>
)
})

useEffect(() => {
if (!value) {
Expand All @@ -125,6 +130,7 @@ export default function SmartCheckSelect({
<PillsInput
onClick={() => combobox.openDropdown()}
variant="unstyled"
size="xs"
miw={width}
w="min-content"
>
Expand Down
4 changes: 2 additions & 2 deletions packages/frontend/components/layout/Paywall.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export default function Paywall({
<ThemeIcon size={42} radius={12}>
{Icon && <Icon size="20" />}
</ThemeIcon>
<Title order={3}>
<Title order={3} lh={1}>
{
<Text
span
Expand All @@ -117,7 +117,7 @@ export default function Paywall({
<span>{` is available ${isEnterpriseFeature ? "as an addon in" : ""} Lunary ${capitalize(plan)}`}</span>
</Title>
</Group>
<Text size="lg">{description}</Text>
{description && <Text size="lg">{description}</Text>}
{list && <ListFeatures features={list} />}
<Button
fullWidth
Expand Down
38 changes: 36 additions & 2 deletions packages/frontend/pages/settings.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,10 @@ export default function AppAnalytics() {
feature: "Smart Data Masking",
p: 12,
plan: "enterprise",
description:
"Mask or filter out sensitive data from your project with AI. Data that matches the filters will not be ingested.",
list: [
"Mask or filter out sensitive data",
"LLM-powered detection or custom regex patterns",
],
enabled: true,
}}
>
Expand Down Expand Up @@ -217,6 +219,38 @@ export default function AppAnalytics() {
</Flex>
</SettingsCard>

<SettingsCard
title={<>Custom Models 🧠</>}
align="start"
paywallConfig={{
Icon: IconFilter,
feature: "Custom Models",
p: 12,
plan: "enterprise",
list: [
"Use custom models for evaluations",
"Add and overwrite costs mappings",
],

enabled: true,
}}
>
<Text>Add custom models and costs mappings to your project.</Text>

<Flex justify="flex-end" w="100%">
<Button
loading={isLoading}
style={{ float: "right" }}
onClick={() => {
setIsLoading(true)
setTimeout(() => setIsLoading(false), 1000)
}}
>
Save
</Button>
</Flex>
</SettingsCard>

{user && hasAccess(user.role, "projects", "delete") && (
<SettingsCard title="Danger Zone" align="start">
<Text>
Expand Down

0 comments on commit d861e1b

Please sign in to comment.