Skip to content
This repository was archived by the owner on Apr 23, 2025. It is now read-only.

Commit 09db5c3

Browse files
committed
add placeholder for addresses
1 parent 8144cfe commit 09db5c3

File tree

2 files changed

+35
-1
lines changed

2 files changed

+35
-1
lines changed
Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,29 @@
1-
/* stylelint-disable no-empty-source */
1+
.commerce-addresses.placeholder.block::before {
2+
content: "Addresses";
3+
position: absolute;
4+
font-size: 20px;
5+
font-weight: bold;
6+
color: rgb(0 0 0 / 20%);
7+
z-index: -1;
8+
}
9+
10+
.commerce-addresses.placeholder.block {
11+
display: flex;
12+
border: dashed 3px lightgrey;
13+
padding: 10px;
14+
}
15+
16+
.commerce-addresses.placeholder.block > div {
17+
flex-grow: 1;
18+
padding: 10px;
19+
display:flex;
20+
justify-content: center;
21+
}
22+
23+
.commerce-addresses.placeholder.block > div > div {
24+
padding: 10px;
25+
}
26+
27+
.commerce-addresses.placeholder.block > div > div:first-child {
28+
font-weight: bold;
29+
}

blocks/commerce-addresses/commerce-addresses.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ import { CUSTOMER_ADDRESS_PATH, CUSTOMER_LOGIN_PATH } from '../../scripts/consta
1010
import '../../scripts/initializers/account.js';
1111

1212
export default async function decorate(block) {
13+
// Xwalk: if in AEM author and not authenticated show placeholder instead
14+
if (window.xwalk.isAuthorEnv && !checkIsAuthenticated()) {
15+
block.classList.add('placeholder');
16+
return;
17+
}
18+
1319
const {
1420
'minified-view': minifiedViewConfig = 'false',
1521
} = readBlockConfig(block);

0 commit comments

Comments
 (0)