mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-06 08:16:03 +00:00
Merge remote-tracking branch 'origin/main' into vorflux/connector-sync-visibility
This commit is contained in:
commit
f93d3f0c27
5 changed files with 671 additions and 375 deletions
|
|
@ -238,8 +238,7 @@ async function getRelatedMemoriesForT3(actionSource: string) {
|
|||
}
|
||||
|
||||
if (textareaElement) {
|
||||
textareaElement.dataset.supermemories =
|
||||
`\n\nSupermemories of user (only for the reference): ${response.data}`
|
||||
textareaElement.dataset.supermemories = `\n\nSupermemories of user (only for the reference): ${response.data}`
|
||||
|
||||
iconElement.dataset.memoriesData = response.data
|
||||
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -188,14 +188,21 @@ function formatOrgRole(role: string): string {
|
|||
}
|
||||
|
||||
export default function Account() {
|
||||
const { user, org, setActiveOrg, clearActiveOrg } = useAuth()
|
||||
const {
|
||||
user,
|
||||
org,
|
||||
organizations: allOrgs,
|
||||
setActiveOrg,
|
||||
clearActiveOrg,
|
||||
} = useAuth()
|
||||
const autumn = useCustomer()
|
||||
const [isUpgrading, setIsUpgrading] = useState(false)
|
||||
const [emailConfirm, setEmailConfirm] = useState("")
|
||||
const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false)
|
||||
const [isClosingAccount, setIsClosingAccount] = useState(false)
|
||||
const [switchingOrgId, setSwitchingOrgId] = useState<string | null>(null)
|
||||
const { data: allOrgs } = authClient.useListOrganizations()
|
||||
const [orgMenuOpen, setOrgMenuOpen] = useState(false)
|
||||
const canSwitchOrg = (allOrgs?.length ?? 0) > 1
|
||||
const { data: memberships, isPending: membershipsPending } =
|
||||
useAccountMemberships()
|
||||
|
||||
|
|
@ -363,10 +370,19 @@ export default function Account() {
|
|||
>
|
||||
Organization
|
||||
</p>
|
||||
<Popover>
|
||||
<Popover
|
||||
open={orgMenuOpen && canSwitchOrg}
|
||||
onOpenChange={(open) => {
|
||||
if (canSwitchOrg) setOrgMenuOpen(open)
|
||||
}}
|
||||
>
|
||||
<PopoverTrigger
|
||||
disabled={!canSwitchOrg}
|
||||
className={cn(
|
||||
"flex items-center gap-2 cursor-pointer transition-opacity hover:opacity-90",
|
||||
"flex items-center gap-2 transition-opacity",
|
||||
canSwitchOrg
|
||||
? "cursor-pointer hover:opacity-90"
|
||||
: "cursor-default",
|
||||
dmSans125ClassName(),
|
||||
)}
|
||||
>
|
||||
|
|
@ -378,14 +394,16 @@ export default function Account() {
|
|||
>
|
||||
{org?.name ?? "Personal"}
|
||||
</span>
|
||||
<ChevronDown className="size-4 text-[#737373]" />
|
||||
{canSwitchOrg && (
|
||||
<ChevronDown className="size-4 text-[#737373]" />
|
||||
)}
|
||||
</PopoverTrigger>
|
||||
{allOrgs && allOrgs.length > 1 && (
|
||||
{canSwitchOrg && (
|
||||
<PopoverContent
|
||||
align="start"
|
||||
className="w-72 bg-[#1B1F24] rounded-[12px] border-white/10 p-1.5 shadow-[0px_4px_16px_rgba(0,0,0,0.4)]"
|
||||
>
|
||||
{allOrgs.map((organization) => {
|
||||
{allOrgs?.map((organization) => {
|
||||
const isCurrent = organization.id === org?.id
|
||||
const isSwitching = switchingOrgId === organization.id
|
||||
return (
|
||||
|
|
|
|||
|
|
@ -65,6 +65,14 @@
|
|||
scrollbar-color: var(--sm-scrollbar-thumb) transparent;
|
||||
}
|
||||
|
||||
.scrollbar-none {
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
.scrollbar-none::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.sm-tweet-theme .react-tweet-theme {
|
||||
--tweet-container-margin: 0px;
|
||||
font-size: inherit !important;
|
||||
|
|
|
|||
BIN
apps/web/public/images/plugins/codex.png
Normal file
BIN
apps/web/public/images/plugins/codex.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.4 KiB |
Loading…
Add table
Reference in a new issue