@7365admin1/layer-common 4.97.1-staging.736 → 4.97.1-staging.737

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.
@@ -21,19 +21,6 @@
21
21
  >
22
22
  <v-app-bar-nav-icon v-if="!props.hideNavIcon" @click="drawer = !drawer"></v-app-bar-nav-icon>
23
23
 
24
- <!-- Account application only: back to the services app page that opened
25
- Manage Account (DV-1874). Shown only when that page was passed in and
26
- is one of ours - see `utils/account-return.ts`. -->
27
- <v-btn
28
- v-if="accountReturn"
29
- :href="accountReturn"
30
- variant="text"
31
- prepend-icon="mdi-arrow-left"
32
- class="text-none me-2"
33
- >
34
- Back
35
- </v-btn>
36
-
37
24
  <div ref="crumbEl" class="app-topbar-shell__crumb">
38
25
  <span v-if="siteName" class="app-topbar-shell__site">{{ siteName }}</span>
39
26
  <span v-if="siteName && moduleName" class="app-topbar-shell__sep">/</span>
@@ -144,7 +131,11 @@
144
131
  // Explicit, not the `$tr` global: renders the same in unit tests that mount this file.
145
132
  import { uiTr } from "../../composables/useUiLanguage";
146
133
  import { moduleNameFromRoute } from "../../utils/breadcrumb";
147
- import { ACCOUNT_RETURN_KEY, safeAccountReturn } from "../../utils/account-return";
134
+ import {
135
+ ACCOUNT_RETURN_KEY,
136
+ ACCOUNT_RETURN_STATE,
137
+ safeAccountReturn,
138
+ } from "../../utils/account-return";
148
139
 
149
140
  const props = defineProps({
150
141
  hideNavIcon: {
@@ -278,8 +269,12 @@ function openAccount() {
278
269
  * session so it survives moving between the Personal Info screens, which drop
279
270
  * the query. Read in `onMounted` - the bar is pre-rendered on the server,
280
271
  * where there is no `window` or `sessionStorage`.
272
+ *
273
+ * The bar only WORKS IT OUT; the Account app's Personal Info page draws the
274
+ * Back button above its "Profile Info" title (owner's placement, DV-1874),
275
+ * reading this shared state.
281
276
  */
282
- const accountReturn = ref("");
277
+ const accountReturn = useState<string>(ACCOUNT_RETURN_STATE, () => "");
283
278
 
284
279
  onMounted(() => {
285
280
  if (APP_NAME.toLowerCase() !== "account") return;
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.97.1-staging.736",
5
+ "version": "4.97.1-staging.737",
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.",
@@ -49,3 +49,10 @@ export function safeAccountReturn(candidate: unknown, accountUrl: string): strin
49
49
 
50
50
  /** Where the Account header keeps the Back target while the user moves around it. */
51
51
  export const ACCOUNT_RETURN_KEY = "account-return-to";
52
+
53
+ /**
54
+ * The `useState` key the header fills with the checked Back target, for the
55
+ * Account app's Personal Info page to draw its Back button from. Empty when
56
+ * there is nowhere safe to go back to.
57
+ */
58
+ export const ACCOUNT_RETURN_STATE = "account-return";