@marianmeres/stuic 3.94.0 → 3.94.2

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.
@@ -274,7 +274,7 @@
274
274
  });
275
275
  }
276
276
 
277
- let renderedAny = false;
277
+ let hasUserActions = false;
278
278
  if (actions.onProfile) {
279
279
  out.push({
280
280
  type: "action",
@@ -282,7 +282,7 @@
282
282
  label: L.viewProfile,
283
283
  onSelect: actions.onProfile,
284
284
  });
285
- renderedAny = true;
285
+ hasUserActions = true;
286
286
  }
287
287
  if (actions.onSettings) {
288
288
  out.push({
@@ -291,18 +291,23 @@
291
291
  label: L.settings,
292
292
  onSelect: actions.onSettings,
293
293
  });
294
- renderedAny = true;
294
+ hasUserActions = true;
295
295
  }
296
- if (csEnabled) {
297
- out.push(buildColorSchemeItem());
298
- renderedAny = true;
296
+ if (extraItems?.length) {
297
+ out.push(...extraItems);
298
+ hasUserActions = true;
299
299
  }
300
300
 
301
- if (renderedAny && actions.onLogout) {
302
- out.push({ type: "divider", id: "div-logout" });
301
+ let hasColorScheme = false;
302
+ if (csEnabled) {
303
+ out.push(buildColorSchemeItem());
304
+ hasColorScheme = true;
303
305
  }
304
306
 
305
307
  if (actions.onLogout) {
308
+ if (hasUserActions || hasColorScheme) {
309
+ out.push({ type: "divider", id: "div-logout" });
310
+ }
306
311
  out.push({
307
312
  type: "action",
308
313
  id: "logout",
@@ -336,10 +341,15 @@
336
341
  onSelect: actions.onRegister,
337
342
  });
338
343
  }
339
- if (csEnabled) out.push(buildColorSchemeItem());
344
+ if (extraItems?.length) {
345
+ out.push(...extraItems);
346
+ }
347
+
348
+ if (csEnabled) {
349
+ out.push(buildColorSchemeItem());
350
+ }
340
351
  }
341
352
 
342
- if (extraItems?.length) out.push(...extraItems);
343
353
  return out;
344
354
  });
345
355
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "3.94.0",
3
+ "version": "3.94.2",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && pnpm run prepack",