This repository was archived by the owner on Apr 23, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +35
-1
lines changed
blocks/commerce-customer-information Expand file tree Collapse file tree 2 files changed +35
-1
lines changed Original file line number Diff line number Diff line change 1- /* stylelint-disable no-empty-source */
1+ .commerce-customer-information .placeholder .block ::before {
2+ content : "Customer Information" ;
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-customer-information .placeholder .block {
11+ display : flex;
12+ border : dashed 3px lightgrey;
13+ padding : 10px ;
14+ }
15+
16+ .commerce-customer-information .placeholder .block > div {
17+ flex-grow : 1 ;
18+ padding : 10px ;
19+ display : flex;
20+ justify-content : center;
21+ }
22+
23+ .commerce-customer-information .placeholder .block > div > div {
24+ padding : 10px ;
25+ }
26+
27+ .commerce-customer-information .placeholder .block > div > div : first-child {
28+ font-weight : bold;
29+ }
Original file line number Diff line number Diff line change @@ -9,6 +9,12 @@ import { CUSTOMER_LOGIN_PATH } from '../../scripts/constants.js';
99import '../../scripts/initializers/account.js' ;
1010
1111export default async function decorate ( block ) {
12+ // Xwalk: if in AEM author and not authenticated show placeholder instead
13+ if ( window . xwalk . isAuthorEnv && ! checkIsAuthenticated ( ) ) {
14+ block . classList . add ( 'placeholder' ) ;
15+ return ;
16+ }
17+
1218 if ( ! checkIsAuthenticated ( ) ) {
1319 window . location . href = CUSTOMER_LOGIN_PATH ;
1420 } else {
You can’t perform that action at this time.
0 commit comments