diff --git a/src/defaults.ts b/src/defaults.ts index 9a0699f9..bfd85034 100644 --- a/src/defaults.ts +++ b/src/defaults.ts @@ -46,8 +46,6 @@ export default { showNoEventDays: false, - timeColor: 'var(--primary-color)', // Time text color (center bottom) - timeSize: 90, //Time text size showHours: true, //shows the bottom line (time, duration of event) showRelativeTime: true, diff --git a/src/index.ts b/src/index.ts index 47d3d2cf..994190b7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -408,24 +408,19 @@ export class AtomicCalendarRevive extends LitElement { // Show the hours const hoursHTML = this._config.showHours - ? html`
- ${getHoursHTML(this._config, event)} + ? html`
+ ${getHoursHTML(this._config, event)}
` : html``; // Show the relative time if (this._config.showRelativeTime || this._config.showTimeRemaining) { const now = dayjs() - var timeUntilRemaining = html`
+ const timeUntilRemaining = html`
${this._config.showRelativeTime && (event.startDateTime.isAfter(now, 'minutes')) ? `(${event.startDateTime.fromNow()})` : this._config.showTimeRemaining && (event.startDateTime.isBefore(now, 'minutes') && event.endDateTime.isAfter(now, 'minutes')) ? `${dayjs.duration(event.endDateTime.diff(now)).humanize()}` : ''}
` - } else { var timeUntilRemaining = html`` } + } else { const timeUntilRemaining = html`` } const lastEventStyle = !this._config.compactMode && i == arr.length - 1 ? 'padding-bottom: 8px;' : ''; diff --git a/src/types/config.ts b/src/types/config.ts index 1c9273e2..b27e61f6 100644 --- a/src/types/config.ts +++ b/src/types/config.ts @@ -52,8 +52,6 @@ export interface atomicCardConfig extends LovelaceCardConfig { showNoEventDays?: boolean; noEventText?: string; noEventsForNextDaysText?: string; - timeColor?: string; - timeSize?: number; showHours?: boolean; eventTitleColor?: string; locationIconColor?: string;