Skip to content

Commit e1ede59

Browse files
authored
Merge pull request #1105 from totaldebug/feature_branch
Next Version Improvements
2 parents bd17c91 + e428aef commit e1ede59

File tree

14 files changed

+158
-97
lines changed

14 files changed

+158
-97
lines changed

.devcontainer/post-install.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ yarn install
99

1010
# Install documentation dependencies
1111
pip3 install -r docs/requirements.txt
12-
pip3 install sphinx-autobuild
12+
pip3 install sphinx-autobuild pre-commit
13+
14+
pre-commit install --hook-type commit-msg
1315

1416
echo "Done!"

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,3 @@ Please delete options that are not relevant.
3535
- [ ] I have made corresponding changes to the documentation
3636
- [ ] My changes generate no new warnings
3737
- [ ] Any dependent changes have been merged and published in downstream modules
38-
- [ ] I have updated the version in `package.json` following [semver](https://semver.org/)

.github/workflows/branching.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/hacs_validate.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ name: Validate
22

33
on:
44
push:
5-
pull_request:
65
schedule:
76
- cron: "0 0 * * *"
87
workflow_dispatch:

.github/workflows/update_docs.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
---
2-
3-
name: Sphinx Documentation Update
2+
name: 📚 Update Docs
43

54
on:
65
push:
7-
tags:
8-
- 'v*'
6+
branches:
7+
- master
8+
paths:
9+
- "docs/**"
910
workflow_dispatch:
1011

1112
jobs:

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
repos:
2+
- repo: https://github.com/compilerla/conventional-pre-commit
3+
rev: v2.4.0
4+
hooks:
5+
- id: conventional-pre-commit
6+
stages: [commit-msg]
7+
args: []

docs/configuration/main.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,6 @@ Main Options
4141
hoursOnSameLine boolean optional v7.3.0 ``false`` if set true will move hours to show on the same line as the summary. NOTE using other options can mess up this style
4242
language string optional unknown Not recommended to use, but can set the language code e.g. "gb" / "es"
4343
titleLength integer optional v7.4.0 Sets the maximum length of the event titles
44+
showAllDayEvents boolean optional ``true`` if set false will hide all events that are a full day
45+
offsetHeaderDate boolean optional ``false`` if set true the header date will match the startDaysAhead offset date
4446
========================= ========= =============== ========== ==========================================================================================================================================================================================================================

src/defaults.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,8 @@ export default {
111111
showEventDate: true,
112112
showDatePerEvent: false,
113113
showAllDayHours: true,
114+
showAllDayEvents: true,
115+
offsetHeaderDate: false,
114116

115117
titleLength: 0,
116118
descLength: 0

src/index-editor.ts

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,12 @@ export class AtomicCalendarReviveEditor extends ScopedRegistryHost(LitElement) i
186186
get _hoursOnSameLine(): boolean {
187187
return this._config?.hoursOnSameLine || false;
188188
}
189+
get _showAllDayEvents(): boolean {
190+
return this._config?.showAllDayEvents || true;
191+
}
192+
get _offsetHeaderDate(): boolean {
193+
return this._config?.offsetHeaderDate || false;
194+
}
189195

190196
// MAIN SETTINGS END
191197

@@ -714,6 +720,26 @@ export class AtomicCalendarReviveEditor extends ScopedRegistryHost(LitElement) i
714720
<label class="mdc-label">${localize('main.fields.hoursOnSameLine')}</label>
715721
</div>
716722
</div>
723+
<div class="side-by-side">
724+
<div>
725+
<mwc-switch
726+
aria-label=${`Toggle ${this._showAllDayEvents ? 'on' : 'off'}`}
727+
.checked=${this._showAllDayEvents !== false}
728+
.configValue=${'showAllDayEvents'}
729+
@change=${this._valueChanged}
730+
></mwc-switch>
731+
<label class="mdc-label">${localize('main.fields.showAllDayEvents')}</label>
732+
</div>
733+
<div>
734+
<mwc-switch
735+
aria-label=${`Toggle ${this._offsetHeaderDate ? 'on' : 'off'}`}
736+
.checked=${this._offsetHeaderDate !== false}
737+
.configValue=${'offsetHeaderDate'}
738+
@change=${this._valueChanged}
739+
></mwc-switch>
740+
<label class="mdc-label">${localize('main.fields.offsetHeaderDate')}</label>
741+
</div>
742+
</div>
717743
</div>
718744
719745
`

src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ export class AtomicCalendarRevive extends LitElement {
373373
const eventCalName =
374374
event.entityConfig.name && this._config.showCalendarName
375375
? html`<div class="event-cal-name" style="color: ${calColor};">
376-
<ha-icon icon="mdi:calendar" class="event-cal-name-icon"></ha-icon>&nbsp;${event.entityConfig.name}
376+
<ha-icon icon="mdi:calendar" class="event-cal-name-icon"></ha-icon>&nbsp;${event.originName}
377377
</div>`
378378
: ``;
379379

0 commit comments

Comments
 (0)