Co-authored-by: Camille Moussu <cmoussu@linagora.com>
This commit is contained in:
@@ -62,7 +62,7 @@ describe("Calendar API", () => {
|
|||||||
it("postCalendar", async () => {
|
it("postCalendar", async () => {
|
||||||
const calId = "calId";
|
const calId = "calId";
|
||||||
const userId = "userId";
|
const userId = "userId";
|
||||||
const color = "calId";
|
const color = { light: "calId" };
|
||||||
const name = "new cal";
|
const name = "new cal";
|
||||||
const desc = "desc";
|
const desc = "desc";
|
||||||
|
|
||||||
|
|||||||
@@ -211,10 +211,7 @@ export default function CalendarSearch({
|
|||||||
calId,
|
calId,
|
||||||
cal: {
|
cal: {
|
||||||
...cal,
|
...cal,
|
||||||
color: {
|
color: cal.cal["apple:color"],
|
||||||
light: cal.cal["apple:color"],
|
|
||||||
dark: cal.cal["X-TWAKE-Dark-theme-color"],
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -37,7 +37,6 @@ export function getAccessiblePair(baseColor: string, theme: Theme): string {
|
|||||||
|
|
||||||
// Check if contrast meets 4.5
|
// Check if contrast meets 4.5
|
||||||
const contrast = getContrastRatio(baseColor, adjusted);
|
const contrast = getContrastRatio(baseColor, adjusted);
|
||||||
console.log(isLight, contrast);
|
|
||||||
if (contrast >= 4.5) return adjusted;
|
if (contrast >= 4.5) return adjusted;
|
||||||
|
|
||||||
if (isLight) {
|
if (isLight) {
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ export async function postCalendar(
|
|||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
id: calId,
|
id: calId,
|
||||||
"dav:name": name,
|
"dav:name": name,
|
||||||
"apple:color": color,
|
"apple:color": color.light,
|
||||||
"caldav:description": desc,
|
"caldav:description": desc,
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
@@ -71,10 +71,8 @@ export async function addSharedCalendar(
|
|||||||
"calendarserver:source": {
|
"calendarserver:source": {
|
||||||
acl: cal.cal.acl,
|
acl: cal.cal.acl,
|
||||||
calendarHomeId: cal.cal.id,
|
calendarHomeId: cal.cal.id,
|
||||||
color: {
|
color: cal.cal["apple:color"],
|
||||||
light: cal.cal["apple:color"],
|
|
||||||
dark: cal.cal["X-TWAKE-Dark-theme-color"],
|
|
||||||
},
|
|
||||||
description: cal.cal["caldav:description"],
|
description: cal.cal["caldav:description"],
|
||||||
href: cal.cal._links.self.href,
|
href: cal.cal._links.self.href,
|
||||||
id: cal.cal.id,
|
id: cal.cal.id,
|
||||||
|
|||||||
@@ -48,7 +48,6 @@ import { userAttendee } from "../User/userDataTypes";
|
|||||||
import { getEvent } from "./EventApi";
|
import { getEvent } from "./EventApi";
|
||||||
import { formatLocalDateTime } from "../../components/Event/EventFormFields";
|
import { formatLocalDateTime } from "../../components/Event/EventFormFields";
|
||||||
import { CalendarEvent, RepetitionObject } from "./EventsTypes";
|
import { CalendarEvent, RepetitionObject } from "./EventsTypes";
|
||||||
import { light } from "@mui/material/styles/createPalette";
|
|
||||||
|
|
||||||
export default function EventDisplayModal({
|
export default function EventDisplayModal({
|
||||||
eventId,
|
eventId,
|
||||||
|
|||||||
Reference in New Issue
Block a user