mirror of https://github.com/usememos/memos.git
chore: tweak calendar styles
This commit is contained in:
parent
ef3b7ac6ae
commit
0334a4845f
|
|
@ -18,13 +18,15 @@ const getCellAdditionalStyles = (count: number, maxCount: number) => {
|
|||
if (count === 0) {
|
||||
return "";
|
||||
}
|
||||
const ratio = count / maxCount;
|
||||
if (ratio > 0.7) {
|
||||
return "bg-primary-darker text-gray-100 dark:opacity-80";
|
||||
} else if (ratio > 0.4) {
|
||||
return "bg-primary-dark text-gray-100 dark:opacity-80";
|
||||
if (count >= 3) {
|
||||
const ratio = count / maxCount;
|
||||
if (ratio > 0.7) {
|
||||
return "bg-primary-darker/80 text-gray-100 dark:opacity-80";
|
||||
} else if (ratio > 0.4) {
|
||||
return "bg-primary/80 text-gray-100 dark:opacity-80";
|
||||
}
|
||||
} else {
|
||||
return "bg-primary text-gray-100 dark:opacity-70";
|
||||
return "bg-primary/70 text-gray-100 dark:opacity-70";
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -88,7 +90,7 @@ const ActivityCalendar = (props: Props) => {
|
|||
<Tooltip className="shrink-0" key={`${date}-${index}`} title={tooltipText} placement="top" arrow>
|
||||
<div
|
||||
className={cn(
|
||||
"w-6 h-6 text-xs rounded-xl flex justify-center items-center border cursor-default",
|
||||
"w-6 h-6 text-xs rounded-lg flex justify-center items-center border cursor-default",
|
||||
"text-gray-400",
|
||||
item.isCurrentMonth ? getCellAdditionalStyles(count, maxCount) : "opacity-60",
|
||||
item.isCurrentMonth && isToday && "border-zinc-400",
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
import { isEqual } from "lodash-es";
|
||||
import { CalendarIcon, CheckCircleIcon, CodeIcon, EyeIcon, FilterIcon, LinkIcon, SearchIcon, TagIcon, XIcon } from "lucide-react";
|
||||
import { CalendarIcon, CheckCircleIcon, CodeIcon, EyeIcon, FilterIcon, HashIcon, LinkIcon, SearchIcon, XIcon } from "lucide-react";
|
||||
import { useEffect, useRef } from "react";
|
||||
import { useSearchParams } from "react-router-dom";
|
||||
import { FilterFactor, getMemoFilterKey, MemoFilter, parseFilterQuery, stringifyFilters, useMemoFilterStore } from "@/store/v1";
|
||||
|
|
@ -100,7 +100,7 @@ const MemoFilters = () => {
|
|||
|
||||
const FactorIcon = ({ factor, className }: { factor: FilterFactor; className?: string }) => {
|
||||
const iconMap = {
|
||||
tagSearch: <TagIcon className={className} />,
|
||||
tagSearch: <HashIcon className={className} />,
|
||||
visibility: <EyeIcon className={className} />,
|
||||
contentSearch: <SearchIcon className={className} />,
|
||||
displayTime: <CalendarIcon className={className} />,
|
||||
|
|
|
|||
Loading…
Reference in New Issue