@mundogamernetwork/shared-ui 1.16.9 → 1.16.11

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.
@@ -12,6 +12,16 @@ const authStore = useAuthStore();
12
12
  const { user, signedIn, showOnline } = storeToRefs(authStore);
13
13
  const { performLogout } = useLogout();
14
14
 
15
+ // Each stat renders independently — a host that only has a "following"
16
+ // concept (e.g. jobs-frontend's "companies followed", with no reverse
17
+ // "who follows me" on a job board) still gets its one number shown,
18
+ // instead of being gated behind the pair like before. When a host has
19
+ // neither, hasStats is false and the row is repurposed below instead of
20
+ // sitting half-empty next to the avatar.
21
+ const hasFollowingCount = computed(() => user.value?.following_count !== undefined);
22
+ const hasFollowersCount = computed(() => user.value?.followers_count !== undefined);
23
+ const hasStats = computed(() => hasFollowingCount.value || hasFollowersCount.value);
24
+
15
25
  const runtimeConfig = useRuntimeConfig();
16
26
  const accountsBaseUrl = runtimeConfig.public.mgSharedUi?.accountsBaseUrl || runtimeConfig.public.accountsBaseUrl;
17
27
  const supportUrl = `${accountsBaseUrl}/account/support/new`;
@@ -115,19 +125,30 @@ const handleToggleOnline = () => {
115
125
  <img v-else :src="user.avatar_url" width="40" height="40" class="avatar-img" />
116
126
  </div>
117
127
 
118
- <div v-if="user?.followers_count !== undefined" class="col p-0 d-flex align-items-center stats">
119
- <div class="col-6 p-0">
128
+ <div v-if="hasStats" class="col p-0 d-flex align-items-center stats">
129
+ <div v-if="hasFollowingCount" class="col-6 p-0">
120
130
  <span class="stat-value">{{ user?.following_count ?? 0 }}</span>
121
131
  <span class="stat-label">{{ $t("account_menu.following") }}</span>
122
132
  </div>
123
- <div class="col-6 p-0">
133
+ <div v-if="hasFollowersCount" class="col-6 p-0">
124
134
  <span class="stat-value">{{ user?.followers_count ?? 0 }}</span>
125
135
  <span class="stat-label">{{ $t("account_menu.followers") }}</span>
126
136
  </div>
127
137
  </div>
138
+
139
+ <!--
140
+ No following/followers concept on this host (e.g.
141
+ agency, token, club — nothing plausible found for
142
+ either count) — rather than leave this space reserved
143
+ and blank next to the avatar, show the username here
144
+ instead of in its own row below.
145
+ -->
146
+ <div v-else class="col p-0 d-flex align-items-center">
147
+ <span class="username username--inline">{{ user?.nickname || user?.name }}</span>
148
+ </div>
128
149
  </div>
129
150
 
130
- <div class="row info-row">
151
+ <div v-if="hasStats" class="row info-row">
131
152
  <div class="col p-0 d-flex flex-column">
132
153
  <span class="username">{{ user?.nickname || user?.name }}</span>
133
154
  </div>
@@ -154,6 +175,16 @@ const handleToggleOnline = () => {
154
175
  <MgXpLevelBar compact :mgc-balance="user?.coins ?? null" :show-balance="false" :locale="locale" />
155
176
  </div>
156
177
 
178
+ <!--
179
+ Optional, empty by default. For a host whose primary CTA (jobs-
180
+ frontend's "Post a job") and its related stat (companies followed)
181
+ got buried under Manage Account/Support/Show-online — reads as an
182
+ afterthought instead of the main reason someone opens this menu.
183
+ Sits right after the identity/stats block, above the account-
184
+ management rows below, so it's the first thing seen.
185
+ -->
186
+ <slot name="quick-actions" />
187
+
157
188
  <div v-if="pricingUrl" class="row info-row">
158
189
  <a :href="pricingUrl" class="plans-pricing-link">
159
190
  {{ $t("account_menu.buttons.plans_pricing", "Plans & Pricing") }}
@@ -221,6 +252,35 @@ const handleToggleOnline = () => {
221
252
  max-height: calc(100vh - 65px);
222
253
  overflow-y: auto;
223
254
  transition: all ease 0.5s;
255
+ // The scrollbar itself only exists so tall content (hosts with a lot of
256
+ // extra-menu-items) never goes unreachably off-screen — it shouldn't
257
+ // look like a leftover browser default. Thin and only tinted on hover,
258
+ // same idea as a native macOS overlay scrollbar. Firefox/most browsers
259
+ // respect scrollbar-width; the ::-webkit- rules cover Chrome/Safari.
260
+ scrollbar-width: thin;
261
+ scrollbar-color: transparent transparent;
262
+
263
+ &:hover {
264
+ scrollbar-color: var(--header-ui-config-border) transparent;
265
+ }
266
+
267
+ &::-webkit-scrollbar {
268
+ width: 6px;
269
+ }
270
+
271
+ &::-webkit-scrollbar-track {
272
+ background: transparent;
273
+ }
274
+
275
+ &::-webkit-scrollbar-thumb {
276
+ // No border-radius — MGN is angular by brand decision, no rounded
277
+ // corners anywhere (see the .signed-in-menu comment below).
278
+ background: transparent;
279
+ }
280
+
281
+ &:hover::-webkit-scrollbar-thumb {
282
+ background: var(--header-ui-config-border);
283
+ }
224
284
 
225
285
  // Derived from the actual rendered content (:has), not the .signed-in
226
286
  // class this element also carries. That class is a reactive :class
@@ -286,6 +346,14 @@ const handleToggleOnline = () => {
286
346
  font-weight: 400;
287
347
  font-size: 0.875rem;
288
348
  color: var(--active);
349
+
350
+ // Sits beside the avatar instead of its own row below (no
351
+ // following/followers stats to fill that space) — no top
352
+ // margin needed, it's vertically centered by the flex row
353
+ // it's already in.
354
+ &--inline {
355
+ margin-top: 0;
356
+ }
289
357
  }
290
358
 
291
359
  .stats {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mundogamernetwork/shared-ui",
3
- "version": "1.16.9",
3
+ "version": "1.16.11",
4
4
  "description": "Mundo Gamer Network - Shared UI Layer (Nuxt 3)",
5
5
  "type": "module",
6
6
  "main": "./nuxt.config.ts",