701var html = '';702703html += '<div class="tlk-userbar__popup">';704html += '<div class="tlk-userbar__popup-wrap">';705html += '<div class="tlk-userbar__popup-content">';706707if (window.tildaMembers.is_get_profile) {708var objProfile = tma__getProfileObjFromLS();709710html += tma__userbar__getWidgetPopupContentHtml(objProfile);711} else {712html += tma__userbar__getPreloaderHtml();
} html += '</div>'; html += '</div>'; html += '</div>'; return html;}/** * Шаблон списка страниц * * @param {object} props - данные списка страниц * @returns {string} - шаблон списка */function tma__userbar__getWidgetPopupContentHtml(props) { var html = ''; var name = props.name; if (!name && props.login && typeof tma__hideText === 'function') name = tma__hideText(props.login); html += '<div class="tlk-userbar__popup-login">'; html += '<div class="tlk-userbar__popup-wrap-name">'; html += '<a class="tlk-userbar__popup-name" href="/members/">'; html += tma__escapeHTML(name); html += `<svg xmlns="http://www.w3.org/2000/svg" width="7" height="7" viewBox="0 0 7 7" fill="none"> <path d="M6.49996 0C6.77609 2.0454e-05 6.99996 0.22387 6.99996 0.5V5.69629C6.99992 5.97238 6.77606 6.19627 6.49996 6.19629C6.22385 6.19629 6 5.9724 5.99996 5.69629V1.70703L0.853478 6.85352C0.658222 7.04877 0.34171 7.04876 0.146447 6.85352C-0.0488155 6.65825 -0.0488155 6.34175 0.146447 6.14648L5.29293 1H1.30367C1.02757 0.999958 0.803673 0.776116 0.803673 0.5C0.803673 0.223884 1.02757 4.21295e-05 1.30367 0H6.49996Z" fill="#8F8F8F"/> </svg>`; html += '</a>'; html += '<a class="tlk-userbar__popup-logout tlk-btn_reset" href="/members/login?exit=y" title="{{widget_userbar_btn_logout}}">'; html += '<svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">'; html += '<path fill-rule="evenodd" clip-rule="evenodd" d="M4.76206 1.66675C3.9731 1.66675 3.3335 2.25585 3.3335 2.98253V17.0176C3.3335 17.7442 3.9731 18.3334 4.76206 18.3334H15.2383C16.0272 18.3334 16.6668 17.7442 16.6668 17.0176V15.2632H15.7144V17.0176C15.7144 17.2599 15.5012 17.4562 15.2383 17.4562H4.76206C4.49908 17.4562 4.28588 17.2599 4.28588 17.0176V2.98253C4.28588 2.74031 4.49908 2.54395 4.76206 2.54395H15.2383C15.5012 2.54395 15.7144 2.74031 15.7144 2.98253V5.00008H16.6668V2.98253C16.6668 2.25585 16.0272 1.66675 15.2383 1.66675H4.76206ZM18.2115 9.68L15.5598 6.79933C15.3971 6.62255 15.1333 6.62255 14.9705 6.79933C14.8078 6.9761 14.8078 7.2627 14.9705 7.43948L16.9108 9.54743H10.0002V10.4527H16.9108L14.9705 12.5607C14.8078 12.7375 14.8078 13.0241 14.9705 13.2008C15.1333 13.3776 15.3971 13.3776 15.5598 13.2008L18.2115 10.3202C18.3742 10.1434 18.3742 9.85678 18.2115 9.68Z" fill="#8F8F8F"/>'; html += '<path d="M16.6667 15.2632H16.8334V15.0965H16.6667V15.2632ZM15.7144 15.2632V15.0965H15.5477V15.2632H15.7144ZM15.7144 5H15.5477V5.16667H15.7144V5ZM16.6667 5V5.16667H16.8334V5H16.6667ZM16.9107 9.54735V9.71402H17.2907L17.0334 9.43447L16.9107 9.54735ZM10.0001 9.54735V9.38068H9.83341V9.54735H10.0001ZM10.0001 10.4527H9.83341V10.6193H10.0001V10.4527ZM16.9107 10.4527L17.0334 10.5655L17.2907 10.286H16.9107V10.4527ZM3.50008 2.98245C3.50008 2.36045 4.05188 1.83333 4.76198 1.83333V1.5C3.89413 1.5 3.16675 2.15108 3.16675 2.98245H3.50008ZM3.50008 17.0175V2.98245H3.16675V17.0175H3.50008ZM4.76198 18.1667C4.05188 18.1667 3.50008 17.6395 3.50008 17.0175H3.16675C3.16675 17.849 3.89413 18.5 4.76198 18.5V18.1667ZM15.2382 18.1667H4.76198V18.5H15.2382V18.1667ZM16.5001 17.0175C16.5001 17.6395 15.9483 18.1667 15.2382 18.1667V18.5C16.106 18.5 16.8334 17.849 16.8334 17.0175H16.5001ZM16.5001 15.2632V17.0175H16.8334V15.2632H16.5001ZM15.7144 15.4298H16.6667V15.0965H15.7144V15.4298ZM15.881 17.0175V15.2632H15.5477V17.0175H15.881ZM15.2382 17.6228C15.58 17.6228 15.881 17.3645 15.881 17.0175H15.5477C15.5477 17.1552 15.4223 17.2895 15.2382 17.2895V17.6228ZM4.76198 17.6228H15.2382V17.2895H4.76198V17.6228ZM4.11913 17.0175C4.11913 17.3645 4.42011 17.6228 4.76198 17.6228V17.2895C4.57786 17.2895 4.45246 17.1552 4.45246 17.0175H4.11913ZM4.11913 2.98245V17.0175H4.45246V2.98245H4.11913ZM4.76198 2.3772C4.42011 2.3772 4.11913 2.63553 4.11913 2.98245H4.45246C4.45246 2.84492 4.57786 2.71053 4.76198 2.71053V2.3772ZM15.2382 2.3772H4.76198V2.71053H15.2382V2.3772ZM15.881 2.98245C15.881 2.63553 15.58 2.3772 15.2382 2.3772V2.71053C15.4223 2.71053 15.5477 2.84492 15.5477 2.98245H15.881ZM15.881 5V2.98245H15.5477V5H15.881ZM16.6667 4.83333H15.7144V5.16667H16.6667V4.83333ZM16.5001 2.98245V5H16.8334V2.98245H16.5001ZM15.2382 1.83333C15.9483 1.83333 16.5001 2.36045 16.5001 2.98245H16.8334C16.8334 2.15108 16.106 1.5 15.2382 1.5V1.83333ZM4.76198 1.83333H15.2382V1.5H4.76198V1.83333ZM15.4371 6.91212L18.0887 9.7928L18.3341 9.5670 … html += '</svg>'; html += '</a>'; html += '</div>'; html += '<a class="tlk-userbar__popup-cabinet tlk-btn_reset" href="/members/profile">{{widget_userbar_btn_edit_profile}}</a>'; html += '</div>'; if (typeof props.isPhoneValid === 'boolean' && !props.isPhoneValid) { html += ` <div class="tlk-userbar__popup-warning"> <div class="tlk-userbar__popup-warning-wrap"> <svg class="tlk-userbar__popup-warning-icon" width="17" height="17" viewBox="0 0 17 17" fill="none" xmlns="http://www.w3.org/2000/svg"> <path d="M17 8.5C17 13.1944 13.1944 17 8.5 17C3.80558 17 0 13.1944 0 8.5C0 3.80558 3.80558 0 8.5 0C13.1944 0 17 3.80558 17 8.5Z" fill="#EA3323"/> <path d="M8.25488 10.1543L7.89844 6.52148V4.8418H9.38281V6.52148L9.03125 10.1543H8.25488ZM7.95703 12V10.6279H9.3291V12H7.95703Z" fill="white"/> </svg> <div> <div class="tlk-userbar__popup-warning-text">{{widget_userbar_warning_phone}}</div> <button type="button" class="tlk-userbar__popup-edit-profile tlk-userbar__popup-warning-btn tlk-btn_reset">{{widget_userbar_fix}}</button> </div> </div> </div>`; } if ( (props.courses && props.courses.length > 0) || (props.groups && props.groups.length > 0) || window.tildaMembers.is_init_store ) { html += '<div class="tlk-userbar__popup-container">'; if (window.tildaMembers.is_init_store) { var welcomepageSettings = (window.tildaMembers && window.tildaMembers.settingStyles && window.tildaMembers.settingStyles.welcomepage) || {}; var { ordersManagementShowPurchased = true } = welcomepageSettings; html += '<div class="tlk-userbar__popup-store js-userbar__popup-store">'; if ((props.courses && props.courses.length > 0) || (props.groups && props.groups.length > 0)) { html += '<div class="tlk-userbar__popup-heading">{{widget_userbar_title_store}}</div>'; } html += tma__userbar__getStoreItemHtml({ name: '{{widget_userbar_store_main}}', alias: '' }); html += tma__userbar__getStoreItemHtml({ name: '{{widget_userbar_store_orders}}', alias: 'orderlist' }); if (ordersManagementShowPurchased) { html += tma__userbar__getStoreItemHtml({ name: '{{widget_userbar_store_purchased}}', alias: 'purchased-products', });Длинные строки сокращены. Полная версия доступна по ссылке «Полный текст».