mirror of
https://github.com/skoelle/icloud-contacts-sync.git
synced 2026-09-17 15:30:24 +00:00
web dashboard birthday with photo
This commit is contained in:
@@ -195,6 +195,14 @@
|
|||||||
content: "\1F382 ";
|
content: "\1F382 ";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.contact-photo {
|
||||||
|
width: 80px;
|
||||||
|
height: 80px;
|
||||||
|
border-radius: 50%;
|
||||||
|
object-fit: cover;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
|
||||||
.empty-state {
|
.empty-state {
|
||||||
color: #888;
|
color: #888;
|
||||||
font-size: 0.875rem;
|
font-size: 0.875rem;
|
||||||
@@ -309,6 +317,9 @@
|
|||||||
{{ b.birthday.strftime('%d.%m.') }}{% if b.birthday.year and b.birthday.year < current_year %} · {{ current_year - b.birthday.year }} Jahre{% endif %}
|
{{ b.birthday.strftime('%d.%m.') }}{% if b.birthday.year and b.birthday.year < current_year %} · {{ current_year - b.birthday.year }} Jahre{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% if b.photo_url %}
|
||||||
|
<img src="{{ b.photo_url }}" alt="" class="contact-photo" onerror="this.style.display='none'">
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
@@ -160,7 +160,7 @@ def get_upcoming_birthdays(conn, account: str | None, days: int = 7) -> list[dic
|
|||||||
with conn.cursor() as cur:
|
with conn.cursor() as cur:
|
||||||
cur.execute(
|
cur.execute(
|
||||||
f"""SELECT id, full_name, given_name, middle_name, family_name,
|
f"""SELECT id, full_name, given_name, middle_name, family_name,
|
||||||
prefix, suffix, organization, birthday, account
|
prefix, suffix, organization, birthday, account, photo_url
|
||||||
FROM contacts {where_clause}
|
FROM contacts {where_clause}
|
||||||
{"AND" if where_clause else "WHERE"} birthday IS NOT NULL
|
{"AND" if where_clause else "WHERE"} birthday IS NOT NULL
|
||||||
AND (
|
AND (
|
||||||
|
|||||||
Reference in New Issue
Block a user