@conduction/nextcloud-vue 2.161.0 → 2.162.0
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/dist/esm/components/CnActionsMenu/CnActionsMenu.vue2.js +3 -2
- package/dist/esm/components/CnActionsMenu/CnActionsMenu.vue2.js.map +1 -1
- package/dist/esm/components/CnActionsMenu/CnActionsMenu.vue3.js.map +1 -1
- package/dist/esm/components/CnAddressSearch/CnAddressSearch.vue.js +1 -1
- package/dist/esm/components/CnAddressSearch/CnAddressSearch.vue2.js +2 -1
- package/dist/esm/components/CnAddressSearch/CnAddressSearch.vue2.js.map +1 -1
- package/dist/esm/components/CnAddressSearch/CnAddressSearch.vue3.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +2 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js +8 -8
- package/dist/esm/components/CnDataTable/CnDataTable.vue2.js.map +1 -1
- package/dist/esm/components/CnDataTable/CnDataTable.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue.js +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js +23 -0
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue3.js.map +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue.js +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js +48 -5
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js +2 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue.js +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js +4 -3
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue2.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/CnFilesBrowser.vue3.js.map +1 -1
- package/dist/esm/components/CnFilesBrowser/filesBrowser.js +6 -5
- package/dist/esm/components/CnFilesBrowser/filesBrowser.js.map +1 -1
- package/dist/esm/components/CnFilesWidget/CnFilesWidget.vue.js +1 -1
- package/dist/esm/components/CnFilesWidget/CnFilesWidget.vue2.js +2 -1
- package/dist/esm/components/CnFilesWidget/CnFilesWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnFilesWidget/CnFilesWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnFlowRunsWidget/CnFlowRunsWidget.vue.js +1 -1
- package/dist/esm/components/CnFlowRunsWidget/CnFlowRunsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnFlowRunsWidget/CnFlowRunsWidget.vue3.js +41 -39
- package/dist/esm/components/CnFlowRunsWidget/CnFlowRunsWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnFolderSidebar/webdavFolders.js +2 -1
- package/dist/esm/components/CnFolderSidebar/webdavFolders.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +11 -3
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnMenuWidget/menuActive.js +2 -1
- package/dist/esm/components/CnMenuWidget/menuActive.js.map +1 -1
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue.js +1 -1
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue2.js +39 -2
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue3.js +1 -1
- package/dist/esm/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnPageTreeNode/CnPageTreeNode.vue.js +1 -1
- package/dist/esm/components/CnPageTreeNode/CnPageTreeNode.vue2.js +2 -1
- package/dist/esm/components/CnPageTreeNode/CnPageTreeNode.vue2.js.map +1 -1
- package/dist/esm/components/CnPageTreeNode/CnPageTreeNode.vue3.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +5 -5
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue3.js.map +1 -1
- package/dist/esm/integrations/builtin/email/CnEmailTab.vue.js +1 -1
- package/dist/esm/integrations/builtin/email/CnEmailTab.vue2.js +130 -1
- package/dist/esm/integrations/builtin/email/CnEmailTab.vue2.js.map +1 -1
- package/dist/esm/integrations/builtin/email/CnEmailTab.vue3.js +27 -16
- package/dist/esm/integrations/builtin/email/CnEmailTab.vue3.js.map +1 -1
- package/dist/esm/l10n/en.json.js +9 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +9 -1
- package/dist/esm/l10n/nl.json.js.map +1 -1
- package/dist/esm/library-style.js +1 -1
- package/dist/esm/nextcloud-vue.css +560 -488
- package/dist/esm/utils/buildManifestRoutes.js +2 -1
- package/dist/esm/utils/buildManifestRoutes.js.map +1 -1
- package/dist/esm/utils/cnFetch.js +1 -15
- package/dist/esm/utils/cnFetch.js.map +1 -1
- package/dist/esm/utils/fillTemplate.js +29 -2
- package/dist/esm/utils/fillTemplate.js.map +1 -1
- package/dist/esm/utils/forge.js +4 -1
- package/dist/esm/utils/forge.js.map +1 -1
- package/dist/esm/utils/myTeam.js +17 -3
- package/dist/esm/utils/myTeam.js.map +1 -1
- package/dist/esm/utils/rowAggregate.js +20 -1
- package/dist/esm/utils/rowAggregate.js.map +1 -1
- package/dist/esm/utils/trailingSlashes.js +24 -0
- package/dist/esm/utils/trailingSlashes.js.map +1 -0
- package/dist/nextcloud-vue.cjs.js +1009 -675
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +560 -488
- package/l10n/en.json +9 -1
- package/l10n/nl.json +9 -1
- package/package.json +1 -1
- package/src/components/CnActionsMenu/CnActionsMenu.vue +3 -2
- package/src/components/CnAddressSearch/CnAddressSearch.vue +2 -1
- package/src/components/CnDashboardPage/CnDashboardPage.vue +2 -1
- package/src/components/CnDataTable/CnDataTable.vue +8 -8
- package/src/components/CnDetailWidgetHost/CnDetailWidgetHost.vue +23 -0
- package/src/components/CnFactsWidget/CnFactsWidget.vue +49 -5
- package/src/components/CnFilesBrowser/CnFilesBrowser.vue +4 -3
- package/src/components/CnFilesBrowser/filesBrowser.js +6 -5
- package/src/components/CnFilesWidget/CnFilesWidget.vue +2 -1
- package/src/components/CnFlowRunsWidget/CnFlowRunsWidget.vue +1 -1
- package/src/components/CnFolderSidebar/webdavFolders.js +2 -1
- package/src/components/CnIndexPage/CnIndexPage.vue +11 -3
- package/src/components/CnMenuWidget/menuActive.js +2 -1
- package/src/components/CnObjectPartiesWidget/CnObjectPartiesWidget.vue +40 -3
- package/src/components/CnPageTreeNode/CnPageTreeNode.vue +2 -1
- package/src/components/CnRecordListWidget/CnRecordListWidget.vue +5 -5
- package/src/css/dialog.css +7 -0
- package/src/css/look-board-detail.css +35 -0
- package/src/css/look-board.css +18 -1
- package/src/integrations/builtin/email/CnEmailTab.vue +155 -4
- package/src/utils/buildManifestRoutes.js +2 -1
- package/src/utils/cnFetch.js +3 -15
- package/src/utils/fillTemplate.js +29 -2
- package/src/utils/forge.js +3 -1
- package/src/utils/myTeam.js +17 -3
- package/src/utils/rowAggregate.js +19 -0
- package/src/utils/trailingSlashes.js +21 -0
|
@@ -612,7 +612,7 @@ import { isObjectRowsSpec, objectRowsOf } from '../../utils/objectRows.js'
|
|
|
612
612
|
import { pageFilter, pageSort } from '../../utils/pageControls.js'
|
|
613
613
|
import { readPath } from '../../utils/readPath.js'
|
|
614
614
|
import { dropOptionalUnresolved, hasUnresolvedTokens, resolveDeepTokens, resolveFilterTokens } from '../../utils/resolveFilterTokens.js'
|
|
615
|
-
import { fetchRowAggregate, isRowAggregate } from '../../utils/rowAggregate.js'
|
|
615
|
+
import { cellsOf, fetchRowAggregate, isRowAggregate } from '../../utils/rowAggregate.js'
|
|
616
616
|
import { evaluateVisibleWhen, evaluateVisibleWhenLocal } from '../../utils/visibleWhen.js'
|
|
617
617
|
|
|
618
618
|
const PAGE_REFRESH_CHANNEL = 'cn:page:refresh'
|
|
@@ -2304,7 +2304,7 @@ export default {
|
|
|
2304
2304
|
this.aggregateValues = {}
|
|
2305
2305
|
return
|
|
2306
2306
|
}
|
|
2307
|
-
const next =
|
|
2307
|
+
const next = new Map()
|
|
2308
2308
|
const jobs = []
|
|
2309
2309
|
for (const raw of this.rows.slice(0, this.limit)) {
|
|
2310
2310
|
const row = scalarRow(raw)
|
|
@@ -2312,18 +2312,18 @@ export default {
|
|
|
2312
2312
|
if (!rowId) {
|
|
2313
2313
|
continue
|
|
2314
2314
|
}
|
|
2315
|
-
|
|
2315
|
+
const figures = cellsOf(next, rowId)
|
|
2316
2316
|
for (const [key, agg] of entries) {
|
|
2317
2317
|
jobs.push(fetchRowAggregate(agg, row)
|
|
2318
2318
|
.then((value) => {
|
|
2319
|
-
|
|
2319
|
+
figures[key] = this.aggregateText(agg, value)
|
|
2320
2320
|
})
|
|
2321
2321
|
.catch(() => {}))
|
|
2322
2322
|
}
|
|
2323
2323
|
}
|
|
2324
2324
|
await Promise.all(jobs)
|
|
2325
2325
|
if (id === this.aggregateRequestId) {
|
|
2326
|
-
this.aggregateValues = next
|
|
2326
|
+
this.aggregateValues = Object.fromEntries(next)
|
|
2327
2327
|
}
|
|
2328
2328
|
},
|
|
2329
2329
|
|
package/src/css/dialog.css
CHANGED
|
@@ -744,6 +744,13 @@ body:has(.cn-look-board):not(:has(.cn-look-nextcloud)) .modal-mask {
|
|
|
744
744
|
background: var(--color-primary-element) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='white' d='M9,20.42L2.79,14.21L5.62,11.38L9,14.77L18.88,4.88L21.71,7.71L9,20.42Z'/%3E%3C/svg%3E") center / 14px no-repeat;
|
|
745
745
|
}
|
|
746
746
|
|
|
747
|
+
/* The access purpose's chosen row is filled, as DqZaakDoel draws "Behandeling
|
|
748
|
+
van de zaak": the ground Nextcloud gives a checked option only on hover or
|
|
749
|
+
focus. */
|
|
750
|
+
.cn-dialog-board .cn-access-purpose__choices .checkbox-radio-switch--checked:not(.checkbox-radio-switch--disabled) .checkbox-content {
|
|
751
|
+
background-color: var(--color-primary-element-light-hover);
|
|
752
|
+
}
|
|
753
|
+
|
|
747
754
|
/* The duplicate warning as DqNieuweZaakDubbel draws it. The note is a warning
|
|
748
755
|
line, 12px 14px in at radius 8 on the status warning ground, 15px bold in
|
|
749
756
|
the warning ink with a 20px icon 10px before it; NcNoteCard paints its
|
|
@@ -848,6 +848,14 @@
|
|
|
848
848
|
padding-top: 10px;
|
|
849
849
|
}
|
|
850
850
|
|
|
851
|
+
/* The calendar and Deck cards (DqZaakTaken "Afspraken", "Kaarten") open on a
|
|
852
|
+
ruled row, so no leading comes off: the first row starts 12px under the
|
|
853
|
+
title block, as drawn. */
|
|
854
|
+
.cn-look-board .cn-detail-card .cn-detail-card__content:has(> .cn-calendar-card__list:first-child):not(.cn-look-nextcloud *),
|
|
855
|
+
.cn-look-board .cn-detail-card .cn-detail-card__content:has(> .cn-deck-card__rows:first-child):not(.cn-look-nextcloud *) {
|
|
856
|
+
padding-top: 12px;
|
|
857
|
+
}
|
|
858
|
+
|
|
851
859
|
/* A data card (labels over values) starts 14px below its title (DqZaak
|
|
852
860
|
"Zaakgegevens", DqContact "Contact"); its first label sits at the top of
|
|
853
861
|
its line box, so no leading comes off. A side card keeps its 10px.
|
|
@@ -2088,6 +2096,33 @@
|
|
|
2088
2096
|
color: var(--cn-board-text-soft);
|
|
2089
2097
|
}
|
|
2090
2098
|
|
|
2099
|
+
/* A linked mail's details (DqZaakEmail): an outgoing mail's initials on the
|
|
2100
|
+
light primary tile, and a 13px/600 pill after the text, green for its
|
|
2101
|
+
archive copy ("Als pdf gearchiveerd"), light primary for "Gekoppeld".
|
|
2102
|
+
@spec openspec/changes/linked-mail-row-details/specs/linked-mail-row-details/spec.md */
|
|
2103
|
+
.cn-look-board .cn-email-tab__avatar--outbound:not(.cn-look-nextcloud *) .avatardiv__initials-wrapper {
|
|
2104
|
+
background-color: var(--color-primary-element-light) !important;
|
|
2105
|
+
}
|
|
2106
|
+
|
|
2107
|
+
.cn-look-board .cn-email-tab__avatar--outbound:not(.cn-look-nextcloud *) .avatardiv__initials {
|
|
2108
|
+
color: var(--cn-board-primary-light-ink) !important;
|
|
2109
|
+
}
|
|
2110
|
+
|
|
2111
|
+
.cn-look-board .cn-email-tab__pill:not(.cn-look-nextcloud *) {
|
|
2112
|
+
padding: 3px 10px;
|
|
2113
|
+
border-radius: 12px;
|
|
2114
|
+
background: var(--color-primary-element-light);
|
|
2115
|
+
color: var(--cn-board-primary-light-ink);
|
|
2116
|
+
font-size: 13px;
|
|
2117
|
+
font-weight: 600;
|
|
2118
|
+
line-height: normal;
|
|
2119
|
+
}
|
|
2120
|
+
|
|
2121
|
+
.cn-look-board .cn-email-tab__pill--archived:not(.cn-look-nextcloud *) {
|
|
2122
|
+
background: var(--cn-board-success-tint);
|
|
2123
|
+
color: var(--cn-board-success-ink);
|
|
2124
|
+
}
|
|
2125
|
+
|
|
2091
2126
|
/* ---- The attention flag's buttons --------------------------------------- */
|
|
2092
2127
|
/* The case boards draw "Markeer voor aandacht" and the flag's other labelled
|
|
2093
2128
|
buttons at the 40px control height (DqZaak and the case tab boards);
|
package/src/css/look-board.css
CHANGED
|
@@ -598,7 +598,8 @@
|
|
|
598
598
|
|
|
599
599
|
/* ---- A table on a dashboard card ------------------------------------------ */
|
|
600
600
|
/* The card is the frame: a table on it draws no border of its own, and its
|
|
601
|
-
pager sits on the card's inset under a hairline
|
|
601
|
+
pager sits on the card's inset under a hairline 12px under the table, its
|
|
602
|
+
links 12px below that (DqDoorlooptijd
|
|
602
603
|
"Zaken met risico", "Prestaties per zaaktype"; r32 a second frame inside
|
|
603
604
|
the card, the pager 16px in).
|
|
604
605
|
@spec openspec/changes/board-dashboard-table-in-card/specs/board-dashboard-table-in-card/spec.md#requirement-a-table-on-a-board-dashboard-card-has-no-frame-of-its-own */
|
|
@@ -608,6 +609,7 @@
|
|
|
608
609
|
}
|
|
609
610
|
|
|
610
611
|
.cn-look-board .cn-dashboard-page:not(.cn-look-nextcloud *) .cn-widget-wrapper__content .cn-table-container--board .cn-pagination.cn-pagination--board {
|
|
612
|
+
margin: 12px 0 0;
|
|
611
613
|
padding: 12px 0 0;
|
|
612
614
|
}
|
|
613
615
|
|
|
@@ -3343,6 +3345,15 @@ body:has(.cn-look-board):not(:has(.cn-look-nextcloud)) .vs__dropdown-menu:has(.c
|
|
|
3343
3345
|
padding: 0 var(--cn-board-dashboard-card-inset) 10px;
|
|
3344
3346
|
}
|
|
3345
3347
|
|
|
3348
|
+
/* A card of ruled rows (a record list that rules above its rows, a task
|
|
3349
|
+
list) ends 20px under its last row, the card's own padding, as the Dq
|
|
3350
|
+
boards draw it (DqMijnTeam "Wachtrij van uw team", DqMijnWerk "Mijn
|
|
3351
|
+
taken", "Verder werken"). */
|
|
3352
|
+
.cn-look-board .cn-dashboard-page:not(.cn-look-nextcloud *) .cn-widget-wrapper:not(.cn-widget-wrapper--borderless) .cn-widget-wrapper__content > .cn-record-list.cn-record-list--rule-above,
|
|
3353
|
+
.cn-look-board .cn-dashboard-page:not(.cn-look-nextcloud *) .cn-widget-wrapper:not(.cn-widget-wrapper--borderless) .cn-widget-wrapper__content > .cn-tasks-widget.cn-tasks-widget--list {
|
|
3354
|
+
padding-bottom: 20px;
|
|
3355
|
+
}
|
|
3356
|
+
|
|
3346
3357
|
/* The stacked bar's legend in the board's type: the label 14px and the
|
|
3347
3358
|
count 22px, both at the font's normal line height, 2px apart: a 46px item
|
|
3348
3359
|
(DqMijnWerk "Mijn 14 zaken per stap"; live drew 14.25/22.5px at 1.5 and
|
|
@@ -3583,6 +3594,12 @@ body:has(.cn-look-board):not(:has(.cn-look-nextcloud)) .vs__dropdown-menu:has(.c
|
|
|
3583
3594
|
line-height: normal;
|
|
3584
3595
|
}
|
|
3585
3596
|
|
|
3597
|
+
/* The footnote under the sections is a 13px line on the font's own leading
|
|
3598
|
+
(DqDoorlooptijd "Naleving"); the body's 1.5 made it 19.5 high. */
|
|
3599
|
+
.cn-look-board .cn-sections-widget__footnote:not(.cn-look-nextcloud *) {
|
|
3600
|
+
line-height: normal;
|
|
3601
|
+
}
|
|
3602
|
+
|
|
3586
3603
|
/* ---- Week strip (DqMijnWerk "Termijnen deze week") ---------------------- */
|
|
3587
3604
|
/* The days wrap inside the card instead of scrolling sideways: a row holds
|
|
3588
3605
|
as many days of at least 120px as the card fits, and the rest go to the
|
|
@@ -57,6 +57,7 @@
|
|
|
57
57
|
<span class="cn-email-tab__unread-dot" :class="{ 'is-shown': row.unread }" />
|
|
58
58
|
<NcAvatar
|
|
59
59
|
class="cn-email-tab__avatar"
|
|
60
|
+
:class="{ 'cn-email-tab__avatar--outbound': row.outbound }"
|
|
60
61
|
:size="36"
|
|
61
62
|
:displayName="row.avatarName"
|
|
62
63
|
:user="row.avatarUser"
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
<div class="cn-email-tab__body">
|
|
65
66
|
<div class="cn-email-tab__line">
|
|
66
67
|
<span class="cn-email-tab__subject" :title="row.subject">{{ row.subject }}</span>
|
|
67
|
-
<span class="cn-email-tab__date">
|
|
68
|
+
<span v-if="!row.meta" class="cn-email-tab__date">
|
|
68
69
|
<NcDateTime
|
|
69
70
|
v-if="row.dateValid"
|
|
70
71
|
:timestamp="row.dateMs"
|
|
@@ -72,14 +73,20 @@
|
|
|
72
73
|
<template v-else>{{ row.dateRaw }}</template>
|
|
73
74
|
</span>
|
|
74
75
|
</div>
|
|
75
|
-
<div class="cn-email-tab__sender" :title="row.sender">
|
|
76
|
-
{{ row.sender }}
|
|
76
|
+
<div class="cn-email-tab__sender" :title="row.meta || row.sender">
|
|
77
|
+
{{ row.meta || row.sender }}
|
|
77
78
|
</div>
|
|
78
79
|
<div v-if="row.snippet" class="cn-email-tab__snippet" :title="row.snippet">
|
|
79
80
|
{{ row.snippet }}
|
|
80
81
|
</div>
|
|
81
82
|
</div>
|
|
82
83
|
</component>
|
|
84
|
+
<span
|
|
85
|
+
v-if="row.pill"
|
|
86
|
+
class="cn-email-tab__pill"
|
|
87
|
+
:class="{ 'cn-email-tab__pill--archived': row.archived }">
|
|
88
|
+
{{ row.pill }}
|
|
89
|
+
</span>
|
|
83
90
|
<NcActions
|
|
84
91
|
class="cn-email-tab__menu"
|
|
85
92
|
:ariaLabel="moreActionsLabel"
|
|
@@ -125,14 +132,16 @@
|
|
|
125
132
|
</template>
|
|
126
133
|
|
|
127
134
|
<script>
|
|
128
|
-
import { translate as t } from '@nextcloud/l10n'
|
|
135
|
+
import { translatePlural as n, translate as t } from '@nextcloud/l10n'
|
|
129
136
|
import { NcActionButton, NcActionLink, NcActions, NcAvatar, NcButton, NcDateTime, NcLoadingIcon } from '@nextcloud/vue'
|
|
130
137
|
import EmailEditOutline from 'vue-material-design-icons/EmailEditOutline.vue'
|
|
131
138
|
import LinkVariant from 'vue-material-design-icons/LinkVariant.vue'
|
|
132
139
|
import LinkVariantOff from 'vue-material-design-icons/LinkVariantOff.vue'
|
|
133
140
|
import OpenInNew from 'vue-material-design-icons/OpenInNew.vue'
|
|
134
141
|
import CnEmailPicker from '../../../components/CnEmailPicker/CnEmailPicker.vue'
|
|
142
|
+
import { ageInDays, formatBoardDate, formatTimeOfDay } from '../../../utils/boardDate.js'
|
|
135
143
|
import { buildHeaders, prefixUrl } from '../../../utils/index.js'
|
|
144
|
+
import { userDisplayName } from '../../../utils/userDisplayName.js'
|
|
136
145
|
|
|
137
146
|
/**
|
|
138
147
|
* CnEmailTab — sidebar tab rendering the full list of Nextcloud Mail
|
|
@@ -242,6 +251,7 @@ export default {
|
|
|
242
251
|
* buble-compiled Vue 2 template stays free of `?.` / `??`.
|
|
243
252
|
*
|
|
244
253
|
* @return {object[]} One descriptor per message.
|
|
254
|
+
* @spec openspec/changes/linked-mail-row-details/specs/linked-mail-row-details/spec.md#requirement-a-linked-mail-with-details-reads-as-the-boards-draw-it
|
|
245
255
|
*/
|
|
246
256
|
rows() {
|
|
247
257
|
return this.messages.map((message) => {
|
|
@@ -249,6 +259,8 @@ export default {
|
|
|
249
259
|
const d = dateRaw === '' ? null : new Date(dateRaw)
|
|
250
260
|
const dateValid = d !== null && Number.isNaN(d.getTime()) === false
|
|
251
261
|
const sender = this.formatSender(message)
|
|
262
|
+
const details = this.linkDetails(message)
|
|
263
|
+
const archivedAs = details === null ? '' : this.text(details.archivedAs)
|
|
252
264
|
return {
|
|
253
265
|
id: message.id,
|
|
254
266
|
message,
|
|
@@ -262,6 +274,10 @@ export default {
|
|
|
262
274
|
avatarName: sender,
|
|
263
275
|
avatarUser: this.senderEmail(message),
|
|
264
276
|
href: this.threadUrl(message),
|
|
277
|
+
meta: details === null ? '' : this.metaLine(message, details, dateValid ? d : null),
|
|
278
|
+
outbound: details !== null && details.direction === 'outbound',
|
|
279
|
+
pill: details === null ? '' : this.archiveLabel(archivedAs),
|
|
280
|
+
archived: archivedAs !== '',
|
|
265
281
|
}
|
|
266
282
|
})
|
|
267
283
|
},
|
|
@@ -439,6 +455,126 @@ export default {
|
|
|
439
455
|
return false
|
|
440
456
|
},
|
|
441
457
|
|
|
458
|
+
/**
|
|
459
|
+
* The link's details (OpenRegister's EmailLink `details`), or null for
|
|
460
|
+
* a link without them, which keeps the plain sender line.
|
|
461
|
+
*
|
|
462
|
+
* @param {object} message The message record.
|
|
463
|
+
* @return {object|null} The details.
|
|
464
|
+
* @spec openspec/changes/linked-mail-row-details/specs/linked-mail-row-details/spec.md#requirement-a-linked-mail-with-details-reads-as-the-boards-draw-it
|
|
465
|
+
*/
|
|
466
|
+
linkDetails(message) {
|
|
467
|
+
const details = message.details
|
|
468
|
+
if (details === null || typeof details !== 'object') {
|
|
469
|
+
return null
|
|
470
|
+
}
|
|
471
|
+
const filled = Object.keys(details).some((key) => details[key] !== null && details[key] !== undefined && details[key] !== '')
|
|
472
|
+
return filled ? details : null
|
|
473
|
+
},
|
|
474
|
+
|
|
475
|
+
/**
|
|
476
|
+
* A trimmed string, or '' for anything that is not a filled string.
|
|
477
|
+
*
|
|
478
|
+
* @param {unknown} value The value.
|
|
479
|
+
* @return {string} The text.
|
|
480
|
+
* @spec openspec/changes/linked-mail-row-details/specs/linked-mail-row-details/spec.md#requirement-a-linked-mail-with-details-reads-as-the-boards-draw-it
|
|
481
|
+
*/
|
|
482
|
+
text(value) {
|
|
483
|
+
return typeof value === 'string' ? value.trim() : ''
|
|
484
|
+
},
|
|
485
|
+
|
|
486
|
+
/**
|
|
487
|
+
* The line under the subject: who it is from or to, when, how many
|
|
488
|
+
* attachments, and how it was linked, joined by middle dots.
|
|
489
|
+
*
|
|
490
|
+
* @param {object} message The message record.
|
|
491
|
+
* @param {object} details The link details.
|
|
492
|
+
* @param {Date|null} date The mail's moment, or null when unknown.
|
|
493
|
+
* @return {string} The meta line.
|
|
494
|
+
* @spec openspec/changes/linked-mail-row-details/specs/linked-mail-row-details/spec.md#requirement-a-linked-mail-with-details-reads-as-the-boards-draw-it
|
|
495
|
+
*/
|
|
496
|
+
metaLine(message, details, date) {
|
|
497
|
+
const parts = []
|
|
498
|
+
const recipient = this.text(details.recipientName)
|
|
499
|
+
if (details.direction === 'outbound' && recipient !== '') {
|
|
500
|
+
parts.push(t('nextcloud-vue', 'To {name}', { name: recipient }))
|
|
501
|
+
} else {
|
|
502
|
+
parts.push(t('nextcloud-vue', 'From {name}', { name: this.formatSender(message) }))
|
|
503
|
+
}
|
|
504
|
+
if (date !== null) {
|
|
505
|
+
parts.push(this.whenText(date))
|
|
506
|
+
}
|
|
507
|
+
const count = Number(details.attachmentCount)
|
|
508
|
+
if (Number.isInteger(count) && count > 0) {
|
|
509
|
+
parts.push(n('nextcloud-vue', '%n attachment', '%n attachments', count))
|
|
510
|
+
}
|
|
511
|
+
const linked = this.linkedText(message, details)
|
|
512
|
+
if (linked !== '') {
|
|
513
|
+
parts.push(linked)
|
|
514
|
+
}
|
|
515
|
+
return parts.join(' · ')
|
|
516
|
+
},
|
|
517
|
+
|
|
518
|
+
/**
|
|
519
|
+
* The mail's date as the boards write it: "5 okt 09.15" in the last
|
|
520
|
+
* week, "12 mrt" before that.
|
|
521
|
+
*
|
|
522
|
+
* @param {Date} date The mail's moment.
|
|
523
|
+
* @return {string} The date.
|
|
524
|
+
* @spec openspec/changes/linked-mail-row-details/specs/linked-mail-row-details/spec.md#requirement-a-linked-mail-with-details-reads-as-the-boards-draw-it
|
|
525
|
+
*/
|
|
526
|
+
whenText(date) {
|
|
527
|
+
const day = formatBoardDate(date)
|
|
528
|
+
const age = ageInDays(date)
|
|
529
|
+
if (age !== null && age >= 0 && age <= 7) {
|
|
530
|
+
return day + ' ' + formatTimeOfDay(date)
|
|
531
|
+
}
|
|
532
|
+
return day
|
|
533
|
+
},
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* How the mail was linked: automatically through a shared mailbox, from
|
|
537
|
+
* a saved mail file, or by a person.
|
|
538
|
+
*
|
|
539
|
+
* @param {object} message The message record.
|
|
540
|
+
* @param {object} details The link details.
|
|
541
|
+
* @return {string} The phrase, or '' when unknown.
|
|
542
|
+
* @spec openspec/changes/linked-mail-row-details/specs/linked-mail-row-details/spec.md#requirement-a-linked-mail-with-details-reads-as-the-boards-draw-it
|
|
543
|
+
*/
|
|
544
|
+
linkedText(message, details) {
|
|
545
|
+
if (details.linkedVia === 'mailbox') {
|
|
546
|
+
const mailbox = this.text(details.mailboxName)
|
|
547
|
+
return mailbox === ''
|
|
548
|
+
? t('nextcloud-vue', 'linked automatically')
|
|
549
|
+
: t('nextcloud-vue', 'linked automatically via {mailbox}', { mailbox })
|
|
550
|
+
}
|
|
551
|
+
if (details.linkedVia === 'file') {
|
|
552
|
+
return t('nextcloud-vue', 'from a saved mail file')
|
|
553
|
+
}
|
|
554
|
+
if (details.linkedVia === 'manual') {
|
|
555
|
+
const name = userDisplayName(message.linkedBy)
|
|
556
|
+
return name === '' ? '' : t('nextcloud-vue', 'linked by {name}', { name })
|
|
557
|
+
}
|
|
558
|
+
return ''
|
|
559
|
+
},
|
|
560
|
+
|
|
561
|
+
/**
|
|
562
|
+
* The pill beside a mail with details: its archive copy, or "Linked".
|
|
563
|
+
*
|
|
564
|
+
* @param {string} archivedAs The archive format, such as pdf, or ''.
|
|
565
|
+
* @return {string} The pill text.
|
|
566
|
+
* @spec openspec/changes/linked-mail-row-details/specs/linked-mail-row-details/spec.md#requirement-a-linked-mail-with-details-reads-as-the-boards-draw-it
|
|
567
|
+
*/
|
|
568
|
+
archiveLabel(archivedAs) {
|
|
569
|
+
if (archivedAs === '') {
|
|
570
|
+
return t('nextcloud-vue', 'Linked')
|
|
571
|
+
}
|
|
572
|
+
if (archivedAs.toLowerCase() === 'pdf') {
|
|
573
|
+
return t('nextcloud-vue', 'Archived as PDF')
|
|
574
|
+
}
|
|
575
|
+
return t('nextcloud-vue', 'Archived as {format}', { format: archivedAs })
|
|
576
|
+
},
|
|
577
|
+
|
|
442
578
|
rawWhen(message) {
|
|
443
579
|
const raw = message.mailDate || message.date || message.linkedAt
|
|
444
580
|
if (raw === undefined || raw === null || raw === '') {
|
|
@@ -659,6 +795,21 @@ a.cn-email-tab__row:hover {
|
|
|
659
795
|
white-space: nowrap;
|
|
660
796
|
}
|
|
661
797
|
|
|
798
|
+
.cn-email-tab__pill {
|
|
799
|
+
flex: none;
|
|
800
|
+
padding: 2px 8px;
|
|
801
|
+
border-radius: var(--border-radius-pill, 12px);
|
|
802
|
+
background: var(--color-primary-element-light);
|
|
803
|
+
color: var(--color-primary-element-light-text);
|
|
804
|
+
font-size: 0.85em;
|
|
805
|
+
white-space: nowrap;
|
|
806
|
+
}
|
|
807
|
+
|
|
808
|
+
.cn-email-tab__pill--archived {
|
|
809
|
+
background: var(--color-success);
|
|
810
|
+
color: var(--color-success-text);
|
|
811
|
+
}
|
|
812
|
+
|
|
662
813
|
.cn-email-tab__snippet {
|
|
663
814
|
color: var(--color-text-maxcontrast);
|
|
664
815
|
font-size: 0.85em;
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
*/
|
|
25
25
|
|
|
26
26
|
import { routeParamNames } from './routeParams.js'
|
|
27
|
+
import { stripTrailingSlashes } from './trailingSlashes.js'
|
|
27
28
|
|
|
28
29
|
/**
|
|
29
30
|
* Suffix that turns a page id into the name of its split route.
|
|
@@ -73,7 +74,7 @@ export function pageHasSplitView(page) {
|
|
|
73
74
|
* @spec openspec/changes/case-page-and-list-as-a-place/specs/index-page/spec.md
|
|
74
75
|
*/
|
|
75
76
|
export function splitRoutePath(route) {
|
|
76
|
-
const base = typeof route === 'string' ? route
|
|
77
|
+
const base = typeof route === 'string' ? stripTrailingSlashes(route) : ''
|
|
77
78
|
const param = routeParamNames(base).includes('id') ? 'splitId' : 'id'
|
|
78
79
|
return `${base}/split/:${param}`
|
|
79
80
|
}
|
package/src/utils/cnFetch.js
CHANGED
|
@@ -31,6 +31,9 @@
|
|
|
31
31
|
|
|
32
32
|
import { trackedFetch } from './diagnostics.js'
|
|
33
33
|
import { buildHeaders, buildQueryString, prefixUrl } from './headers.js'
|
|
34
|
+
import { stripTrailingSlashes } from './trailingSlashes.js'
|
|
35
|
+
|
|
36
|
+
export { stripTrailingSlashes }
|
|
34
37
|
|
|
35
38
|
/** The hosts the runtime can boot under. */
|
|
36
39
|
export const CN_HOSTS = ['nextcloud', 'public']
|
|
@@ -64,21 +67,6 @@ export function configureCnFetch(config = {}) {
|
|
|
64
67
|
}
|
|
65
68
|
}
|
|
66
69
|
|
|
67
|
-
/**
|
|
68
|
-
* Drop trailing `/` characters in one linear pass (a `/\/+$/` pattern
|
|
69
|
-
* backtracks quadratically on a long run of slashes).
|
|
70
|
-
*
|
|
71
|
-
* @param {string} value The string to trim.
|
|
72
|
-
* @return {string} The string without trailing slashes.
|
|
73
|
-
*/
|
|
74
|
-
export function stripTrailingSlashes(value) {
|
|
75
|
-
let end = value.length
|
|
76
|
-
while (end > 0 && value.charCodeAt(end - 1) === 47) {
|
|
77
|
-
end--
|
|
78
|
-
}
|
|
79
|
-
return value.slice(0, end)
|
|
80
|
-
}
|
|
81
|
-
|
|
82
70
|
/**
|
|
83
71
|
* The bearer credential, resolved.
|
|
84
72
|
*
|
|
@@ -302,6 +302,34 @@ export function firstFilled(templates, object, translate = (key) => key, now = n
|
|
|
302
302
|
return ''
|
|
303
303
|
}
|
|
304
304
|
|
|
305
|
+
/**
|
|
306
|
+
* Split a template into literal, field, literal, … as
|
|
307
|
+
* `template.split(/\{([^}]+)\}/)` does, in one linear pass.
|
|
308
|
+
*
|
|
309
|
+
* @param {string} template The template, with `{field}` placeholders.
|
|
310
|
+
* @return {string[]} The literals at even indexes, the field names at odd ones.
|
|
311
|
+
*/
|
|
312
|
+
function splitFields(template) {
|
|
313
|
+
const parts = []
|
|
314
|
+
let literalStart = 0
|
|
315
|
+
let open = template.indexOf('{')
|
|
316
|
+
while (open !== -1) {
|
|
317
|
+
const close = template.indexOf('}', open + 1)
|
|
318
|
+
if (close === -1) {
|
|
319
|
+
break
|
|
320
|
+
}
|
|
321
|
+
if (close === open + 1) {
|
|
322
|
+
open = template.indexOf('{', close + 1)
|
|
323
|
+
continue
|
|
324
|
+
}
|
|
325
|
+
parts.push(template.slice(literalStart, open), template.slice(open + 1, close))
|
|
326
|
+
literalStart = close + 1
|
|
327
|
+
open = template.indexOf('{', literalStart)
|
|
328
|
+
}
|
|
329
|
+
parts.push(template.slice(literalStart))
|
|
330
|
+
return parts
|
|
331
|
+
}
|
|
332
|
+
|
|
305
333
|
/**
|
|
306
334
|
* Fill a template such as `"{identifier} · {requester}"` field by field
|
|
307
335
|
* (a table column's `secondary` line, a detail page's meta line).
|
|
@@ -319,8 +347,7 @@ export function firstFilled(templates, object, translate = (key) => key, now = n
|
|
|
319
347
|
* @return {string} The filled template.
|
|
320
348
|
*/
|
|
321
349
|
export function joinTemplateParts(template, valueOf) {
|
|
322
|
-
|
|
323
|
-
const parts = template.split(/\{([^}]+)\}/)
|
|
350
|
+
const parts = splitFields(template)
|
|
324
351
|
const lead = parts[0]
|
|
325
352
|
const tail = parts[parts.length - 1]
|
|
326
353
|
let body = ''
|
package/src/utils/forge.js
CHANGED
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
* else in the suggestion flow needs to change.
|
|
26
26
|
*/
|
|
27
27
|
|
|
28
|
+
import { stripTrailingSlashes } from './trailingSlashes.js'
|
|
29
|
+
|
|
28
30
|
/**
|
|
29
31
|
* Default host per forge type. `forgejo`/`gitea` are self-hosted, so they
|
|
30
32
|
* have no canonical public host — a `baseUrl` MUST be supplied for those.
|
|
@@ -101,7 +103,7 @@ export function resolveForge(forge) {
|
|
|
101
103
|
const baseUrl = (forge && forge.baseUrl)
|
|
102
104
|
|| FORGE_DEFAULT_BASE_URLS[type]
|
|
103
105
|
|| DEFAULT_FORGE.baseUrl
|
|
104
|
-
return { type, baseUrl: baseUrl
|
|
106
|
+
return { type, baseUrl: stripTrailingSlashes(baseUrl) }
|
|
105
107
|
}
|
|
106
108
|
|
|
107
109
|
/**
|
package/src/utils/myTeam.js
CHANGED
|
@@ -194,7 +194,21 @@ export function fillMyTeamToken(text, name) {
|
|
|
194
194
|
if (typeof text !== 'string' || !text.includes('{myTeam}')) {
|
|
195
195
|
return text
|
|
196
196
|
}
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
197
|
+
let out = ''
|
|
198
|
+
let pos = 0
|
|
199
|
+
for (;;) {
|
|
200
|
+
const open = text.indexOf('[', pos)
|
|
201
|
+
const close = open === -1 ? -1 : text.indexOf(']', open + 1)
|
|
202
|
+
if (close === -1) {
|
|
203
|
+
break
|
|
204
|
+
}
|
|
205
|
+
const part = text.slice(open + 1, close)
|
|
206
|
+
if (part.includes('{myTeam}')) {
|
|
207
|
+
out += text.slice(pos, open) + (name ? part.replaceAll('{myTeam}', name) : '')
|
|
208
|
+
} else {
|
|
209
|
+
out += text.slice(pos, close + 1)
|
|
210
|
+
}
|
|
211
|
+
pos = close + 1
|
|
212
|
+
}
|
|
213
|
+
return (out + text.slice(pos)).replaceAll('{myTeam}', name)
|
|
200
214
|
}
|
|
@@ -26,6 +26,25 @@ export function isRowAggregate(agg) {
|
|
|
26
26
|
return Boolean(agg && agg.register && agg.schema && (agg.op === 'count' || (agg.op === 'max' && agg.field)))
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* One row's figures in a map of rows, created on first use. Rows live in a
|
|
31
|
+
* Map and figures in a prototype-less object, so a row id or figure key such
|
|
32
|
+
* as `__proto__` stays an ordinary key.
|
|
33
|
+
*
|
|
34
|
+
* @param {Map<string, object>} rows The figures by row id.
|
|
35
|
+
* @param {string|number} rowId The row id (read as a string).
|
|
36
|
+
* @return {object} The row's figures, by key.
|
|
37
|
+
*/
|
|
38
|
+
export function cellsOf(rows, rowId) {
|
|
39
|
+
const key = String(rowId)
|
|
40
|
+
let cells = rows.get(key)
|
|
41
|
+
if (!cells) {
|
|
42
|
+
cells = Object.create(null)
|
|
43
|
+
rows.set(key, cells)
|
|
44
|
+
}
|
|
45
|
+
return cells
|
|
46
|
+
}
|
|
47
|
+
|
|
29
48
|
/**
|
|
30
49
|
* Fill an aggregate's `where` for one row: a string `"@self.<path>"` reads
|
|
31
50
|
* that path of the row, everything else is passed through.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* SPDX-FileCopyrightText: 2026 Conduction B.V.
|
|
3
|
+
* SPDX-License-Identifier: EUPL-1.2
|
|
4
|
+
*
|
|
5
|
+
* Trailing-slash trimming, with no imports, so any module can use it.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Drop trailing `/` characters in one linear pass (a `/\/+$/` pattern
|
|
10
|
+
* backtracks quadratically on a long run of slashes).
|
|
11
|
+
*
|
|
12
|
+
* @param {string} value The string to trim.
|
|
13
|
+
* @return {string} The string without trailing slashes.
|
|
14
|
+
*/
|
|
15
|
+
export function stripTrailingSlashes(value) {
|
|
16
|
+
let end = value.length
|
|
17
|
+
while (end > 0 && value.charCodeAt(end - 1) === 47) {
|
|
18
|
+
end--
|
|
19
|
+
}
|
|
20
|
+
return value.slice(0, end)
|
|
21
|
+
}
|