calendar description
All checks were successful
Release / release (push) Successful in 2m52s

This commit is contained in:
d.a.kolesov 2026-11-11 14:33:06 +07:00
parent a59400a77e
commit 7f1864cbde
3 changed files with 24 additions and 2 deletions

View file

@ -12,7 +12,9 @@
"Bash(./node_modules/.bin/tsc *)",
"Bash(node_modules/.bin/tsc --noEmit --project src/renderer/tsconfig.json)",
"Bash(node_modules/.bin/vue-tsc *)",
"Bash(python3 -)"
"Bash(python3 -)",
"Bash(rg -n -i \"location|description|body\" src --glob '*{calendar,reminder,Reminder,ews,caldav}*')",
"Bash(npx vue-tsc *)"
]
}
}

View file

@ -292,6 +292,7 @@ export class CalDavProvider {
<m:ItemShape>
<t:BaseShape>IdOnly</t:BaseShape>
<t:AdditionalProperties>
<t:FieldURI FieldURI="item:Body"/>
<t:FieldURI FieldURI="calendar:RequiredAttendees"/>
<t:FieldURI FieldURI="calendar:OptionalAttendees"/>
</t:AdditionalProperties>
@ -309,6 +310,10 @@ export class CalDavProvider {
const target = idM ? eventMap.get(idM[1]) : undefined
if (target) {
target.attendees = this.parseAttendeesList(itemBlock)
if (!target.description) {
const body = itemBlock.match(/<t:Body(?:\s[^>]*)?>([\s\S]*?)<\/t:Body>/)
target.description = (body && CalDavProvider.htmlToText(body[1])) || undefined
}
}
}
}
@ -375,7 +380,7 @@ export class CalDavProvider {
return r ? r[1].replace(/<[^>]+>/g, '').trim() : ''
}
const getBody = (): string | undefined => {
const r = block.match(/<t:Body(?:\s[^>]*)?>([\\s\\S]*?)<\/t:Body>/)
const r = block.match(/<t:Body(?:\s[^>]*)?>([\s\S]*?)<\/t:Body>/)
if (!r) return undefined
const text = CalDavProvider.htmlToText(r[1])
return text || undefined

View file

@ -86,6 +86,10 @@ function open(key: string): void { void invoke('reminder:open', { key }) }
<span>{{ reminder.event.location }}</span>
</div>
<div v-if="reminder.event.description" class="card-description">
{{ reminder.event.description }}
</div>
<div class="card-actions">
<button v-if="reminder.joinUrl" class="action-btn primary" @click="join(reminder.key)">
Присоединиться
@ -201,6 +205,17 @@ function open(key: string): void { void invoke('reminder:open', { key }) }
text-overflow: ellipsis;
}
.card-description {
font-size: 12px;
color: var(--text-secondary);
white-space: pre-line;
word-break: break-word;
display: -webkit-box;
-webkit-line-clamp: 4;
-webkit-box-orient: vertical;
overflow: hidden;
}
.card-actions {
display: flex;
gap: 6px;