@marianmeres/stuic 3.94.1 → 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,23 +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;
299
- }
300
-
301
296
  if (extraItems?.length) {
302
297
  out.push(...extraItems);
303
- renderedAny = true;
298
+ hasUserActions = true;
304
299
  }
305
300
 
306
- if (renderedAny && actions.onLogout) {
307
- out.push({ type: "divider", id: "div-logout" });
301
+ let hasColorScheme = false;
302
+ if (csEnabled) {
303
+ out.push(buildColorSchemeItem());
304
+ hasColorScheme = true;
308
305
  }
309
306
 
310
307
  if (actions.onLogout) {
308
+ if (hasUserActions || hasColorScheme) {
309
+ out.push({ type: "divider", id: "div-logout" });
310
+ }
311
311
  out.push({
312
312
  type: "action",
313
313
  id: "logout",
@@ -341,8 +341,13 @@
341
341
  onSelect: actions.onRegister,
342
342
  });
343
343
  }
344
- if (csEnabled) out.push(buildColorSchemeItem());
345
- if (extraItems?.length) out.push(...extraItems);
344
+ if (extraItems?.length) {
345
+ out.push(...extraItems);
346
+ }
347
+
348
+ if (csEnabled) {
349
+ out.push(buildColorSchemeItem());
350
+ }
346
351
  }
347
352
 
348
353
  return out;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@marianmeres/stuic",
3
- "version": "3.94.1",
3
+ "version": "3.94.2",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && pnpm run prepack",