Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
canifa_note
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Vũ Hoàng Anh
canifa_note
Commits
fb13d2e6
Commit
fb13d2e6
authored
Jul 07, 2025
by
Johnny
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
chore: tweak colors
parent
d8d88c25
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
188 additions
and
107 deletions
+188
-107
ActivityCalendar.tsx
web/src/components/ActivityCalendar/ActivityCalendar.tsx
+4
-4
HomeSidebar.tsx
web/src/components/HomeSidebar/HomeSidebar.tsx
+1
-1
HomeSidebarDrawer.tsx
web/src/components/HomeSidebar/HomeSidebarDrawer.tsx
+1
-1
LocationSelector.tsx
...c/components/MemoEditor/ActionButton/LocationSelector.tsx
+16
-13
Navigation.tsx
web/src/components/Navigation.tsx
+1
-6
NavigationDrawer.tsx
web/src/components/NavigationDrawer.tsx
+5
-2
SearchBar.tsx
web/src/components/SearchBar.tsx
+1
-1
dropdown-menu.tsx
web/src/components/ui/dropdown-menu.tsx
+23
-10
popover.tsx
web/src/components/ui/popover.tsx
+27
-10
sheet.tsx
web/src/components/ui/sheet.tsx
+69
-36
tooltip.tsx
web/src/components/ui/tooltip.tsx
+26
-9
RootLayout.tsx
web/src/layouts/RootLayout.tsx
+1
-1
style.css
web/src/style.css
+13
-13
No files found.
web/src/components/ActivityCalendar/ActivityCalendar.tsx
View file @
fb13d2e6
...
...
@@ -9,10 +9,10 @@ import { useTranslate } from "@/utils/i18n";
const
getCellOpacity
=
(
ratio
:
number
):
string
=>
{
if
(
ratio
===
0
)
return
""
;
if
(
ratio
>
0.75
)
return
"bg-
primary/90 text-primary
-foreground"
;
if
(
ratio
>
0.5
)
return
"bg-
primary/70 text-primary
-foreground"
;
if
(
ratio
>
0.25
)
return
"bg-
primary/50 text-primary
-foreground"
;
return
"bg-
primary/30 text-primary
-foreground"
;
if
(
ratio
>
0.75
)
return
"bg-
destructive text-destructive
-foreground"
;
if
(
ratio
>
0.5
)
return
"bg-
destructive/70 text-destructive
-foreground"
;
if
(
ratio
>
0.25
)
return
"bg-
destructive/50 text-destructive
-foreground"
;
return
"bg-
destructive/30 text-destructive
-foreground"
;
};
const
CalendarCell
=
memo
(
...
...
web/src/components/HomeSidebar/HomeSidebar.tsx
View file @
fb13d2e6
...
...
@@ -45,9 +45,9 @@ const HomeSidebar = observer((props: Props) => {
)
}
>
<
SearchBar
/>
<
MemoFilters
/>
<
div
className=
"mt-1 px-1 w-full"
>
<
StatisticsView
/>
<
MemoFilters
/>
{
currentUser
&&
<
ShortcutsSection
/>
}
<
TagsSection
/>
</
div
>
...
...
web/src/components/HomeSidebar/HomeSidebarDrawer.tsx
View file @
fb13d2e6
...
...
@@ -22,7 +22,7 @@ const HomeSidebarDrawer = () => {
</
SheetTrigger
>
<
SheetContent
side=
"right"
className=
"w-80 max-w-full bg-background"
>
<
SheetHeader
>
<
SheetTitle
></
SheetTitle
>
<
SheetTitle
/
>
</
SheetHeader
>
<
HomeSidebar
className=
"px-4"
/>
</
SheetContent
>
...
...
web/src/components/MemoEditor/ActionButton/LocationSelector.tsx
View file @
fb13d2e6
...
...
@@ -86,28 +86,31 @@ const LocationSelector = (props: Props) => {
setState
({
...
state
,
position
});
};
const
removeLocation
=
(
e
:
React
.
MouseEvent
)
=>
{
console
.
log
(
"here"
);
e
.
preventDefault
();
e
.
stopPropagation
();
const
removeLocation
=
()
=>
{
props
.
onChange
(
undefined
);
};
return
(
<
Popover
open=
{
popoverOpen
}
onOpenChange=
{
setPopoverOpen
}
>
<
PopoverTrigger
asChild
>
{
props
.
location
?
(
<
Button
variant=
"ghost"
>
<
div
className=
"flex items-center"
>
<
PopoverTrigger
asChild
>
<
Button
variant=
"ghost"
className=
"rounded-r-none"
>
<
MapPinIcon
className=
"size-5 shrink-0"
/>
<
span
className=
"ml-0.5 text-sm text-ellipsis whitespace-nowrap overflow-hidden max-w-32"
>
{
props
.
location
.
placeholder
}
</
span
>
<
XIcon
className=
"size-5 mx-auto shrink-0 opacity-60 hover:opacity-80"
onClick=
{
removeLocation
}
/>
<
span
className=
"ml-0.5 text-sm text-ellipsis whitespace-nowrap overflow-hidden max-w-28"
>
{
props
.
location
.
placeholder
}
</
span
>
</
Button
>
</
PopoverTrigger
>
<
Button
variant=
"ghost"
size=
"icon"
className=
"rounded-l-none opacity-60 hover:opacity-80"
onClick=
{
removeLocation
}
>
<
XIcon
className=
"size-4 shrink-0"
/>
</
Button
>
</
div
>
)
:
(
<
PopoverTrigger
asChild
>
<
Button
variant=
"ghost"
size=
"icon"
>
<
MapPinIcon
className=
"size-5 shrink-0"
/>
</
Button
>
)
}
</
PopoverTrigger
>
)
}
<
PopoverContent
align=
"center"
>
<
div
className=
"min-w-80 sm:w-lg p-1 flex flex-col justify-start items-start"
>
<
LeafletMap
key=
{
JSON
.
stringify
(
state
.
initilized
)
}
latlng=
{
state
.
position
}
onChange=
{
onPositionChanged
}
/>
...
...
web/src/components/Navigation.tsx
View file @
fb13d2e6
...
...
@@ -64,12 +64,7 @@ const Navigation = observer((props: Props) => {
const
navLinks
:
NavLinkItem
[]
=
currentUser
?
[
homeNavLink
,
exploreNavLink
,
attachmentsNavLink
]
:
[
exploreNavLink
,
signInNavLink
];
return
(
<
header
className=
{
cn
(
"w-full h-full overflow-auto flex flex-col justify-between items-start gap-4 py-4 md:pt-6 z-30 hide-scrollbar"
,
className
,
)
}
>
<
header
className=
{
cn
(
"w-full h-full overflow-auto flex flex-col justify-between items-start gap-4 hide-scrollbar"
,
className
)
}
>
<
div
className=
"w-full px-1 py-1 flex flex-col justify-start items-start space-y-2 overflow-auto overflow-x-hidden hide-scrollbar shrink"
>
<
NavLink
className=
"mb-3 cursor-default"
to=
{
currentUser
?
Routes
.
ROOT
:
Routes
.
EXPLORE
}
>
<
BrandBanner
collapsed=
{
collapsed
}
/>
...
...
web/src/components/NavigationDrawer.tsx
View file @
fb13d2e6
...
...
@@ -2,7 +2,7 @@ import { observer } from "mobx-react-lite";
import
{
useEffect
,
useState
}
from
"react"
;
import
{
useLocation
}
from
"react-router-dom"
;
import
{
Button
}
from
"@/components/ui/button"
;
import
{
Sheet
,
SheetContent
,
SheetTrigger
}
from
"@/components/ui/sheet"
;
import
{
Sheet
,
SheetContent
,
Sheet
Header
,
SheetTitle
,
Sheet
Trigger
}
from
"@/components/ui/sheet"
;
import
{
workspaceStore
}
from
"@/store/v2"
;
import
Navigation
from
"./Navigation"
;
import
UserAvatar
from
"./UserAvatar"
;
...
...
@@ -27,7 +27,10 @@ const NavigationDrawer = observer(() => {
</
Button
>
</
SheetTrigger
>
<
SheetContent
side=
"left"
className=
"w-80 max-w-full overflow-auto px-2 bg-background"
>
<
Navigation
/>
<
SheetHeader
>
<
SheetTitle
/>
</
SheetHeader
>
<
Navigation
className=
"pb-4"
/>
</
SheetContent
>
</
Sheet
>
);
...
...
web/src/components/SearchBar.tsx
View file @
fb13d2e6
...
...
@@ -35,7 +35,7 @@ const SearchBar = observer(() => {
<
div
className=
"relative w-full h-auto flex flex-row justify-start items-center"
>
<
SearchIcon
className=
"absolute left-2 w-4 h-auto opacity-40 text-muted-foreground"
/>
<
input
className=
{
cn
(
"w-full text-muted-foreground leading-6 bg-
popover border border-border text-sm rounded-xl
p-1 pl-8 outline-0"
)
}
className=
{
cn
(
"w-full text-muted-foreground leading-6 bg-
muted border border-border text-sm rounded-lg
p-1 pl-8 outline-0"
)
}
placeholder=
{
t
(
"memo.search-placeholder"
)
}
value=
{
queryText
}
onChange=
{
onTextChange
}
...
...
web/src/components/ui/dropdown-menu.tsx
View file @
fb13d2e6
...
...
@@ -3,22 +3,34 @@ import { CheckIcon, ChevronRightIcon, CircleIcon } from "lucide-react";
import
*
as
React
from
"react"
;
import
{
cn
}
from
"@/lib/utils"
;
function
DropdownMenu
({
...
props
}:
React
.
ComponentProps
<
typeof
DropdownMenuPrimitive
.
Root
>
)
{
const
DropdownMenu
=
React
.
forwardRef
<
React
.
ElementRef
<
typeof
DropdownMenuPrimitive
.
Root
>
,
React
.
ComponentPropsWithoutRef
<
typeof
DropdownMenuPrimitive
.
Root
>
>
(({
...
props
})
=>
{
return
<
DropdownMenuPrimitive
.
Root
data
-
slot=
"dropdown-menu"
{
...
props
}
/>;
}
});
DropdownMenu
.
displayName
=
"DropdownMenu"
;
function
DropdownMenuPortal
({
...
props
}:
React
.
ComponentProps
<
typeof
DropdownMenuPrimitive
.
Portal
>
)
{
const
DropdownMenuPortal
=
({
...
props
}:
React
.
ComponentProps
<
typeof
DropdownMenuPrimitive
.
Portal
>
)
=>
{
return
<
DropdownMenuPrimitive
.
Portal
data
-
slot=
"dropdown-menu-portal"
{
...
props
}
/>;
}
function
DropdownMenuTrigger
({
...
props
}:
React
.
ComponentProps
<
typeof
DropdownMenuPrimitive
.
Trigger
>
)
{
return
<
DropdownMenuPrimitive
.
Trigger
data
-
slot=
"dropdown-menu-trigger"
{
...
props
}
/>;
}
};
function
DropdownMenuContent
({
className
,
sideOffset
=
4
,
...
props
}:
React
.
ComponentProps
<
typeof
DropdownMenuPrimitive
.
Content
>
)
{
const
DropdownMenuTrigger
=
React
.
forwardRef
<
React
.
ElementRef
<
typeof
DropdownMenuPrimitive
.
Trigger
>
,
React
.
ComponentPropsWithoutRef
<
typeof
DropdownMenuPrimitive
.
Trigger
>
>
(({
...
props
},
ref
)
=>
{
return
<
DropdownMenuPrimitive
.
Trigger
ref=
{
ref
}
data
-
slot=
"dropdown-menu-trigger"
{
...
props
}
/>;
});
DropdownMenuTrigger
.
displayName
=
"DropdownMenuTrigger"
;
const
DropdownMenuContent
=
React
.
forwardRef
<
React
.
ElementRef
<
typeof
DropdownMenuPrimitive
.
Content
>
,
React
.
ComponentPropsWithoutRef
<
typeof
DropdownMenuPrimitive
.
Content
>
>
(({
className
,
sideOffset
=
4
,
...
props
},
ref
)
=>
{
return
(
<
DropdownMenuPrimitive
.
Portal
>
<
DropdownMenuPrimitive
.
Content
ref=
{
ref
}
data
-
slot=
"dropdown-menu-content"
sideOffset=
{
sideOffset
}
className=
{
cn
(
...
...
@@ -29,7 +41,8 @@ function DropdownMenuContent({ className, sideOffset = 4, ...props }: React.Comp
/>
</
DropdownMenuPrimitive
.
Portal
>
);
}
});
DropdownMenuContent
.
displayName
=
"DropdownMenuContent"
;
function
DropdownMenuGroup
({
...
props
}:
React
.
ComponentProps
<
typeof
DropdownMenuPrimitive
.
Group
>
)
{
return
<
DropdownMenuPrimitive
.
Group
data
-
slot=
"dropdown-menu-group"
{
...
props
}
/>;
...
...
web/src/components/ui/popover.tsx
View file @
fb13d2e6
...
...
@@ -2,18 +2,30 @@ import * as PopoverPrimitive from "@radix-ui/react-popover";
import
*
as
React
from
"react"
;
import
{
cn
}
from
"@/lib/utils"
;
function
Popover
({
...
props
}:
React
.
ComponentProps
<
typeof
PopoverPrimitive
.
Root
>
)
{
const
Popover
=
React
.
forwardRef
<
React
.
ElementRef
<
typeof
PopoverPrimitive
.
Root
>
,
React
.
ComponentPropsWithoutRef
<
typeof
PopoverPrimitive
.
Root
>
>
(({
...
props
})
=>
{
return
<
PopoverPrimitive
.
Root
data
-
slot=
"popover"
{
...
props
}
/>;
}
});
Popover
.
displayName
=
"Popover"
;
function
PopoverTrigger
({
...
props
}:
React
.
ComponentProps
<
typeof
PopoverPrimitive
.
Trigger
>
)
{
return
<
PopoverPrimitive
.
Trigger
data
-
slot=
"popover-trigger"
{
...
props
}
/>;
}
const
PopoverTrigger
=
React
.
forwardRef
<
React
.
ElementRef
<
typeof
PopoverPrimitive
.
Trigger
>
,
React
.
ComponentPropsWithoutRef
<
typeof
PopoverPrimitive
.
Trigger
>
>
(({
...
props
},
ref
)
=>
{
return
<
PopoverPrimitive
.
Trigger
ref=
{
ref
}
data
-
slot=
"popover-trigger"
{
...
props
}
/>;
});
PopoverTrigger
.
displayName
=
"PopoverTrigger"
;
function
PopoverContent
({
className
,
align
=
"center"
,
sideOffset
=
4
,
...
props
}:
React
.
ComponentProps
<
typeof
PopoverPrimitive
.
Content
>
)
{
const
PopoverContent
=
React
.
forwardRef
<
React
.
ElementRef
<
typeof
PopoverPrimitive
.
Content
>
,
React
.
ComponentPropsWithoutRef
<
typeof
PopoverPrimitive
.
Content
>
>
(({
className
,
align
=
"center"
,
sideOffset
=
4
,
...
props
},
ref
)
=>
{
return
(
<
PopoverPrimitive
.
Portal
>
<
PopoverPrimitive
.
Content
ref=
{
ref
}
data
-
slot=
"popover-content"
align=
{
align
}
sideOffset=
{
sideOffset
}
...
...
@@ -25,10 +37,15 @@ function PopoverContent({ className, align = "center", sideOffset = 4, ...props
/>
</
PopoverPrimitive
.
Portal
>
);
}
});
PopoverContent
.
displayName
=
"PopoverContent"
;
function
PopoverAnchor
({
...
props
}:
React
.
ComponentProps
<
typeof
PopoverPrimitive
.
Anchor
>
)
{
return
<
PopoverPrimitive
.
Anchor
data
-
slot=
"popover-anchor"
{
...
props
}
/>;
}
const
PopoverAnchor
=
React
.
forwardRef
<
React
.
ElementRef
<
typeof
PopoverPrimitive
.
Anchor
>
,
React
.
ComponentPropsWithoutRef
<
typeof
PopoverPrimitive
.
Anchor
>
>
(({
...
props
},
ref
)
=>
{
return
<
PopoverPrimitive
.
Anchor
ref=
{
ref
}
data
-
slot=
"popover-anchor"
{
...
props
}
/>;
});
PopoverAnchor
.
displayName
=
"PopoverAnchor"
;
export
{
Popover
,
PopoverTrigger
,
PopoverContent
,
PopoverAnchor
};
web/src/components/ui/sheet.tsx
View file @
fb13d2e6
...
...
@@ -3,25 +3,40 @@ import { XIcon } from "lucide-react";
import
*
as
React
from
"react"
;
import
{
cn
}
from
"@/lib/utils"
;
function
Sheet
({
...
props
}:
React
.
ComponentProps
<
typeof
SheetPrimitive
.
Root
>
)
{
const
Sheet
=
React
.
forwardRef
<
React
.
ElementRef
<
typeof
SheetPrimitive
.
Root
>
,
React
.
ComponentPropsWithoutRef
<
typeof
SheetPrimitive
.
Root
>>
(
({
...
props
})
=>
{
return
<
SheetPrimitive
.
Root
data
-
slot=
"sheet"
{
...
props
}
/>;
}
},
);
Sheet
.
displayName
=
"Sheet"
;
function
SheetTrigger
({
...
props
}:
React
.
ComponentProps
<
typeof
SheetPrimitive
.
Trigger
>
)
{
return
<
SheetPrimitive
.
Trigger
data
-
slot=
"sheet-trigger"
{
...
props
}
/>;
}
const
SheetTrigger
=
React
.
forwardRef
<
React
.
ElementRef
<
typeof
SheetPrimitive
.
Trigger
>
,
React
.
ComponentPropsWithoutRef
<
typeof
SheetPrimitive
.
Trigger
>
>
(({
...
props
},
ref
)
=>
{
return
<
SheetPrimitive
.
Trigger
ref=
{
ref
}
data
-
slot=
"sheet-trigger"
{
...
props
}
/>;
});
SheetTrigger
.
displayName
=
"SheetTrigger"
;
function
SheetClose
({
...
props
}:
React
.
ComponentProps
<
typeof
SheetPrimitive
.
Close
>
)
{
return
<
SheetPrimitive
.
Close
data
-
slot=
"sheet-close"
{
...
props
}
/>;
}
const
SheetClose
=
React
.
forwardRef
<
React
.
ElementRef
<
typeof
SheetPrimitive
.
Close
>
,
React
.
ComponentPropsWithoutRef
<
typeof
SheetPrimitive
.
Close
>
>
(({
...
props
},
ref
)
=>
{
return
<
SheetPrimitive
.
Close
ref=
{
ref
}
data
-
slot=
"sheet-close"
{
...
props
}
/>;
});
SheetClose
.
displayName
=
"SheetClose"
;
function
SheetPortal
({
...
props
}:
React
.
ComponentProps
<
typeof
SheetPrimitive
.
Portal
>
)
{
const
SheetPortal
=
({
...
props
}:
React
.
ComponentProps
<
typeof
SheetPrimitive
.
Portal
>
)
=>
{
return
<
SheetPrimitive
.
Portal
data
-
slot=
"sheet-portal"
{
...
props
}
/>;
}
}
;
function
SheetOverlay
({
className
,
...
props
}:
React
.
ComponentProps
<
typeof
SheetPrimitive
.
Overlay
>
)
{
const
SheetOverlay
=
React
.
forwardRef
<
React
.
ElementRef
<
typeof
SheetPrimitive
.
Overlay
>
,
React
.
ComponentPropsWithoutRef
<
typeof
SheetPrimitive
.
Overlay
>
>
(({
className
,
...
props
},
ref
)
=>
{
return
(
<
SheetPrimitive
.
Overlay
ref=
{
ref
}
data
-
slot=
"sheet-overlay"
className=
{
cn
(
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-foreground/50"
,
...
...
@@ -30,20 +45,20 @@ function SheetOverlay({ className, ...props }: React.ComponentProps<typeof Sheet
{
...
props
}
/>
);
}
});
SheetOverlay
.
displayName
=
"SheetOverlay"
;
function
SheetContent
({
className
,
children
,
side
=
"right"
,
...
props
}:
React
.
ComponentProps
<
typeof
SheetPrimitive
.
Content
>
&
{
const
SheetContent
=
React
.
forwardRef
<
React
.
ElementRef
<
typeof
SheetPrimitive
.
Content
>
,
React
.
ComponentPropsWithoutRef
<
typeof
SheetPrimitive
.
Content
>
&
{
side
?:
"top"
|
"right"
|
"bottom"
|
"left"
;
})
{
}
>
(({
className
,
children
,
side
=
"right"
,
...
props
},
ref
)
=>
{
return
(
<
SheetPortal
>
<
SheetOverlay
/>
<
SheetPrimitive
.
Content
ref=
{
ref
}
data
-
slot=
"sheet-content"
className=
{
cn
(
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 flex flex-col gap-4 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500"
,
...
...
@@ -59,29 +74,47 @@ function SheetContent({
{
...
props
}
>
{
children
}
<
SheetPrimitive
.
Close
className=
"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-
7
0 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none"
>
<
XIcon
className=
"size-
4
"
/>
<
SheetPrimitive
.
Close
className=
"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute top-4 right-4 rounded-xs opacity-
6
0 transition-opacity hover:opacity-100 focus:ring-2 focus:ring-offset-2 focus:outline-hidden disabled:pointer-events-none"
>
<
XIcon
className=
"size-
5
"
/>
<
span
className=
"sr-only"
>
Close
</
span
>
</
SheetPrimitive
.
Close
>
</
SheetPrimitive
.
Content
>
</
SheetPortal
>
);
}
});
SheetContent
.
displayName
=
"SheetContent"
;
function
SheetHeader
({
className
,
...
props
}:
React
.
ComponentProps
<
"div"
>
)
{
return
<
div
data
-
slot=
"sheet-header"
className=
{
cn
(
"flex flex-col gap-1.5 p-4"
,
className
)
}
{
...
props
}
/>;
}
const
SheetHeader
=
React
.
forwardRef
<
React
.
ElementRef
<
"div"
>
,
React
.
ComponentPropsWithoutRef
<
"div"
>>
(({
className
,
...
props
},
ref
)
=>
{
return
<
div
ref=
{
ref
}
data
-
slot=
"sheet-header"
className=
{
cn
(
"flex flex-col gap-1.5 p-4"
,
className
)
}
{
...
props
}
/>;
});
SheetHeader
.
displayName
=
"SheetHeader"
;
function
SheetFooter
({
className
,
...
props
}:
React
.
ComponentProps
<
"div"
>
)
{
return
<
div
data
-
slot=
"sheet-footer"
className=
{
cn
(
"mt-auto flex flex-col gap-2 p-4"
,
className
)
}
{
...
props
}
/>;
}
const
SheetFooter
=
React
.
forwardRef
<
React
.
ElementRef
<
"div"
>
,
React
.
ComponentPropsWithoutRef
<
"div"
>>
(({
className
,
...
props
},
ref
)
=>
{
return
<
div
ref=
{
ref
}
data
-
slot=
"sheet-footer"
className=
{
cn
(
"mt-auto flex flex-col gap-2 p-4"
,
className
)
}
{
...
props
}
/>;
});
SheetFooter
.
displayName
=
"SheetFooter"
;
function
SheetTitle
({
className
,
...
props
}:
React
.
ComponentProps
<
typeof
SheetPrimitive
.
Title
>
)
{
return
<
SheetPrimitive
.
Title
data
-
slot=
"sheet-title"
className=
{
cn
(
"text-foreground font-semibold"
,
className
)
}
{
...
props
}
/>;
}
const
SheetTitle
=
React
.
forwardRef
<
React
.
ElementRef
<
typeof
SheetPrimitive
.
Title
>
,
React
.
ComponentPropsWithoutRef
<
typeof
SheetPrimitive
.
Title
>
>
(({
className
,
...
props
},
ref
)
=>
{
return
<
SheetPrimitive
.
Title
ref=
{
ref
}
data
-
slot=
"sheet-title"
className=
{
cn
(
"text-foreground font-semibold"
,
className
)
}
{
...
props
}
/>;
});
SheetTitle
.
displayName
=
"SheetTitle"
;
function
SheetDescription
({
className
,
...
props
}:
React
.
ComponentProps
<
typeof
SheetPrimitive
.
Description
>
)
{
return
<
SheetPrimitive
.
Description
data
-
slot=
"sheet-description"
className=
{
cn
(
"text-muted-foreground text-sm"
,
className
)
}
{
...
props
}
/>;
}
const
SheetDescription
=
React
.
forwardRef
<
React
.
ElementRef
<
typeof
SheetPrimitive
.
Description
>
,
React
.
ComponentPropsWithoutRef
<
typeof
SheetPrimitive
.
Description
>
>
(({
className
,
...
props
},
ref
)
=>
{
return
(
<
SheetPrimitive
.
Description
ref=
{
ref
}
data
-
slot=
"sheet-description"
className=
{
cn
(
"text-muted-foreground text-sm"
,
className
)
}
{
...
props
}
/>
);
});
SheetDescription
.
displayName
=
"SheetDescription"
;
export
{
Sheet
,
SheetTrigger
,
SheetClose
,
SheetContent
,
SheetHeader
,
SheetFooter
,
SheetTitle
,
SheetDescription
};
web/src/components/ui/tooltip.tsx
View file @
fb13d2e6
...
...
@@ -2,26 +2,42 @@ import * as TooltipPrimitive from "@radix-ui/react-tooltip";
import
*
as
React
from
"react"
;
import
{
cn
}
from
"@/lib/utils"
;
function
TooltipProvider
({
delayDuration
=
0
,
...
props
}:
React
.
ComponentProps
<
typeof
TooltipPrimitive
.
Provider
>
)
{
const
TooltipProvider
=
React
.
forwardRef
<
React
.
ElementRef
<
typeof
TooltipPrimitive
.
Provider
>
,
React
.
ComponentPropsWithoutRef
<
typeof
TooltipPrimitive
.
Provider
>
>
(({
delayDuration
=
0
,
...
props
})
=>
{
return
<
TooltipPrimitive
.
Provider
data
-
slot=
"tooltip-provider"
delayDuration=
{
delayDuration
}
{
...
props
}
/>;
}
});
TooltipProvider
.
displayName
=
"TooltipProvider"
;
function
Tooltip
({
...
props
}:
React
.
ComponentProps
<
typeof
TooltipPrimitive
.
Root
>
)
{
const
Tooltip
=
React
.
forwardRef
<
React
.
ElementRef
<
typeof
TooltipPrimitive
.
Root
>
,
React
.
ComponentPropsWithoutRef
<
typeof
TooltipPrimitive
.
Root
>
>
(({
...
props
})
=>
{
return
(
<
TooltipProvider
>
<
TooltipPrimitive
.
Root
data
-
slot=
"tooltip"
{
...
props
}
/>
</
TooltipProvider
>
);
}
});
Tooltip
.
displayName
=
"Tooltip"
;
function
TooltipTrigger
({
...
props
}:
React
.
ComponentProps
<
typeof
TooltipPrimitive
.
Trigger
>
)
{
return
<
TooltipPrimitive
.
Trigger
data
-
slot=
"tooltip-trigger"
{
...
props
}
/>;
}
const
TooltipTrigger
=
React
.
forwardRef
<
React
.
ElementRef
<
typeof
TooltipPrimitive
.
Trigger
>
,
React
.
ComponentPropsWithoutRef
<
typeof
TooltipPrimitive
.
Trigger
>
>
(({
...
props
},
ref
)
=>
{
return
<
TooltipPrimitive
.
Trigger
ref=
{
ref
}
data
-
slot=
"tooltip-trigger"
{
...
props
}
/>;
});
TooltipTrigger
.
displayName
=
"TooltipTrigger"
;
function
TooltipContent
({
className
,
sideOffset
=
0
,
children
,
...
props
}:
React
.
ComponentProps
<
typeof
TooltipPrimitive
.
Content
>
)
{
const
TooltipContent
=
React
.
forwardRef
<
React
.
ElementRef
<
typeof
TooltipPrimitive
.
Content
>
,
React
.
ComponentPropsWithoutRef
<
typeof
TooltipPrimitive
.
Content
>
>
(({
className
,
sideOffset
=
0
,
children
,
...
props
},
ref
)
=>
{
return
(
<
TooltipPrimitive
.
Portal
>
<
TooltipPrimitive
.
Content
ref=
{
ref
}
data
-
slot=
"tooltip-content"
sideOffset=
{
sideOffset
}
className=
{
cn
(
...
...
@@ -35,6 +51,7 @@ function TooltipContent({ className, sideOffset = 0, children, ...props }: React
</
TooltipPrimitive
.
Content
>
</
TooltipPrimitive
.
Portal
>
);
}
});
TooltipContent
.
displayName
=
"TooltipContent"
;
export
{
Tooltip
,
TooltipTrigger
,
TooltipContent
,
TooltipProvider
};
web/src/layouts/RootLayout.tsx
View file @
fb13d2e6
...
...
@@ -55,7 +55,7 @@ const RootLayout = observer(() => {
"border-r border-border"
,
)
}
>
<
Navigation
collapsed=
{
true
}
/>
<
Navigation
c
lassName=
"py-4 md:pt-6"
c
ollapsed=
{
true
}
/>
</
div
>
)
}
<
main
className=
"w-full h-auto grow shrink flex flex-col justify-start items-center"
>
...
...
web/src/style.css
View file @
fb13d2e6
...
...
@@ -13,8 +13,8 @@
--muted-foreground
:
oklch
(
0.5559
0.0075
97.4233
);
--accent
:
oklch
(
0.9245
0.0138
92.9892
);
--accent-foreground
:
oklch
(
0.2671
0.0196
98.939
);
--destructive
:
oklch
(
0.
1908
0.002
106.5859
);
--destructive-foreground
:
oklch
(
1
0
0
);
--destructive
:
oklch
(
0.
35
0.02
250
);
--destructive-foreground
:
oklch
(
0.95
0.005
25
0
);
--border
:
oklch
(
0.8847
0.0069
97.3627
);
--input
:
oklch
(
0.7621
0.0156
98.3528
);
--ring
:
oklch
(
0.5937
0.1673
253.063
);
...
...
@@ -58,30 +58,30 @@
--popover-foreground
:
oklch
(
0.8411
0.004
106.4781
);
--primary
:
oklch
(
0.7062
0.0156
286.3
);
--primary-foreground
:
oklch
(
0.2679
0.0036
106.6427
);
--secondary
:
oklch
(
0.
9818
0.0054
95.0986
);
--secondary-foreground
:
oklch
(
0.
3085
0.0035
106.6039
);
--secondary
:
oklch
(
0.
3485
0.0045
106.8
);
--secondary-foreground
:
oklch
(
0.
8274
0.0142
93.0137
);
--muted
:
oklch
(
0.2213
0.0038
106.707
);
--muted-foreground
:
oklch
(
0.5813
0.0169
99.0657
);
--accent
:
oklch
(
0.
213
0.0078
95.4245
);
--accent-foreground
:
oklch
(
0.8
163
0.008
98.8792
);
--destructive
:
oklch
(
0.
6368
0.2078
25.3313
);
--destructive-foreground
:
oklch
(
1
0
0
);
--accent
:
oklch
(
0.
3185
0.0065
106.2
);
--accent-foreground
:
oklch
(
0.8
274
0.0142
93.0137
);
--destructive
:
oklch
(
0.
55
0.015
250
);
--destructive-foreground
:
oklch
(
0.95
0.005
25
0
);
--border
:
oklch
(
0.3618
0.0101
106.8928
);
--input
:
oklch
(
0.4336
0.0113
100.2195
);
--ring
:
oklch
(
0.5937
0.1673
253.063
);
--chart-1
:
oklch
(
0.5583
0.1276
42.9956
);
--chart-2
:
oklch
(
0.6898
0.1581
290.4107
);
--chart-3
:
oklch
(
0.
213
0.0078
95.4
245
);
--chart-3
:
oklch
(
0.
45
0.02
245
);
--chart-4
:
oklch
(
0.3074
0.0516
289.323
);
--chart-5
:
oklch
(
0.5608
0.1348
42.0584
);
--sidebar
:
oklch
(
0.2357
0.0024
67.7077
);
--sidebar-foreground
:
oklch
(
0.8274
0.0142
93.0137
);
--sidebar-primary
:
oklch
(
0.7062
0.0156
286.3
);
--sidebar-primary-foreground
:
oklch
(
0.2679
0.0036
106.6427
);
--sidebar-accent
:
oklch
(
0.
168
0.002
106.6177
);
--sidebar-accent-foreground
:
oklch
(
0.8
0
74
0.0142
93.0137
);
--sidebar-border
:
oklch
(
0.
9401
0
0
);
--sidebar-ring
:
oklch
(
0.
7731
0
0
);
--sidebar-accent
:
oklch
(
0.
3185
0.0045
106.8
);
--sidebar-accent-foreground
:
oklch
(
0.8
2
74
0.0142
93.0137
);
--sidebar-border
:
oklch
(
0.
3618
0.0101
106.8928
);
--sidebar-ring
:
oklch
(
0.
5937
0.1673
253.063
);
--font-sans
:
ui-sans-serif
,
system-ui
,
-apple-system
,
BlinkMacSystemFont
,
"Segoe UI"
,
Roboto
,
"Helvetica Neue"
,
Arial
,
"Noto Sans"
,
sans-serif
,
"Apple Color Emoji"
,
"Segoe UI Emoji"
,
"Segoe UI Symbol"
,
"Noto Color Emoji"
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment