domma-cms 1.6.5 → 1.6.6

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/README.md CHANGED
@@ -264,7 +264,7 @@ Permissions per resource are defined in `config/auth.json`.
264
264
 
265
265
  The sidebar groups content by role:
266
266
 
267
- - **Overview** - Dashboard
267
+ - **Dashboards** - Dashboard
268
268
  - **Structure** - Navigation, Layouts *(admin and manager only)*
269
269
  - **Content** - Pages, Media
270
270
  - **Configuration** - Users, Site Settings *(admin and manager only)*
@@ -5,7 +5,7 @@
5
5
  "variant": "transparent",
6
6
  "items": [
7
7
  {
8
- "text": "Overview",
8
+ "text": "Dashboards",
9
9
  "url": "",
10
10
  "icon": "home",
11
11
  "items": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "domma-cms",
3
- "version": "1.6.5",
3
+ "version": "1.6.6",
4
4
  "description": "File-based CMS powered by Domma and Fastify. Run npx domma-cms my-site to create a new project.",
5
5
  "type": "module",
6
6
  "main": "server/server.js",
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Runs once on server boot. Idempotent - guarded by the existence of
5
5
  * config/menus/admin-sidebar.json. Seeds the admin sidebar menu with the
6
- * standard tree (Overview, Projects, Content, Data, Tools, System,
6
+ * standard tree (Dashboards, Projects, Content, Data, Tools, System,
7
7
  * Documentation) and patches config/menu-locations.json to map the
8
8
  * `admin-sidebar` slot.
9
9
  *
@@ -21,7 +21,7 @@ const DEFAULT_CONFIG_DIR = path.resolve(path.dirname(__filename), '..', '..', 'c
21
21
 
22
22
  const SEED_ITEMS = [
23
23
  {
24
- text: 'Overview', key: 'overview', icon: 'home',
24
+ text: 'Dashboards', key: 'overview', icon: 'home',
25
25
  items: [
26
26
  {text: 'Dashboard', url: '#/', icon: 'home'}
27
27
  ]
@@ -319,13 +319,14 @@ export async function ensureDocumentationSubmenus(opts = {}) {
319
319
 
320
320
  /** Keys for the folders the seed has always created, matched by their original name. */
321
321
  const SEED_FOLDER_KEYS = {
322
- overview: 'overview', projects: 'projects', content: 'content', data: 'data',
322
+ overview: 'overview', dashboards: 'overview', projects: 'projects', content: 'content', data: 'data',
323
323
  tools: 'tools', system: 'system', documentation: 'documentation'
324
324
  };
325
325
 
326
326
  /**
327
327
  * Give an existing install's top-level folders their stable `key`, and - once -
328
- * a persisted Tools folder for enabled Tools to be placed into.
328
+ * a persisted Tools folder for enabled Tools to be placed into, and - once -
329
+ * the name Dashboards for the folder that was Overview.
329
330
  *
330
331
  * - A folder is keyed only if it has no key yet and still carries one of the
331
332
  * seed's names; a folder the admin made, or renamed before keys existed, is
@@ -361,6 +362,16 @@ export async function ensureFolderKeys(opts = {}) {
361
362
  changed = true;
362
363
  }
363
364
 
365
+ // The first folder was "Overview" until 1.6.6. Renamed once (`meta.dashboardsFolder`)
366
+ // and only while it still says Overview, so a name an admin gave it - even
367
+ // Overview again, later - stays. Its key is still `overview`.
368
+ if (!menu.meta?.dashboardsFolder && items.length) {
369
+ const first = items.find(n => isFolder(n) && n.key === 'overview');
370
+ if (first && String(first.text || '').trim() === 'Overview') first.text = 'Dashboards';
371
+ menu.meta = {...(menu.meta || {}), dashboardsFolder: true};
372
+ changed = true;
373
+ }
374
+
364
375
  // An empty menu is left empty: the renderer's minimal fallback (Dashboard,
365
376
  // Menus) is what an admin needs to repair it, and a lone Tools folder would
366
377
  // stop that fallback from applying.