From 788cfaae0fdcacd9c3b4b18c208be9342661ea60 Mon Sep 17 00:00:00 2001 From: Ruben van der Linde Date: Tue, 13 Oct 2026 19:45:56 +0200 Subject: [PATCH 1/6] fix(admin): the admin page opens on Algemeen, in the board's cards and tabs The setup banner, the defaults, group-shared dashboards and the default-app note sat above the tab strip on every tab. They now form the first tab, Algemeen, as cards in two columns (board LpBeheerAlgemeen), and the page opens there. The tab strip takes the board's 44px tabs with a 3px underline, and four tab names follow the board: Bediening, Versies en analyse, Organisatiemenu, Demogegevens. --- l10n/nl.js | 8 +- l10n/nl.json | 8 +- src/components/admin/AdminSettings.vue | 500 +++++++++--------- src/components/admin/BeheerTabs.vue | 20 +- .../__tests__/AdminSettings.tabs.spec.js | 38 ++ 5 files changed, 321 insertions(+), 253 deletions(-) create mode 100644 src/components/admin/__tests__/AdminSettings.tabs.spec.js diff --git a/l10n/nl.js b/l10n/nl.js index 1de4d5d28..3576c1e0d 100644 --- a/l10n/nl.js +++ b/l10n/nl.js @@ -860,7 +860,7 @@ OC.L10N.register( "Step {n} / {total}" : "Stap {n} / {total}", "Welcome" : "Welkom", "Pick the order Nextcloud groups appear when LaunchPad routes users to a workspace." : "Kies de volgorde waarin Nextcloud-groepen verschijnen wanneer LaunchPad gebruikers naar een werkruimte stuurt.", - "Demo data" : "Demo-data", + "Demo data" : "Demogegevens", "The demo data showcases will appear here once the demo-data-showcases capability ships. For now this step is informational only." : "De demo-showcases verschijnen hier zodra de demo-data-showcases-capability beschikbaar is. Deze stap is voorlopig alleen ter informatie.", "Skip this step for now — demo packages can be installed later from the admin section." : "Sla deze stap voor nu over — demo-pakketten kunnen later vanuit het beheerdergedeelte worden geïnstalleerd.", "Admin roles" : "Beheerdersrollen", @@ -928,11 +928,11 @@ OC.L10N.register( "Delete role permission for group \"{group}\"?" : "Rolrecht voor groep \"{group}\" verwijderen?", "Administration areas" : "Beheergebieden", "Templates" : "Sjablonen", - "Operations" : "Beheer", + "Operations" : "Bediening", "Roles & Permissions" : "Rollen en rechten", - "Versioning & Audit" : "Versiebeheer en audit", + "Versioning & Audit" : "Versies en analyse", "Sharing" : "Delen", - "Org navigation" : "Organisatienavigatie", + "Org navigation" : "Organisatiemenu", "Widgets with visibility rules" : "Widgets met zichtbaarheidsregels", "Every widget placement that has at least one conditional visibility rule, across all dashboards." : "Elke widgetplaatsing met ten minste één voorwaardelijke zichtbaarheidsregel, op alle dashboards.", "No visibility rules yet" : "Nog geen zichtbaarheidsregels", diff --git a/l10n/nl.json b/l10n/nl.json index beb493801..4f2202dd9 100644 --- a/l10n/nl.json +++ b/l10n/nl.json @@ -867,7 +867,7 @@ "Step {n} / {total}": "Stap {n} / {total}", "Welcome": "Welkom", "Pick the order Nextcloud groups appear when LaunchPad routes users to a workspace.": "Kies de volgorde waarin Nextcloud-groepen verschijnen wanneer LaunchPad gebruikers naar een werkruimte stuurt.", - "Demo data": "Demo-data", + "Demo data": "Demogegevens", "The demo data showcases will appear here once the demo-data-showcases capability ships. For now this step is informational only.": "De demo-showcases verschijnen hier zodra de demo-data-showcases-capability beschikbaar is. Deze stap is voorlopig alleen ter informatie.", "Skip this step for now — demo packages can be installed later from the admin section.": "Sla deze stap voor nu over — demo-pakketten kunnen later vanuit het beheerdergedeelte worden geïnstalleerd.", "Admin roles": "Beheerdersrollen", @@ -935,11 +935,11 @@ "Delete role permission for group \"{group}\"?": "Rolrecht voor groep \"{group}\" verwijderen?", "Administration areas": "Beheergebieden", "Templates": "Sjablonen", - "Operations": "Beheer", + "Operations": "Bediening", "Roles & Permissions": "Rollen en rechten", - "Versioning & Audit": "Versiebeheer en audit", + "Versioning & Audit": "Versies en analyse", "Sharing": "Delen", - "Org navigation": "Organisatienavigatie", + "Org navigation": "Organisatiemenu", "Widgets with visibility rules": "Widgets met zichtbaarheidsregels", "Every widget placement that has at least one conditional visibility rule, across all dashboards.": "Elke widgetplaatsing met ten minste één voorwaardelijke zichtbaarheidsregel, op alle dashboards.", "No visibility rules yet": "Nog geen zichtbaarheidsregels", diff --git a/src/components/admin/AdminSettings.vue b/src/components/admin/AdminSettings.vue index ed25f08d8..3039a31ac 100644 --- a/src/components/admin/AdminSettings.vue +++ b/src/components/admin/AdminSettings.vue @@ -11,232 +11,250 @@ t('launchpad', 'Configure dashboard permissions and defaults') " docUrl="https://launchpad.conduction.nl/docs/intro"> - -
-
- {{ t('launchpad', 'Run setup wizard') }} -

- {{ - t( - 'launchpad', - 'Get your intranet started: configure groups, install demo data, and set up admin roles.', - ) - }} -

-
- - {{ t('launchpad', 'Run setup wizard') }} - -
-
- - {{ t('launchpad', 'Run setup wizard again') }} - -
- - -
-

{{ t('launchpad', 'Default settings') }}

- -
- -
- - - {{ t('launchpad', 'Allow users to create custom dashboards') }} - -

- {{ - t( - 'launchpad', - 'Disabling this only blocks creating new personal dashboards. Existing personal dashboards remain visible and editable.', - ) - }} -

- - - {{ t('launchpad', 'Allow users to have multiple dashboards') }} - - - - - {{ t('launchpad', 'Start page without navigation panel') }} - -

- {{ - t( - 'launchpad', - 'When on, the dashboard view has no left navigation panel and uses the full width. The dashboard switcher and the Documentation, Store, Reports, Features & roadmap and settings destinations are in the Menu button in the top row. Other pages keep the panel.', - ) - }} -

- -
- -
- - -
- -

- {{ - t( - 'launchpad', - '0 = unlimited. Lowering a limit never deletes existing dashboards; it only blocks new ones until users are back under the limit.', - ) - }} -

-
- -
- -

- {{ - t( - 'launchpad', - '0 = unlimited. Counts placements on a single dashboard. Admin template rollout and compulsory widgets are exempt.', - ) - }} -

-
-
- - -
-
-

{{ t('launchpad', 'Group-shared dashboards') }}

-
- -

- {{ - t( - 'launchpad', - 'Promote a single dashboard per group as the default. Members of the group will land on it when they have no personal preference yet.', - ) - }} -

- -
- {{ t('launchpad', 'Loading group dashboards…') }} -
- -
-

- {{ groupId }} -

-
- {{ - t( - 'launchpad', - 'No group-shared dashboards in this group yet.', - ) - }} + + + + @@ -274,18 +292,6 @@ - -
-

{{ t('launchpad', 'Setting as default app') }}

-

- {{ - t( - 'launchpad', - 'To make LaunchPad the default app for users, go to Settings > Administration > Theming and select LaunchPad as the default app.', - ) - }} -

-
@@ -397,7 +403,7 @@ export default { // Setup wizard banner state (REQ-WIZ-001). wizardState: null, showWizard: false, - activeTab: 'templates', + activeTab: 'general', } }, @@ -411,6 +417,7 @@ export default { */ beheerTabs() { return [ + { slug: 'general', label: this.t('launchpad', 'General') }, { slug: 'templates', label: this.t('launchpad', 'Templates') }, { slug: 'operations', label: this.t('launchpad', 'Operations') }, { @@ -688,13 +695,29 @@ export default { diff --git a/src/components/admin/__tests__/AdminSettings.tabs.spec.js b/src/components/admin/__tests__/AdminSettings.tabs.spec.js index 149595b95..96968d210 100644 --- a/src/components/admin/__tests__/AdminSettings.tabs.spec.js +++ b/src/components/admin/__tests__/AdminSettings.tabs.spec.js @@ -12,12 +12,22 @@ import { join } from 'path' import { describe, expect, it, vi } from 'vitest' import AdminSettings from '../AdminSettings.vue' -vi.mock('@nextcloud/router', () => ({ +vi.mock('@nextcloud/router', async (importOriginal) => ({ + ...(await importOriginal()), generateUrl: (path) => `/index.php${path}`, })) -const t = (_app, text, vars = {}) => - text.replace(/{(\w+)}/g, (_match, key) => vars[key] ?? `{${key}}`) +/** + * A stand-in for `t()` that fills `{placeholders}`. + * + * @param {string} _app the app id (unused) + * @param {string} text the English source string + * @param {object} vars the placeholder values + * @return {string} the filled string + */ +function t(_app, text, vars = {}) { + return text.replace(/{(\w+)}/g, (_match, key) => vars[key] ?? `{${key}}`) +} /** * Build a `this` for the computed properties, on one active tab.