@7365admin1/layer-common 4.155.0 → 4.155.1
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/CHANGELOG.md +10 -4
- package/components/Layout/Header.vue +43 -16
- package/components/SwitchContext.vue +31 -15
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @iservice365/layer-common
|
|
2
2
|
|
|
3
|
+
## 4.155.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 9d1c583: Top bar, site switcher and profile menu show the full site and organisation name: long names wrap (the bar grows to fit) instead of being cut with an ellipsis.
|
|
8
|
+
|
|
3
9
|
## 4.155.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
|
@@ -3614,11 +3620,11 @@ Monthly report: a month that had patrols opens the list of that month's patrol r
|
|
|
3614
3620
|
`utils/console-tier.ts` + `composables/useConsoleTier.ts` mirror the server's
|
|
3615
3621
|
own rule from two endpoints the console already calls, unprojected:
|
|
3616
3622
|
|
|
3617
|
-
|
|
3618
|
-
|
|
3623
|
+
GET /api/members/user/:user/app/admin the Seven365 staff membership
|
|
3624
|
+
GET /api/roles/id/:role that membership's role document
|
|
3619
3625
|
|
|
3620
|
-
|
|
3621
|
-
|
|
3626
|
+
owner = member.type === "admin" && role.type === "admin" && role.default === true
|
|
3627
|
+
staff = member.type === "admin" && role.type === "admin"
|
|
3622
3628
|
|
|
3623
3629
|
`role.default` is the marker because it is the only property of a platform
|
|
3624
3630
|
staff role no API caller can set - `role.controller.ts` validates create and
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
<!-- Seven365 staff view: persistent banner with Exit (only while one is open). -->
|
|
14
14
|
<StaffViewBanner />
|
|
15
15
|
<v-app-bar
|
|
16
|
-
:height="
|
|
16
|
+
:height="barHeight"
|
|
17
17
|
flat
|
|
18
18
|
scroll-behavior="elevate"
|
|
19
19
|
scroll-threshold="200"
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
>
|
|
22
22
|
<v-app-bar-nav-icon v-if="!props.hideNavIcon" @click="drawer = !drawer"></v-app-bar-nav-icon>
|
|
23
23
|
|
|
24
|
-
<div class="app-topbar-shell__crumb">
|
|
24
|
+
<div ref="crumbEl" class="app-topbar-shell__crumb">
|
|
25
25
|
<span v-if="siteName" class="app-topbar-shell__site">{{ siteName }}</span>
|
|
26
26
|
<span v-if="siteName && moduleName" class="app-topbar-shell__sep">/</span>
|
|
27
27
|
<span class="app-topbar-shell__module">{{ moduleName }}</span>
|
|
@@ -170,6 +170,25 @@ const siteName = computed(() =>
|
|
|
170
170
|
|
|
171
171
|
const route = useRoute();
|
|
172
172
|
|
|
173
|
+
/**
|
|
174
|
+
* The bar is the design's 58px, and grows when a long site name wraps onto
|
|
175
|
+
* more lines than fit - so the full name is always visible, never clipped.
|
|
176
|
+
*/
|
|
177
|
+
const crumbEl = ref<HTMLElement | null>(null);
|
|
178
|
+
const crumbHeight = ref(0);
|
|
179
|
+
const barHeight = computed(() => Math.max(58, crumbHeight.value));
|
|
180
|
+
let crumbObserver: ResizeObserver | null = null;
|
|
181
|
+
|
|
182
|
+
onMounted(() => {
|
|
183
|
+
if (!crumbEl.value || typeof ResizeObserver === "undefined") return;
|
|
184
|
+
crumbObserver = new ResizeObserver(() => {
|
|
185
|
+
crumbHeight.value = crumbEl.value?.offsetHeight ?? 0;
|
|
186
|
+
});
|
|
187
|
+
crumbObserver.observe(crumbEl.value);
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
onBeforeUnmount(() => crumbObserver?.disconnect());
|
|
191
|
+
|
|
173
192
|
/**
|
|
174
193
|
* The page's name comes off the route name, which the applications build from
|
|
175
194
|
* their own folder structure: `org-site-work-orders` is Work Orders. The rule
|
|
@@ -238,26 +257,38 @@ const { getNameInitials } = useUtils();
|
|
|
238
257
|
flex: 1 1 auto;
|
|
239
258
|
min-width: 0;
|
|
240
259
|
display: flex;
|
|
260
|
+
flex-wrap: wrap;
|
|
241
261
|
align-items: center;
|
|
242
|
-
gap: 6px;
|
|
262
|
+
column-gap: 6px;
|
|
263
|
+
padding-block: 6px;
|
|
243
264
|
font-size: var(--fs-breadcrumb);
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
white-space:
|
|
265
|
+
line-height: 1.25;
|
|
266
|
+
/* Owner 2026-10-30: the site name is shown IN FULL - it wraps, the bar grows
|
|
267
|
+
to fit (see `barHeight`), and it is never cut with an ellipsis. */
|
|
268
|
+
white-space: normal;
|
|
248
269
|
}
|
|
249
270
|
|
|
250
271
|
.app-topbar-shell__site,
|
|
251
272
|
.app-topbar-shell__sep {
|
|
252
273
|
color: var(--muted);
|
|
253
|
-
|
|
254
|
-
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.app-topbar-shell__site {
|
|
277
|
+
/* Word boundaries first; only a single unbroken word wider than the bar is
|
|
278
|
+
split, so nothing is ever hidden. */
|
|
279
|
+
overflow-wrap: break-word;
|
|
255
280
|
}
|
|
256
281
|
|
|
257
282
|
.app-topbar-shell__module {
|
|
258
283
|
color: var(--text);
|
|
259
284
|
font-weight: 700;
|
|
260
|
-
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
/* Phones: a little smaller, so a long name takes fewer lines. */
|
|
288
|
+
@media (max-width: 599px) {
|
|
289
|
+
.app-topbar-shell__crumb {
|
|
290
|
+
font-size: 12px;
|
|
291
|
+
}
|
|
261
292
|
}
|
|
262
293
|
|
|
263
294
|
/**
|
|
@@ -311,9 +342,7 @@ const { getNameInitials } = useUtils();
|
|
|
311
342
|
font-weight: 800;
|
|
312
343
|
line-height: 1.3;
|
|
313
344
|
color: var(--text);
|
|
314
|
-
overflow:
|
|
315
|
-
white-space: nowrap;
|
|
316
|
-
text-overflow: ellipsis;
|
|
345
|
+
overflow-wrap: break-word;
|
|
317
346
|
}
|
|
318
347
|
|
|
319
348
|
.app-profile-menu__site {
|
|
@@ -321,9 +350,7 @@ const { getNameInitials } = useUtils();
|
|
|
321
350
|
font-weight: 600;
|
|
322
351
|
line-height: 1.3;
|
|
323
352
|
color: var(--muted);
|
|
324
|
-
overflow:
|
|
325
|
-
white-space: nowrap;
|
|
326
|
-
text-overflow: ellipsis;
|
|
353
|
+
overflow-wrap: break-word;
|
|
327
354
|
}
|
|
328
355
|
|
|
329
356
|
.app-profile-menu__rows {
|
|
@@ -15,10 +15,9 @@
|
|
|
15
15
|
:to="props.route"
|
|
16
16
|
class="switch-context__activator"
|
|
17
17
|
>
|
|
18
|
-
<!--
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
ellipsis; the title attribute keeps the full name on hover. -->
|
|
18
|
+
<!-- Owner 2026-10-30: the organisation and site names are shown IN
|
|
19
|
+
FULL - wrapped at word boundaries onto as many lines as they
|
|
20
|
+
need, never cut with an ellipsis. -->
|
|
22
21
|
<v-list-item-title
|
|
23
22
|
class="switch-context__name"
|
|
24
23
|
:title="name || `Select ${prop.title}`"
|
|
@@ -339,18 +338,35 @@ const selectItem = (value: string) => {
|
|
|
339
338
|
background: var(--hover);
|
|
340
339
|
}
|
|
341
340
|
|
|
342
|
-
/*
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
-
|
|
349
|
-
-webkit-box-orient: vertical;
|
|
350
|
-
overflow: hidden;
|
|
341
|
+
/* Owner 2026-10-30: the full organisation/site name, wrapped at word
|
|
342
|
+
boundaries onto as many lines as it needs - never clamped or cut. Only a
|
|
343
|
+
single word wider than the rail is split. The selector carries the Vuetify
|
|
344
|
+
class so it beats `.v-list-item-title`'s nowrap + ellipsis. */
|
|
345
|
+
.v-list-item-title.switch-context__name {
|
|
346
|
+
/* A touch under the rail's 14px, so a long name takes fewer lines. */
|
|
347
|
+
font-size: 13px;
|
|
351
348
|
white-space: normal;
|
|
352
|
-
overflow
|
|
353
|
-
|
|
349
|
+
overflow: visible;
|
|
350
|
+
text-overflow: clip;
|
|
351
|
+
overflow-wrap: break-word;
|
|
354
352
|
line-height: 1.25;
|
|
355
353
|
}
|
|
354
|
+
|
|
355
|
+
/* The dropdown rows: same rule, the whole name on every row. */
|
|
356
|
+
.switch-context__row {
|
|
357
|
+
white-space: normal;
|
|
358
|
+
overflow-wrap: break-word;
|
|
359
|
+
line-height: 1.3;
|
|
360
|
+
}
|
|
361
|
+
|
|
362
|
+
/* The icon's gap is the rail rows' 10px, not Vuetify's 32px, so a long name
|
|
363
|
+
gets the width and takes fewer lines. */
|
|
364
|
+
.switch-context__activator :deep(.v-list-item__prepend > .v-icon ~ .v-list-item__spacer) {
|
|
365
|
+
width: 10px;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.switch-context__activator :deep(.v-list-item__content),
|
|
369
|
+
.switch-context__row :deep(.v-list-item__content) {
|
|
370
|
+
overflow: visible;
|
|
371
|
+
}
|
|
356
372
|
</style>
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@7365admin1/layer-common",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"version": "4.155.
|
|
5
|
+
"version": "4.155.1",
|
|
6
6
|
"author": "7365admin1",
|
|
7
7
|
"main": "./nuxt.config.ts",
|
|
8
8
|
"//files": "What a consumer extending this layer actually loads. Without this npm ships the whole working tree - the changesets, the CI workflows, the render harness in tools/ and any scratch directory that happened to exist at publish time. Nuxt resolves a layer by directory, so every runtime directory below has to stay listed; adding a new top-level runtime directory means adding it here too.",
|