@conduction/nextcloud-vue 2.84.0 → 2.85.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/CnAdminSettingsShell/CnAdminSettingsShell.vue.js +1 -1
- package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue2.js +131 -3
- package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue2.js.map +1 -1
- package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue3.js +54 -18
- package/dist/esm/components/CnAdminSettingsShell/CnAdminSettingsShell.vue3.js.map +1 -1
- package/dist/esm/components/CnBoardView/CnBoardView.vue.js +1 -1
- package/dist/esm/components/CnBoardView/CnBoardView.vue2.js +232 -4
- package/dist/esm/components/CnBoardView/CnBoardView.vue2.js.map +1 -1
- package/dist/esm/components/CnBoardView/CnBoardView.vue3.js +95 -51
- package/dist/esm/components/CnBoardView/CnBoardView.vue3.js.map +1 -1
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue.js +1 -1
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue2.js +114 -0
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue3.js +2 -2
- package/dist/esm/components/CnDashboardGrid/CnDashboardGrid.vue3.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue.js +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js +45 -0
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js +22 -12
- package/dist/esm/components/CnDashboardPage/CnDashboardPage.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js +23 -4
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue2.js.map +1 -1
- package/dist/esm/components/CnDetailPage/CnDetailPage.vue3.js.map +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue.js +1 -1
- package/dist/esm/components/CnDetailWidgetHost/CnDetailWidgetHost.vue2.js +3 -1
- 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 +18 -5
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnFactsWidget/CnFactsWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js +548 -77
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue2.js.map +1 -1
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js +191 -82
- package/dist/esm/components/CnIndexPage/CnIndexPage.vue3.js.map +1 -1
- package/dist/esm/components/CnIndexPage/useSelfFetchList.js +11 -2
- package/dist/esm/components/CnIndexPage/useSelfFetchList.js.map +1 -1
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue.js +1 -1
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js +95 -0
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js +24 -2
- package/dist/esm/components/CnObjectDataWidget/CnObjectDataWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue.js +1 -1
- package/dist/esm/components/CnRecordListWidget/CnRecordListWidget.vue2.js +70 -2
- 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/components/CnRegisterMapping/CnRegisterMapping.vue.js +1 -1
- package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue2.js +67 -5
- package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue2.js.map +1 -1
- package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue3.js +181 -124
- package/dist/esm/components/CnRegisterMapping/CnRegisterMapping.vue3.js.map +1 -1
- package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue.js +1 -1
- package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue2.js +5 -1
- package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue2.js.map +1 -1
- package/dist/esm/components/CnSettingsPage/CnSettingsPage.vue3.js.map +1 -1
- package/dist/esm/components/CnStatWidget/CnStatWidget.vue.js +1 -1
- package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js +134 -10
- package/dist/esm/components/CnStatWidget/CnStatWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnStatWidget/CnStatWidget.vue3.js +6 -2
- package/dist/esm/components/CnStatWidget/CnStatWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue.js +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js +6 -3
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnTabsWidget/CnTabsWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnToggleTableWidget/CnToggleTableWidget.vue.js +1 -1
- package/dist/esm/components/CnToggleTableWidget/CnToggleTableWidget.vue2.js +140 -7
- package/dist/esm/components/CnToggleTableWidget/CnToggleTableWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnToggleTableWidget/CnToggleTableWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue.js +1 -1
- package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue2.js +37 -9
- package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue2.js.map +1 -1
- package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue3.js +6 -5
- package/dist/esm/components/CnVersionInfoCard/CnVersionInfoCard.vue3.js.map +1 -1
- package/dist/esm/components/CnWeekStripWidget/CnWeekStripWidget.vue.js +1 -1
- package/dist/esm/components/CnWeekStripWidget/CnWeekStripWidget.vue2.js +2 -1
- package/dist/esm/components/CnWeekStripWidget/CnWeekStripWidget.vue2.js.map +1 -1
- package/dist/esm/components/CnWeekStripWidget/CnWeekStripWidget.vue3.js.map +1 -1
- package/dist/esm/components/CnWidgetCardGrid/CnWidgetCardGrid.vue2.js +53 -1
- package/dist/esm/components/CnWidgetCardGrid/CnWidgetCardGrid.vue2.js.map +1 -1
- package/dist/esm/components/CnWidgetCardGrid/CnWidgetCardGrid.vue3.js +3 -2
- package/dist/esm/components/CnWidgetCardGrid/CnWidgetCardGrid.vue3.js.map +1 -1
- package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue.js +1 -1
- package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue2.js +135 -0
- package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue2.js.map +1 -1
- package/dist/esm/components/CnWidgetObjectTable/CnWidgetObjectTable.vue3.js.map +1 -1
- package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue.js +1 -1
- package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue2.js +19 -0
- package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue2.js.map +1 -1
- package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue3.js +37 -19
- package/dist/esm/components/CnWidgetWrapper/CnWidgetWrapper.vue3.js.map +1 -1
- package/dist/esm/composables/useListView.js +21 -0
- package/dist/esm/composables/useListView.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/l10n/en.json.js +23 -1
- package/dist/esm/l10n/en.json.js.map +1 -1
- package/dist/esm/l10n/nl.json.js +41 -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 +742 -397
- package/dist/esm/store/useObjectStore.js +16 -2
- package/dist/esm/store/useObjectStore.js.map +1 -1
- package/dist/esm/utils/boardColumns.js +8 -1
- package/dist/esm/utils/boardColumns.js.map +1 -1
- package/dist/esm/utils/boardReferenceColumns.js +278 -0
- package/dist/esm/utils/boardReferenceColumns.js.map +1 -0
- package/dist/esm/utils/buildManifest.js +4 -1
- package/dist/esm/utils/buildManifest.js.map +1 -1
- package/dist/esm/utils/gridStack.js +40 -1
- package/dist/esm/utils/gridStack.js.map +1 -1
- package/dist/esm/utils/humaniseKey.js +41 -0
- package/dist/esm/utils/humaniseKey.js.map +1 -0
- package/dist/esm/utils/notificationRuleLabel.js +6 -23
- package/dist/esm/utils/notificationRuleLabel.js.map +1 -1
- package/dist/esm/utils/validateManifestV2.compiled.js +3 -3
- package/dist/esm/utils/validateManifestV2.compiled.js.map +1 -1
- package/dist/esm/utils/widgetDispatch.js +8 -2
- package/dist/esm/utils/widgetDispatch.js.map +1 -1
- package/dist/nextcloud-vue.cjs.js +15075 -12590
- package/dist/nextcloud-vue.cjs.js.map +2 -2
- package/dist/nextcloud-vue.css +742 -397
- package/l10n/en.json +23 -1
- package/l10n/nl.json +41 -1
- package/package.json +1 -1
- package/src/components/CnAdminSettingsShell/CnAdminSettingsShell.vue +160 -8
- package/src/components/CnBoardView/CnBoardView.vue +262 -6
- package/src/components/CnDashboardGrid/CnDashboardGrid.vue +116 -2
- package/src/components/CnDashboardPage/CnDashboardPage.vue +57 -2
- package/src/components/CnDetailPage/CnDetailPage.md +1 -1
- package/src/components/CnDetailPage/CnDetailPage.vue +23 -4
- package/src/components/CnDetailWidgetHost/CnDetailWidgetHost.vue +3 -1
- package/src/components/CnFactsWidget/CnFactsWidget.vue +18 -5
- package/src/components/CnIndexPage/CnIndexPage.vue +586 -25
- package/src/components/CnIndexPage/useSelfFetchList.js +10 -1
- package/src/components/CnObjectDataWidget/CnObjectDataWidget.vue +123 -3
- package/src/components/CnRecordListWidget/CnRecordListWidget.vue +70 -2
- package/src/components/CnRegisterMapping/CnRegisterMapping.md +5 -0
- package/src/components/CnRegisterMapping/CnRegisterMapping.vue +231 -96
- package/src/components/CnSettingsPage/CnSettingsPage.vue +5 -1
- package/src/components/CnStatWidget/CnStatWidget.vue +136 -11
- package/src/components/CnTabsWidget/CnTabsWidget.vue +6 -3
- package/src/components/CnToggleTableWidget/CnToggleTableWidget.vue +140 -7
- package/src/components/CnVersionInfoCard/CnVersionInfoCard.md +2 -1
- package/src/components/CnVersionInfoCard/CnVersionInfoCard.vue +42 -13
- package/src/components/CnWeekStripWidget/CnWeekStripWidget.vue +2 -1
- package/src/components/CnWidgetCardGrid/CnWidgetCardGrid.vue +55 -2
- package/src/components/CnWidgetObjectTable/CnWidgetObjectTable.vue +135 -0
- package/src/components/CnWidgetWrapper/CnWidgetWrapper.md +10 -0
- package/src/components/CnWidgetWrapper/CnWidgetWrapper.vue +44 -1
- package/src/composables/useListView.js +21 -0
- package/src/css/board.css +65 -4
- package/src/css/dialog.css +4 -2
- package/src/css/index-page.css +49 -0
- package/src/css/kpi-card.css +13 -0
- package/src/css/look-board.css +96 -7
- package/src/index.js +2 -0
- package/src/schemas/app-manifest-v2.schema.json +115 -5
- package/src/store/useObjectStore.js +16 -2
- package/src/utils/boardColumns.js +8 -1
- package/src/utils/boardReferenceColumns.js +274 -0
- package/src/utils/buildManifest.js +4 -1
- package/src/utils/gridStack.js +39 -0
- package/src/utils/humaniseKey.js +38 -0
- package/src/utils/notificationRuleLabel.js +5 -23
- package/src/utils/validateManifestV2.compiled.js +3 -3
- package/src/utils/widgetDispatch.js +8 -2
package/l10n/en.json
CHANGED
|
@@ -1418,7 +1418,29 @@
|
|
|
1418
1418
|
"No value ({count})": "No value ({count})",
|
|
1419
1419
|
"{start} to {end}": "{start} to {end}",
|
|
1420
1420
|
"Breadcrumb": "Breadcrumb",
|
|
1421
|
-
"Moving to {stage}": "Moving to {stage}"
|
|
1421
|
+
"Moving to {stage}": "Moving to {stage}",
|
|
1422
|
+
"Application name": "Application name",
|
|
1423
|
+
"Configured version": "Configured version",
|
|
1424
|
+
"Updating…": "Updating…",
|
|
1425
|
+
"Up to date": "Up to date",
|
|
1426
|
+
"Loading version information…": "Loading version information…",
|
|
1427
|
+
"Configuration re-imported successfully": "Configuration re-imported successfully",
|
|
1428
|
+
"Configure your {app} installation": "Configure your {app} installation",
|
|
1429
|
+
"For support, contact us at": "For support, contact us at",
|
|
1430
|
+
"For a Service Level Agreement (SLA), contact": "For a Service Level Agreement (SLA), contact",
|
|
1431
|
+
"Help us": "Help us",
|
|
1432
|
+
"Importing…": "Importing…",
|
|
1433
|
+
"Information about the current {app} installation": "Information about the current {app} installation",
|
|
1434
|
+
"Re-import failed": "Re-import failed",
|
|
1435
|
+
"Run setup wizard": "Run setup wizard",
|
|
1436
|
+
"Support": "Support",
|
|
1437
|
+
"{app} Settings": "{app} Settings",
|
|
1438
|
+
"Loading registers…": "Loading registers…",
|
|
1439
|
+
"Object type": "Object type",
|
|
1440
|
+
"Register {id}": "Register {id}",
|
|
1441
|
+
"Schema {id}": "Schema {id}",
|
|
1442
|
+
"The registers could not be loaded: {reason}": "The registers could not be loaded: {reason}",
|
|
1443
|
+
"no connection": "no connection"
|
|
1422
1444
|
},
|
|
1423
1445
|
"plurals": {
|
|
1424
1446
|
"{count} selected": [
|
package/l10n/nl.json
CHANGED
|
@@ -1584,7 +1584,47 @@
|
|
|
1584
1584
|
"Transition failed": "De overgang is mislukt",
|
|
1585
1585
|
"Closed": "Afgesloten",
|
|
1586
1586
|
"Skip to {action}": "Ga naar {action}",
|
|
1587
|
-
"Moving to {stage}": "Bezig met verplaatsen naar {stage}"
|
|
1587
|
+
"Moving to {stage}": "Bezig met verplaatsen naar {stage}",
|
|
1588
|
+
"Due {date}": "Termijn {date}",
|
|
1589
|
+
"Overdue {date}": "Over tijd sinds {date}",
|
|
1590
|
+
"Elsewhere": "Elders",
|
|
1591
|
+
"Move to": "Verplaatsen naar",
|
|
1592
|
+
"Nothing here": "Niets in deze kolom",
|
|
1593
|
+
"Open in new tab": "Openen in nieuw tabblad",
|
|
1594
|
+
"Show {count} more": "Toon {count} meer",
|
|
1595
|
+
"Somebody else moved this card. It is shown where it is now.": "Iemand anders heeft deze kaart al verplaatst. Je ziet hem nu op zijn nieuwe plek.",
|
|
1596
|
+
"That move was refused.": "Die verplaatsing is geweigerd.",
|
|
1597
|
+
"This list has no status field with stages, so it cannot be shown as a board.": "Deze lijst heeft geen statusveld met fases, dus er is geen bord van te maken.",
|
|
1598
|
+
"not allowed": "niet toegestaan",
|
|
1599
|
+
"on this page": "op deze pagina",
|
|
1600
|
+
"{count} on this page": "{count} op deze pagina",
|
|
1601
|
+
"{name} cannot move to {column}.": "{name} kan niet naar {column}.",
|
|
1602
|
+
"{name}, in {column}": "{name}, in {column}",
|
|
1603
|
+
"This card cannot move to that column.": "Deze kaart kan niet naar die kolom.",
|
|
1604
|
+
"Nobody": "Niemand",
|
|
1605
|
+
"{label}:": "{label}:",
|
|
1606
|
+
"Application name": "Naam van de app",
|
|
1607
|
+
"Configured version": "Ingestelde versie",
|
|
1608
|
+
"Updating…": "Bijwerken…",
|
|
1609
|
+
"Up to date": "Bijgewerkt",
|
|
1610
|
+
"Loading version information…": "Versie-informatie laden…",
|
|
1611
|
+
"Configuration re-imported successfully": "De configuratie is opnieuw geïmporteerd",
|
|
1612
|
+
"Configure your {app} installation": "Stel je {app}-installatie in",
|
|
1613
|
+
"For support, contact us at": "Voor ondersteuning mail je naar",
|
|
1614
|
+
"For a Service Level Agreement (SLA), contact": "Voor een Service Level Agreement (SLA) mail je naar",
|
|
1615
|
+
"Help us": "Help ons",
|
|
1616
|
+
"Importing…": "Importeren…",
|
|
1617
|
+
"Information about the current {app} installation": "Informatie over de huidige {app}-installatie",
|
|
1618
|
+
"Re-import failed": "Opnieuw importeren is mislukt",
|
|
1619
|
+
"Run setup wizard": "Installatiehulp starten",
|
|
1620
|
+
"Support": "Ondersteuning",
|
|
1621
|
+
"{app} Settings": "{app}-instellingen",
|
|
1622
|
+
"Loading registers…": "Registers laden…",
|
|
1623
|
+
"Object type": "Soort object",
|
|
1624
|
+
"Register {id}": "Register {id}",
|
|
1625
|
+
"Schema {id}": "Schema {id}",
|
|
1626
|
+
"The registers could not be loaded: {reason}": "De registers konden niet worden geladen: {reason}",
|
|
1627
|
+
"no connection": "geen verbinding"
|
|
1588
1628
|
},
|
|
1589
1629
|
"plurals": {
|
|
1590
1630
|
"{count} selected": [
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@conduction/nextcloud-vue",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.85.0",
|
|
4
4
|
"description": "Shared Vue component library for Conduction Nextcloud apps — complements @nextcloud/vue with higher-level components, OpenRegister integration, and NL Design System support",
|
|
5
5
|
"homepage": "https://github.com/ConductionNL/nextcloud-vue#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -56,14 +56,38 @@
|
|
|
56
56
|
</div>
|
|
57
57
|
</div>
|
|
58
58
|
|
|
59
|
+
<!-- `tabs`: a strip under the header (boards ShInstellingen,
|
|
60
|
+
LpBeheerAlgemeen). Each tab's panel holds the `tab-<id>` slot; the
|
|
61
|
+
version card, the credential broker and the default slot below
|
|
62
|
+
belong to the first tab and show only while it is open. -->
|
|
63
|
+
<CnTabs
|
|
64
|
+
v-if="tabItems.length > 0"
|
|
65
|
+
class="cn-admin-settings-shell__tabs"
|
|
66
|
+
:look="isBoard ? 'board' : 'nextcloud'"
|
|
67
|
+
:ariaLabel="resolvedTitle"
|
|
68
|
+
data-testid="cn-admin-settings-tabs"
|
|
69
|
+
@update:activeIndex="onTabIndex">
|
|
70
|
+
<CnTab
|
|
71
|
+
v-for="tab in tabItems"
|
|
72
|
+
:key="tab.id"
|
|
73
|
+
:title="tab.label"
|
|
74
|
+
:count="tab.count"
|
|
75
|
+
:active="tab.id === activeTabId">
|
|
76
|
+
<div class="cn-admin-settings-shell__panel" :data-tab="tab.id">
|
|
77
|
+
<!-- @slot tab-<id> The panel of the tab with that `id` in `tabs`. -->
|
|
78
|
+
<slot :name="`tab-${tab.id}`" />
|
|
79
|
+
</div>
|
|
80
|
+
</CnTab>
|
|
81
|
+
</CnTabs>
|
|
82
|
+
|
|
59
83
|
<!-- `versionCardPosition: "end"`: the app's sections come first, and the
|
|
60
84
|
version card and the credential broker follow them (board DcBeheer
|
|
61
85
|
starts with the app's own card). The same slot, rendered once. -->
|
|
62
|
-
<slot v-if="versionCardAtEnd" />
|
|
86
|
+
<slot v-if="versionCardAtEnd && onFirstTab" />
|
|
63
87
|
|
|
64
88
|
<!-- Version information card (version, up-to-date check, re-import, support footer) -->
|
|
65
89
|
<CnVersionInfoCard
|
|
66
|
-
v-if="showVersionCard"
|
|
90
|
+
v-if="showVersionCard && onFirstTab"
|
|
67
91
|
:appName="appName"
|
|
68
92
|
:appVersion="resolvedVersion"
|
|
69
93
|
:configuredVersion="resolvedConfiguredVersion"
|
|
@@ -72,6 +96,7 @@
|
|
|
72
96
|
:updating="updating"
|
|
73
97
|
:title="versionTitle"
|
|
74
98
|
:description="resolvedVersionDescription"
|
|
99
|
+
:wide="versionCardWide"
|
|
75
100
|
@update="onUpdate">
|
|
76
101
|
<template #actions>
|
|
77
102
|
<!-- Canonical "Re-import configuration" action (POST /apps/<appId>/api/settings/load) -->
|
|
@@ -149,15 +174,15 @@
|
|
|
149
174
|
informational "apps requesting credentials" list inside.
|
|
150
175
|
-->
|
|
151
176
|
<CnCredentials
|
|
152
|
-
v-if="showOrganisationCredentials"
|
|
177
|
+
v-if="showOrganisationCredentials && onFirstTab"
|
|
153
178
|
scope="organisation"
|
|
154
179
|
:appId="appId"
|
|
155
180
|
:appName="appName"
|
|
156
181
|
:appCredentials="appCredentials"
|
|
157
182
|
data-testid="cn-admin-organisation-credentials" />
|
|
158
183
|
|
|
159
|
-
<!-- @slot default The app's own settings sections, rendered below the version card, or above it with `versionCardPosition: "end"`. -->
|
|
160
|
-
<slot v-if="!versionCardAtEnd" />
|
|
184
|
+
<!-- @slot default The app's own settings sections, rendered below the version card, or above it with `versionCardPosition: "end"`. With `tabs`, only while the first tab is open. -->
|
|
185
|
+
<slot v-if="!versionCardAtEnd && onFirstTab" />
|
|
161
186
|
|
|
162
187
|
<!-- First-time setup wizard, opened from the admin page (ADR-042). -->
|
|
163
188
|
<CnSetupWizard
|
|
@@ -176,7 +201,7 @@ import { loadState } from '@nextcloud/initial-state'
|
|
|
176
201
|
import { translate as t } from '@nextcloud/l10n'
|
|
177
202
|
import { generateUrl } from '@nextcloud/router'
|
|
178
203
|
import { NcButton, NcLoadingIcon, NcSettingsSection } from '@nextcloud/vue'
|
|
179
|
-
import { computed } from 'vue'
|
|
204
|
+
import { computed, provide } from 'vue'
|
|
180
205
|
import AutoFix from 'vue-material-design-icons/AutoFix.vue'
|
|
181
206
|
import BookOpenVariant from 'vue-material-design-icons/BookOpenVariant.vue'
|
|
182
207
|
import HelpCircleOutline from 'vue-material-design-icons/HelpCircleOutline.vue'
|
|
@@ -189,8 +214,38 @@ import { useEnvironment } from '../../composables/useEnvironment.js'
|
|
|
189
214
|
import { normalizeLook, useLook } from '../../composables/useLook.js'
|
|
190
215
|
import { buildFeatureRequestUrl } from '../../utils/forge.js'
|
|
191
216
|
import { prefixUrl } from '../../utils/headers.js'
|
|
217
|
+
import { CnTab, CnTabs } from '../CnTabs/index.js'
|
|
192
218
|
import { CnVersionInfoCard } from '../CnVersionInfoCard/index.js'
|
|
193
219
|
|
|
220
|
+
/**
|
|
221
|
+
* The tab the address names.
|
|
222
|
+
*
|
|
223
|
+
* @param {string} key The query parameter.
|
|
224
|
+
* @return {string} Its value, or ''.
|
|
225
|
+
*/
|
|
226
|
+
function readTabFromAddress(key) {
|
|
227
|
+
if (typeof window === 'undefined' || !key) {
|
|
228
|
+
return ''
|
|
229
|
+
}
|
|
230
|
+
return new URLSearchParams(window.location.search).get(key) || ''
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
/**
|
|
234
|
+
* Put the open tab in the address without a new history entry.
|
|
235
|
+
*
|
|
236
|
+
* @param {string} key The query parameter.
|
|
237
|
+
* @param {string} id The tab's id.
|
|
238
|
+
* @return {void}
|
|
239
|
+
*/
|
|
240
|
+
function writeTabToAddress(key, id) {
|
|
241
|
+
if (typeof window === 'undefined' || !key || !window.history?.replaceState) {
|
|
242
|
+
return
|
|
243
|
+
}
|
|
244
|
+
const url = new URL(window.location.href)
|
|
245
|
+
url.searchParams.set(key, id)
|
|
246
|
+
window.history.replaceState(window.history.state, '', url.toString())
|
|
247
|
+
}
|
|
248
|
+
|
|
194
249
|
/**
|
|
195
250
|
* CnAdminSettingsShell — the canonical chrome for a Conduction app's Nextcloud
|
|
196
251
|
* admin settings page.
|
|
@@ -235,6 +290,8 @@ export default {
|
|
|
235
290
|
CnCredentials,
|
|
236
291
|
CnVersionInfoCard,
|
|
237
292
|
CnSetupWizard,
|
|
293
|
+
CnTab,
|
|
294
|
+
CnTabs,
|
|
238
295
|
NcButton,
|
|
239
296
|
NcLoadingIcon,
|
|
240
297
|
Refresh,
|
|
@@ -357,12 +414,49 @@ export default {
|
|
|
357
414
|
default: '',
|
|
358
415
|
},
|
|
359
416
|
|
|
417
|
+
/**
|
|
418
|
+
* A tab strip under the header, as `[{ id, label, count? }]`. Each
|
|
419
|
+
* tab's panel is the `tab-<id>` slot; the version card, the credential
|
|
420
|
+
* broker and the default slot show only on the first tab. The open tab
|
|
421
|
+
* is in the address (`?<tabQueryKey>=<id>`), so a link opens it and a
|
|
422
|
+
* reload keeps it. The strip is keyboard operable (arrow keys, Home,
|
|
423
|
+
* End). Empty draws no strip.
|
|
424
|
+
*
|
|
425
|
+
* @type {Array<{id: string, label: string, count?: number}>}
|
|
426
|
+
* @spec openspec/changes/admin-settings-tabs/specs/settings-board-look/spec.md#requirement-the-admin-shell-can-draw-a-tab-strip
|
|
427
|
+
*/
|
|
428
|
+
tabs: {
|
|
429
|
+
type: Array,
|
|
430
|
+
default: () => [],
|
|
431
|
+
},
|
|
432
|
+
|
|
433
|
+
/**
|
|
434
|
+
* The query parameter that holds the open tab's `id`.
|
|
435
|
+
*
|
|
436
|
+
* @spec openspec/changes/admin-settings-tabs/specs/settings-board-look/spec.md#requirement-the-admin-shell-can-draw-a-tab-strip
|
|
437
|
+
*/
|
|
438
|
+
tabQueryKey: {
|
|
439
|
+
type: String,
|
|
440
|
+
default: 'tab',
|
|
441
|
+
},
|
|
442
|
+
|
|
360
443
|
/** Whether to render the version card. */
|
|
361
444
|
showVersionCard: {
|
|
362
445
|
type: Boolean,
|
|
363
446
|
default: true,
|
|
364
447
|
},
|
|
365
448
|
|
|
449
|
+
/**
|
|
450
|
+
* Under the board look the version card spans the whole settings grid.
|
|
451
|
+
* Set to `false` to keep it one card in the grid.
|
|
452
|
+
*
|
|
453
|
+
* @spec openspec/changes/board-version-card-full-width/specs/settings-board-look/spec.md#requirement-the-board-version-card-spans-the-settings-grid
|
|
454
|
+
*/
|
|
455
|
+
versionCardWide: {
|
|
456
|
+
type: Boolean,
|
|
457
|
+
default: true,
|
|
458
|
+
},
|
|
459
|
+
|
|
366
460
|
/**
|
|
367
461
|
* Where the version card (and the organisation credential broker) sits:
|
|
368
462
|
* `start`, above the app's sections (the default), or `end`, after them,
|
|
@@ -481,15 +575,18 @@ export default {
|
|
|
481
575
|
},
|
|
482
576
|
},
|
|
483
577
|
|
|
484
|
-
emits: ['update', 'reimported', 'reimport-error'],
|
|
578
|
+
emits: ['update', 'reimported', 'reimport-error', 'tab-change'],
|
|
485
579
|
|
|
486
580
|
setup(props) {
|
|
487
581
|
// The app's own `environment` setting, else the active organisation's.
|
|
488
582
|
const { environment: environmentName } = useEnvironment({ environment: () => props.environment })
|
|
489
|
-
const { isBoard } = useLook(props)
|
|
583
|
+
const { look, isBoard } = useLook(props)
|
|
490
584
|
// A shell told `look: "board"` itself draws the board look also on an
|
|
491
585
|
// admin page that no CnAppRoot wraps, as Nextcloud's settings pages are.
|
|
492
586
|
const ownLookClass = computed(() => (normalizeLook(props.look) === 'board' ? 'cn-look-board' : ''))
|
|
587
|
+
// Everything inside the shell, its own version card and the app's
|
|
588
|
+
// sections alike, follows the shell's look without the app providing it.
|
|
589
|
+
provide('cnLook', look)
|
|
493
590
|
return { environmentName, isBoard, ownLookClass }
|
|
494
591
|
},
|
|
495
592
|
|
|
@@ -497,10 +594,44 @@ export default {
|
|
|
497
594
|
return {
|
|
498
595
|
reimporting: false,
|
|
499
596
|
setupWizardOpen: false,
|
|
597
|
+
// The open tab's id; empty until a tab is picked or the address names one.
|
|
598
|
+
chosenTabId: readTabFromAddress(this.tabQueryKey),
|
|
500
599
|
}
|
|
501
600
|
},
|
|
502
601
|
|
|
503
602
|
computed: {
|
|
603
|
+
/**
|
|
604
|
+
* The tabs that have an id and a label.
|
|
605
|
+
*
|
|
606
|
+
* @return {Array<{id: string, label: string, count: number|null}>}
|
|
607
|
+
* @spec openspec/changes/admin-settings-tabs/specs/settings-board-look/spec.md#requirement-the-admin-shell-can-draw-a-tab-strip
|
|
608
|
+
*/
|
|
609
|
+
tabItems() {
|
|
610
|
+
return (Array.isArray(this.tabs) ? this.tabs : [])
|
|
611
|
+
.filter((tab) => tab && typeof tab.id === 'string' && tab.id !== '' && typeof tab.label === 'string' && tab.label !== '')
|
|
612
|
+
.map((tab) => ({ id: tab.id, label: tab.label, count: tab.count ?? null }))
|
|
613
|
+
},
|
|
614
|
+
|
|
615
|
+
/**
|
|
616
|
+
* The open tab: the one picked or named in the address, else the first.
|
|
617
|
+
*
|
|
618
|
+
* @return {string} Its id, or '' without tabs.
|
|
619
|
+
*/
|
|
620
|
+
activeTabId() {
|
|
621
|
+
const ids = this.tabItems.map((tab) => tab.id)
|
|
622
|
+
return ids.includes(this.chosenTabId) ? this.chosenTabId : (ids[0] || '')
|
|
623
|
+
},
|
|
624
|
+
|
|
625
|
+
/**
|
|
626
|
+
* Whether the shell's own content shows: always without tabs, else on
|
|
627
|
+
* the first tab.
|
|
628
|
+
*
|
|
629
|
+
* @return {boolean}
|
|
630
|
+
*/
|
|
631
|
+
onFirstTab() {
|
|
632
|
+
return this.tabItems.length === 0 || this.activeTabId === this.tabItems[0].id
|
|
633
|
+
},
|
|
634
|
+
|
|
504
635
|
/**
|
|
505
636
|
* Whether the app's sections come before the version card.
|
|
506
637
|
*
|
|
@@ -625,6 +756,27 @@ export default {
|
|
|
625
756
|
},
|
|
626
757
|
|
|
627
758
|
methods: {
|
|
759
|
+
/**
|
|
760
|
+
* A tab was picked in the strip: remember it, put it in the address
|
|
761
|
+
* (replacing the entry, so Back leaves the page) and tell the app.
|
|
762
|
+
*
|
|
763
|
+
* @param {number} index The picked tab's index.
|
|
764
|
+
* @return {void}
|
|
765
|
+
* @spec openspec/changes/admin-settings-tabs/specs/settings-board-look/spec.md#requirement-the-admin-shell-can-draw-a-tab-strip
|
|
766
|
+
*/
|
|
767
|
+
onTabIndex(index) {
|
|
768
|
+
const tab = this.tabItems[index]
|
|
769
|
+
if (!tab || tab.id === this.chosenTabId) {
|
|
770
|
+
return
|
|
771
|
+
}
|
|
772
|
+
this.chosenTabId = tab.id
|
|
773
|
+
writeTabToAddress(this.tabQueryKey, tab.id)
|
|
774
|
+
/**
|
|
775
|
+
* @event tab-change Emitted when the reader opens another tab. Payload: its `id`.
|
|
776
|
+
*/
|
|
777
|
+
this.$emit('tab-change', tab.id)
|
|
778
|
+
},
|
|
779
|
+
|
|
628
780
|
/** Forward the version card's update-button click to the parent. */
|
|
629
781
|
onUpdate() {
|
|
630
782
|
/**
|