This commit is contained in:
@@ -94,13 +94,16 @@ export function EventChip({
|
|||||||
const titleStyle = getTitleStyle(
|
const titleStyle = getTitleStyle(
|
||||||
bestColor,
|
bestColor,
|
||||||
ownerAttendee?.partstat,
|
ownerAttendee?.partstat,
|
||||||
calendar
|
calendar,
|
||||||
|
isPrivate
|
||||||
);
|
);
|
||||||
|
|
||||||
const cardStyle = getCardStyle(
|
const cardStyle = getCardStyle(
|
||||||
bestColor,
|
bestColor,
|
||||||
eventLength,
|
eventLength,
|
||||||
ownerAttendee?.partstat,
|
ownerAttendee?.partstat,
|
||||||
calendar
|
calendar,
|
||||||
|
isPrivate
|
||||||
);
|
);
|
||||||
|
|
||||||
// Organizer avatar
|
// Organizer avatar
|
||||||
|
|||||||
@@ -56,7 +56,8 @@ export function getOwnerAttendee(
|
|||||||
export function getTitleStyle(
|
export function getTitleStyle(
|
||||||
bestColor: string,
|
bestColor: string,
|
||||||
partstat?: string,
|
partstat?: string,
|
||||||
calendar?: Calendar
|
calendar?: Calendar,
|
||||||
|
isPrivate?: boolean
|
||||||
): React.CSSProperties {
|
): React.CSSProperties {
|
||||||
const baseStyle: React.CSSProperties = {
|
const baseStyle: React.CSSProperties = {
|
||||||
fontFamily: "Roboto",
|
fontFamily: "Roboto",
|
||||||
@@ -82,6 +83,9 @@ export function getTitleStyle(
|
|||||||
case "NEEDS-ACTION":
|
case "NEEDS-ACTION":
|
||||||
return baseStyle;
|
return baseStyle;
|
||||||
default:
|
default:
|
||||||
|
if (isPrivate) {
|
||||||
|
return { ...baseStyle, color: calendar?.color?.dark };
|
||||||
|
}
|
||||||
return baseStyle;
|
return baseStyle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -126,7 +130,8 @@ export function getCardStyle(
|
|||||||
bestColor: string,
|
bestColor: string,
|
||||||
eventLength: number,
|
eventLength: number,
|
||||||
partstat?: string,
|
partstat?: string,
|
||||||
calendar?: Calendar
|
calendar?: Calendar,
|
||||||
|
isPrivate?: boolean
|
||||||
): React.CSSProperties {
|
): React.CSSProperties {
|
||||||
const baseStyle: React.CSSProperties = getCardVariantStyle(
|
const baseStyle: React.CSSProperties = getCardVariantStyle(
|
||||||
getEventVariant(eventLength),
|
getEventVariant(eventLength),
|
||||||
@@ -156,6 +161,14 @@ export function getCardStyle(
|
|||||||
border: "1px solid white",
|
border: "1px solid white",
|
||||||
};
|
};
|
||||||
default:
|
default:
|
||||||
|
if (isPrivate) {
|
||||||
|
return {
|
||||||
|
...baseStyle,
|
||||||
|
backgroundColor: calendar?.color?.light,
|
||||||
|
color: calendar?.color?.dark,
|
||||||
|
border: "1px solid white",
|
||||||
|
};
|
||||||
|
}
|
||||||
return baseStyle;
|
return baseStyle;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user