185 files
This commit is contained in:
1 parent
5f9330abd7
commit
a718af6423
185 files changed
+16868
-3088
No files matched your search
@@ -322,7 +322,7 @@ class TaskMateStreakCard extends LitElement {
|
||||
// Use backend-calculated streak if available, fall back to client calculation
|
||||
const streak = child.current_streak !== undefined
|
||||
? child.current_streak
|
||||
: this._calculateStreak(childCompletions, chores, child.id);
|
||||
: this._calculateStreak(childCompletions);
|
||||
const daysShown = this.config.streak_days_shown || 14;
|
||||
const dayDots = this._buildDayDots(childCompletions, chores, child.id, daysShown);
|
||||
const achievements = this._getAchievements(child, childCompletions, streak, entity_ref);
|
||||
@@ -370,7 +370,7 @@ class TaskMateStreakCard extends LitElement {
|
||||
`;
|
||||
}
|
||||
|
||||
_calculateStreak(completions, chores, childId) {
|
||||
_calculateStreak(completions) {
|
||||
const tz = this.hass?.config?.time_zone || Intl.DateTimeFormat().resolvedOptions().timeZone;
|
||||
|
||||
// Build set of unique days with at least one completion
|
||||
@@ -492,7 +492,7 @@ class TaskMateStreakCard extends LitElement {
|
||||
const childCompletions = completions.filter(c => c.child_id === child.id);
|
||||
const streak = child.current_streak !== undefined
|
||||
? child.current_streak
|
||||
: this._calculateStreak(childCompletions, chores, child.id);
|
||||
: this._calculateStreak(childCompletions);
|
||||
const daysShown = this.config.streak_days_shown || 14;
|
||||
const dayDots = this._buildDayDots(childCompletions, chores, child.id, daysShown);
|
||||
const achievements = this._getAchievements(child, childCompletions, streak, entity_ref);
|
||||
@@ -549,10 +549,6 @@ class TaskMateStreakCard extends LitElement {
|
||||
return html`<ha-card class="tmd" style="--hd:${hd}">${header}<div class="tmd-bd">${body}</div></ha-card>`;
|
||||
}
|
||||
|
||||
_earnedBadges(achievements) {
|
||||
return achievements.filter(a => a.earned);
|
||||
}
|
||||
|
||||
// Classic shows earned badges PLUS the next locked milestone. _getAchievements
|
||||
// already returns exactly that set, so the designed badge rows render it whole,
|
||||
// dimming the locked entry to match the classic .badge.locked treatment.
|
||||
|
||||
Reference in new issue
Block a user