fix: make header toggle instant and fix calendar event width
This commit is contained in:
parent
329f082ecf
commit
22d2a8440f
@ -6543,11 +6543,12 @@ export default function WeeklyView() {
|
|||||||
minHeight: `15px`,
|
minHeight: `15px`,
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
top: `${topOffset}px`,
|
top: `${topOffset}px`,
|
||||||
left: "-10px",
|
left: "1px",
|
||||||
right: "-15px",
|
right: "2px",
|
||||||
zIndex: 1,
|
zIndex: 1,
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
alignItems: "flex-start",
|
alignItems: "flex-start",
|
||||||
|
justifyContent: "flex-start",
|
||||||
backgroundColor: bgColor,
|
backgroundColor: bgColor,
|
||||||
borderLeftColor: borderColor,
|
borderLeftColor: borderColor,
|
||||||
color: borderColor,
|
color: borderColor,
|
||||||
@ -10677,13 +10678,19 @@ function SettingsSidebar({
|
|||||||
</label>
|
</label>
|
||||||
<div className="flex items-center gap-1 bg-gray-100 dark:bg-gray-800 rounded p-1 mt-1" style={{ width: "fit-content" }}>
|
<div className="flex items-center gap-1 bg-gray-100 dark:bg-gray-800 rounded p-1 mt-1" style={{ width: "fit-content" }}>
|
||||||
<button
|
<button
|
||||||
onClick={() => setProfile({ ...profile, headerDisplay: "kw" })}
|
onClick={() => {
|
||||||
|
setProfile({ ...profile, headerDisplay: "kw" });
|
||||||
|
saveSetting("headerDisplay", "kw");
|
||||||
|
}}
|
||||||
className={`px-4 py-2 text-sm rounded transition-colors ${(profile.headerDisplay || "kw") === "kw" ? "bg-white shadow-sm font-bold text-black" : "text-gray-500 hover:text-gray-900 hover:bg-gray-200 dark:hover:bg-gray-700"}`}
|
className={`px-4 py-2 text-sm rounded transition-colors ${(profile.headerDisplay || "kw") === "kw" ? "bg-white shadow-sm font-bold text-black" : "text-gray-500 hover:text-gray-900 hover:bg-gray-200 dark:hover:bg-gray-700"}`}
|
||||||
>
|
>
|
||||||
{t.headerDisplayKW}
|
{t.headerDisplayKW}
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
onClick={() => setProfile({ ...profile, headerDisplay: "month" })}
|
onClick={() => {
|
||||||
|
setProfile({ ...profile, headerDisplay: "month" });
|
||||||
|
saveSetting("headerDisplay", "month");
|
||||||
|
}}
|
||||||
className={`px-4 py-2 text-sm rounded transition-colors ${profile.headerDisplay === "month" ? "bg-white shadow-sm font-bold text-black" : "text-gray-500 hover:text-gray-900 hover:bg-gray-200 dark:hover:bg-gray-700"}`}
|
className={`px-4 py-2 text-sm rounded transition-colors ${profile.headerDisplay === "month" ? "bg-white shadow-sm font-bold text-black" : "text-gray-500 hover:text-gray-900 hover:bg-gray-200 dark:hover:bg-gray-700"}`}
|
||||||
>
|
>
|
||||||
{t.headerDisplayMonth}
|
{t.headerDisplayMonth}
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user