Skip to content

Let's use AI to Earn!

feat: 日历完善

gaoSirfa0a6f93b850
diff --git a/.idea/workspace.xml b/.idea/workspace.xml
index 75860b4e..b9c35af7 100644
--- a/.idea/workspace.xml
+++ b/.idea/workspace.xml
@@ -4,20 +4,11 @@
<option name="autoReloadType" value="SELECTIVE" />
</component>
<component name="ChangeListManager">
- <list default="true" id="90ed3383-49aa-4e32-95a2-9f070c0da49b" name="更改" comment="">
- <change afterPath="$PROJECT_DIR$/.idea/codeStyles/Project.xml" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/.idea/codeStyles/codeStyleConfig.xml" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CalendarTimingItem.tsx" afterDir="false" />
- <change afterPath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/calendarTimingItem.module.scss" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/.gitignore" beforeDir="false" afterPath="$PROJECT_DIR$/.gitignore" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/.idea/.gitignore" beforeDir="false" />
- <change beforePath="$PROJECT_DIR$/.idea/material_theme_project_new.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/material_theme_project_new.xml" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/package.json" beforeDir="false" afterPath="$PROJECT_DIR$/package.json" afterDir="false" />
+ <list default="true" id="90ed3383-49aa-4e32-95a2-9f070c0da49b" name="更改" comment="feat: 日历完善">
+ <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CalendarTimingItem.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CalendarTimingItem.tsx" afterDir="false" />
+ <change beforePath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/calendarTimingItem.module.scss" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/calendarTimingItem.module.scss" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/calendarTiming.module.scss" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/calendarTiming.module.scss" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/index.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/[lng]/accounts/components/CalendarTiming/index.tsx" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/src/app/[lng]/hot-content/page.tsx" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/[lng]/hot-content/page.tsx" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/src/app/i18n/locales/en/account.json" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/i18n/locales/en/account.json" afterDir="false" />
- <change beforePath="$PROJECT_DIR$/src/app/i18n/locales/zh-CN/account.json" beforeDir="false" afterPath="$PROJECT_DIR$/src/app/i18n/locales/zh-CN/account.json" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -88,15 +79,37 @@
<option name="number" value="Default" />
<option name="presentableId" value="Default" />
<updated>1750677868216</updated>
- <workItem from="1750677869133" duration="3204000" />
+ <workItem from="1750677869133" duration="4935000" />
</task>
+ <task id="LOCAL-00001" summary="feat: 日历完善">
+ <option name="closed" value="true" />
+ <created>1750681213106</created>
+ <option name="number" value="00001" />
+ <option name="presentableId" value="LOCAL-00001" />
+ <option name="project" value="LOCAL" />
+ <updated>1750681213106</updated>
+ </task>
+ <option name="localTasksCounter" value="2" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
<option name="version" value="3" />
</component>
+ <component name="Vcs.Log.Tabs.Properties">
+ <option name="TAB_STATES">
+ <map>
+ <entry key="MAIN">
+ <value>
+ <State />
+ </value>
+ </entry>
+ </map>
+ </option>
+ </component>
<component name="VcsManagerConfiguration">
<option name="CHECK_CODE_SMELLS_BEFORE_PROJECT_COMMIT" value="false" />
<option name="CHECK_NEW_TODO" value="false" />
+ <MESSAGE value="feat: 日历完善" />
+ <option name="LAST_COMMIT_MESSAGE" value="feat: 日历完善" />
</component>
</project>
\ No newline at end of file
diff --git a/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CalendarTimingItem.tsx b/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CalendarTimingItem.tsx
index a8a864db..b8e87bd3 100644
--- a/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CalendarTimingItem.tsx
+++ b/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/CalendarTimingItem.tsx
@@ -3,6 +3,7 @@ import styles from "./calendarTimingItem.module.scss";
import { DayCellContentArg } from "@fullcalendar/core";
import { Button } from "antd";
import { useTransClient } from "@/app/i18n/client";
+import { PlusOutlined } from "@ant-design/icons";
export interface ICalendarTimingItemRef {}
@@ -42,17 +43,21 @@ const CalendarTimingItem = memo(
<div className="calendarTimingItem-top-day">
{arg.date.getDate()}
</div>
+
+ {argDate >= nowDate && (
+ <Button size="small" icon={<PlusOutlined />} />
+ )}
</div>
{argDate >= nowDate && (
<div className="calendarTimingItem-con">
- <Button size="small">
+ <Button size="small" type="dashed">
<div className="calendarTimingItem-con-btn1">04:12 PM</div>
<div className="calendarTimingItem-con-btn2">
{t("addPost")}
</div>
</Button>
- <Button size="small">
+ <Button size="small" type="dashed">
<div className="calendarTimingItem-con-btn1">05:34 PM</div>
<div className="calendarTimingItem-con-btn2">
{t("addPost")}
diff --git a/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/calendarTimingItem.module.scss b/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/calendarTimingItem.module.scss
index b87693da..9476953d 100644
--- a/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/calendarTimingItem.module.scss
+++ b/src/app/[lng]/accounts/components/CalendarTiming/CalendarTimingItem/calendarTimingItem.module.scss
@@ -9,6 +9,7 @@
.calendarTimingItem-top {
display: flex;
justify-content: space-between;
+ margin-bottom: 5px;
.calendarTimingItem-top-day {
width: 24px;
height: 24px;
@@ -17,6 +18,10 @@
border-radius: 50%;
margin-bottom: 3px;
}
+ button {
+ font-size: var(--fs-xs);
+ display: none;
+ }
}
.calendarTimingItem-con {
.calendarTimingItem-con-btn2 {
@@ -25,7 +30,7 @@
button {
width: 100%;
margin-bottom: 8px;
- font-size: 12px;
+ font-size: var(--fs-xs);
padding: 0;
height: 26px !important;
&:hover {
@@ -39,6 +44,16 @@
}
}
}
+
+ &:hover {
+ :global {
+ .calendarTimingItem-top {
+ button {
+ display: block !important;
+ }
+ }
+ }
+ }
}
.calendarTimingItemPast {
diff --git a/src/app/[lng]/accounts/components/CalendarTiming/calendarTiming.module.scss b/src/app/[lng]/accounts/components/CalendarTiming/calendarTiming.module.scss
index eba2b027..fb1447e8 100644
--- a/src/app/[lng]/accounts/components/CalendarTiming/calendarTiming.module.scss
+++ b/src/app/[lng]/accounts/components/CalendarTiming/calendarTiming.module.scss
@@ -26,7 +26,7 @@
}
.fc-daygrid-day.fc-day-today {
background: transparent;
- .calendarTimingItem-day {
+ .calendarTimingItem-top-day {
background: var(--colorPrimary5);
color: #fff;
}