nodebb-plugin-onekite-calendar 2.0.53 β 2.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/plugin.json +1 -1
- package/public/client.js +8 -6
package/package.json
CHANGED
package/plugin.json
CHANGED
package/public/client.js
CHANGED
|
@@ -1571,15 +1571,17 @@ function toDatetimeLocalValue(date) {
|
|
|
1571
1571
|
const te = `${pad2(e.getHours())}:${pad2(e.getMinutes())}`;
|
|
1572
1572
|
const baseTitle = (ev.title || '').trim();
|
|
1573
1573
|
// Avoid double prefix on rerenders.
|
|
1574
|
-
// UX request:
|
|
1574
|
+
// UX request:
|
|
1575
|
+
// - Outing forecast: no time displayed in the calendar title.
|
|
1576
|
+
// - Special event: display only the start time (keep the clock icon).
|
|
1575
1577
|
const isOuting = ev.extendedProps.type === 'outing';
|
|
1576
|
-
const prefix = isOuting ?
|
|
1578
|
+
const prefix = isOuting ? `` : `π ${ts} `;
|
|
1577
1579
|
if (isOuting) {
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
}
|
|
1580
|
+
// No prefix for outings.
|
|
1581
|
+
ev.title = `${baseTitle}`.trim();
|
|
1581
1582
|
} else {
|
|
1582
|
-
if
|
|
1583
|
+
// Prefix only if not already present.
|
|
1584
|
+
if (!/^π\s\d{2}:\d{2}\s/.test(baseTitle)) {
|
|
1583
1585
|
ev.title = `${prefix}${baseTitle}`.trim();
|
|
1584
1586
|
}
|
|
1585
1587
|
}
|