File tree Expand file tree Collapse file tree 5 files changed +30
-5
lines changed
modules/ps_customersignin Expand file tree Collapse file tree 5 files changed +30
-5
lines changed Original file line number Diff line number Diff line change 11name : hummingbird
22display_name : Hummingbird
3- version : 0.1.0
3+ version : 0.1.3
44author :
55 name : " PrestaShop Team"
66 email : " pub@prestashop.com"
Original file line number Diff line number Diff line change 77 <div class =" user-info" >
88 { if $customer .is_logged}
99 <div class =" dropdown header-block" >
10- <button
10+ <a
11+ href =" #"
1112 class =" dropdown-toggle header-block__action-btn"
12- type =" button"
13+ role =" button"
1314 id =" userMenuButton"
1415 data-bs-toggle =" dropdown"
1516 aria-haspopup =" true"
1617 aria-expanded =" false" >
1718 <i class =" material-icons header-block__icon" > ; </i >
18- <span class =" header-block__title" >{ $customerName |truncate :22:" .." :true } </span >
19- </button >
19+ <span class =" header-block__title d-lg-inline d-none " >{ $customerName |truncate :22:" .." :true } </span >
20+ </a >
2021
2122 <div class =" dropdown-menu dropdown-menu-start" aria-labelledby =" userMenuButton" >
2223 <a class =" dropdown-item" href =" { $urls .pages.my_account} " >
Original file line number Diff line number Diff line change 1+ /**
2+ * For the full copyright and license information, please view the LICENSE
3+ * file that was distributed with this source code.
4+ */
5+
6+ import useToast from './components/useToast' ;
7+
8+ const initErrorHandler = ( ) => {
9+ const { Theme : { events} } = window ;
10+ const { prestashop} = window ;
11+
12+ prestashop . on ( events . handleError , ( { resp} : { resp : { errors : string [ ] } } ) => {
13+ resp . errors . forEach ( ( error ) => {
14+ useToast ( error , { type : 'danger' } ) . show ( ) ;
15+ } ) ;
16+ } ) ;
17+ } ;
18+
19+ export default initErrorHandler ;
Original file line number Diff line number Diff line change 33 * file that was distributed with this source code.
44 */
55
6+ import useQuantityInput from '@js/components/useQuantityInput' ;
7+
68// @TODO (NeOMakinG): Refactor this file, it comes from facetedsearch or classic
79export const parseSearchUrl = function ( event : { target : HTMLElement } ) {
810 if ( event . target . dataset . searchUrl !== undefined ) {
@@ -96,6 +98,7 @@ export default () => {
9698
9799 prestashop . on ( events . updateProductList , ( data : Record < string , never > ) => {
98100 updateProductListDOM ( data ) ;
101+ useQuantityInput ( ) ;
99102 window . scrollTo ( 0 , 0 ) ;
100103 } ) ;
101104} ;
Original file line number Diff line number Diff line change @@ -16,6 +16,7 @@ import initSearchbar from './modules/ps_searchbar';
1616import initLanguageSelector from './modules/ps_languageselector' ;
1717import initCurrencySelector from './modules/ps_currencyselector' ;
1818import initVisiblePassword from './visible-password' ;
19+ import initErrorHandler from './errors' ;
1920import useToast from './components/useToast' ;
2021import useAlert from './components/useAlert' ;
2122import usePasswordPolicy from './components/usePasswordPolicy' ;
@@ -51,6 +52,7 @@ $(() => {
5152 initVisiblePassword ( ) ;
5253 initDesktopMenu ( ) ;
5354 initFormValidation ( ) ;
55+ initErrorHandler ( ) ;
5456 usePasswordPolicy ( '.field-password-policy' ) ;
5557
5658 prestashop . on ( events . responsiveUpdate , ( ) => {
You can’t perform that action at this time.
0 commit comments