Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve chat #566

Merged
merged 9 commits into from
Nov 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src-tauri/capabilities/surrealist.json
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@
"https://api.cloud.surrealdb.com/api/*",
"https://auth.surrealdb.com/*",
"https://checkout.stripe.com/*",
"https://lago-production.s3.amazonaws.com/*"
"https://lago-production.s3.amazonaws.com/*",
"https://api-prod.scoutos.com/*"
]
}
]
Expand Down
Binary file added src/assets/images/sidekick.webp
Binary file not shown.
146 changes: 77 additions & 69 deletions src/assets/styles/override.scss
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
:root {
--surrealist-divider-size: 6px;
--surrealist-gradient: linear-gradient(110deg, var(--mantine-color-surreal-filled) 0%, #9600FF 100%);
--surrealist-divider-size: 6px;
--surrealist-gradient: linear-gradient(110deg, var(--mantine-color-surreal-filled) 0%, #9600FF 100%);
}

:root[data-mantine-color-scheme="light"] {
--surrealist-divider-color: var(--mantine-color-slate-0);
--surrealist-glow: 0 3px 15px rgba(186, 0, 171, 0.5);
--surrealist-divider-color: var(--mantine-color-slate-0);
--surrealist-glow: 0 3px 15px rgba(186, 0, 171, 0.5);
--surrealist-indent-color: var(--mantine-color-slate-1);
--surrealist-indent-active-color: var(--mantine-color-slate-2);
--surrealist-kind-color: #8d6bff;
--surrealist-divider-color: var(--mantine-color-slate-1);
--mantine-color-body: var(--mantine-color-white);
--mantine-color-body: var(--mantine-color-white);
}

:root[data-mantine-color-scheme="dark"] {
--surrealist-divider-color: var(--mantine-color-slate-9);
--surrealist-glow: 0 5px 20px -4px rgba(186, 0, 171, 1), 0 3px 15px rgba(186, 0, 171, 0.5);
--surrealist-divider-color: var(--mantine-color-slate-9);
--surrealist-glow: 0 5px 20px -4px rgba(186, 0, 171, 1), 0 3px 15px rgba(186, 0, 171, 0.5);
--surrealist-indent-color: var(--mantine-color-slate-7);
--surrealist-indent-active-color: var(--mantine-color-slate-6);
--surrealist-kind-color: #a79fff;
--surrealist-divider-color: var(--mantine-color-slate-7);
--mantine-color-body: var(--mantine-color-slate-8);
--mantine-color-body: var(--mantine-color-slate-8);
}

.__dbk__container {
overflow: visible;
overflow: visible;
}

body.mod .cm-record-link:hover {
Expand All @@ -37,26 +37,29 @@ body.mod .cm-record-link:hover {
}
}

.mantine-contextmenu-item-button > div:not(.mantine-contextmenu-item-button-title) {
font-size: 0.65rem !important;
.mantine-contextmenu-item-button>div:not(.mantine-contextmenu-item-button-title) {
font-size: 0.65rem !important;
}

.mantine-contextmenu {
padding: var(--mantine-spacing-xs);
padding: var(--mantine-spacing-xs);
}

.mantine-contextmenu-item-button {
border-radius: var(--mantine-radius-xs);
border-radius: var(--mantine-radius-xs);
}

.mantine-contextmenu-divider {
margin-block: var(--mantine-spacing-xs);
margin-block: var(--mantine-spacing-xs);
}

.mantine-contextmenu, .mantine-Popover-dropdown, .mantine-Menu-dropdown, .mantine-HoverCard-dropdown {
background-color: color-mix(in srgb, var(--mantine-color-body) 87.5%, transparent);
backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5px);
.mantine-contextmenu,
.mantine-Popover-dropdown,
.mantine-Menu-dropdown,
.mantine-HoverCard-dropdown {
background-color: color-mix(in srgb, var(--mantine-color-body) 87.5%, transparent);
backdrop-filter: blur(5px);
-webkit-backdrop-filter: blur(5px);
}

.mantine-Button-root:where(:disabled:not([data-loading]), [data-disabled]:not([data-loading])) {
Expand Down Expand Up @@ -91,76 +94,81 @@ body.mod .cm-record-link:hover {

.mantine-Tabs-tab {

&:hover {
background-color: var(--mantine-color-slate-7);
color: var(--mantine-color-bright);
&:hover {
background-color: var(--mantine-color-slate-7);
color: var(--mantine-color-bright);

@include light {
background-color: var(--mantine-color-slate-0);
}
}
&[data-active] {
background: var(--surrealist-gradient);
background-origin: border-box;
}

&[data-active] {
background: var(--surrealist-gradient);
background-origin: border-box;
color: var(--mantine-color-white);
}
}
}

.mantine-Checkbox-root {

.mantine-Checkbox-input {
background-color: var(--mantine-color-body);
}
.mantine-Checkbox-input {
background-color: var(--mantine-color-body);
}

&[data-checked] .mantine-Checkbox-input {
background: var(--surrealist-gradient);
background-origin: border-box;
border-color: rgba(255, 255, 255, 0.3);
}
&[data-checked] .mantine-Checkbox-input {
background: var(--surrealist-gradient);
background-origin: border-box;
border-color: rgba(255, 255, 255, 0.3);
}

&[data-checked] .mantine-Checkbox-icon {
color: white !important;
}
color: white !important;
}
}

.mantine-Radio-root {
&[data-checked] .mantine-Radio-radio {
background: var(--surrealist-gradient);
background-origin: border-box;
border-color: rgba(255, 255, 255, 0.3);
}

&[data-checked] .mantine-Radio-radio {
background: var(--surrealist-gradient);
background-origin: border-box;
border-color: rgba(255, 255, 255, 0.3);
}

}

.mantine-Input-input {
transition: all .2s;
background-color: var(--mantine-color-body);
&:not(:focus-within):not([data-variant="unstyled"]) {
border-color: var(--mantine-color-slate-6);
transition: all .2s;
background-color: var(--mantine-color-body);

&:not(:focus-within):not([data-variant="unstyled"]) {
border-color: var(--mantine-color-slate-6);

@include light {
border-color: var(--mantine-color-slate-1);
}
}
@include light {
border-color: var(--mantine-color-slate-1);
}
}

&:hover, &:focus-within {
background-color: var(--mantine-color-slate-7);
&:hover,
&:focus-within {
background-color: var(--mantine-color-slate-7);

@include light {
background-color: var(--mantine-color-slate-0);
}
}
@include light {
background-color: var(--mantine-color-slate-0);
}
}
}

.mantine-Select-option:hover {
background-color: rgba(255, 255, 255, 0.075);
.mantine-Select-option {
border-radius: var(--mantine-radius-xs);

@include light {
background-color: rgba(0, 0, 0, 0.075);
}
&:hover {
background-color: rgba(255, 255, 255, 0.075);

@include light {
background-color: rgba(0, 0, 0, 0.075);
}
}
}

.mantine-Select-group {
Expand Down Expand Up @@ -188,21 +196,21 @@ body.mod .cm-record-link:hover {
}

.mantine-Slider-bar {
background: var(--surrealist-gradient);
background: var(--surrealist-gradient);
}

.mantine-Slider-mark {
background-color: rgba(255, 255, 255, 0.3);
border-color: transparent;
background-color: rgba(255, 255, 255, 0.3);
border-color: transparent;
}

.mantine-InputWrapper-required {
color: var(--mantine-color-surreal-6);
color: var(--mantine-color-surreal-6);
color: var(--mantine-color-surreal-6);
color: var(--mantine-color-surreal-6);
}

.mantine-InputWrapper-description {
font-size: var(--mantine-font-size-xs);
font-size: var(--mantine-font-size-xs);
}

.mantine-InputWrapper-label {
Expand Down
3 changes: 2 additions & 1 deletion src/constants.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ import {
iconProgressClock,
iconQuery,
iconServer,
iconSidekick,
} from "./util/icons";

import type { MantineColorScheme } from "@mantine/core";
Expand Down Expand Up @@ -306,7 +307,7 @@ export const CLOUD_PAGES: Record<CloudPage, CloudPageInfo> = {
chat: {
id: "chat",
name: "Sidekick",
icon: iconChat,
icon: iconSidekick,
},
};

Expand Down
14 changes: 12 additions & 2 deletions src/screens/cloud-manage/components/Section/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,18 @@ export function Section({
return (
<Box>
<PrimaryTitle>{title}</PrimaryTitle>
{description && <Text fz="lg">{description}</Text>}
<Stack py="xl" maw={withMaxWidth ? 500 : undefined}>
{description && (
<Text
fz="lg"
mt="xs"
>
{description}
</Text>
)}
<Stack
py="xl"
maw={withMaxWidth ? 500 : undefined}
>
{children}
</Stack>
</Box>
Expand Down
9 changes: 5 additions & 4 deletions src/screens/cloud-manage/pages/Billing/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,6 @@ export function BillingPage() {
<Box
flex={1}
pos="relative"
w="100%"
maw={900}
mx="auto"
>
<ScrollArea
pos="absolute"
Expand All @@ -226,7 +223,11 @@ export function BillingPage() {
style: { paddingBottom: 75 },
}}
>
<Stack>
<Stack
gap={42}
mx="auto"
maw={900}
>
{organization?.plan && (
<Section
title="Your plan"
Expand Down
Loading
Loading