3 lines
7.6 KiB
JavaScript
3 lines
7.6 KiB
JavaScript
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[1662],{80208:(t,e,i)=>{"use strict";i.r(e),i.d(e,{showAlertsPushDialog:()=>r});var o=i(28353),s=(i(94419),i(89725)),n=i(82595);const a='<div class="tv-dialog__header tv-dialog__header--adaptive"><div class="tv-dialog__header-logo">'+n+'</div><div class="tv-dialog__header-title"><h2>'+(0,o.t)("Install TradingView Mobile App")+"</h2></div></div><div><p>"+(0,o.t)("To get notified about an alert on your phone you need to do the following:")+"</p><ul><li>"+(0,o.t)("Download the latest TradingView app from {app_store_link}AppStore{link_end} or {google_play_link}Google Play{link_end}").format({app_store_link:'<a href="https://itunes.apple.com/us/app/tradingview-trading-community-charts-and-quotes/id1205990992?pt=118302550&ct=site" target="_blank">',google_play_link:'<a href="https://play.google.com/store/apps/details?id=com.tradingview.tradingviewapp&referrer=utm_source%3Dtradingview%26utm_medium%3Dgplay_site " target="_blank">',link_end:"</a>"})+"</li><li>"+(0,o.t)("Login into your TradingView account on the app")+"</li><li>"+(0,o.t)("Allow the TradingView app to send push notifications. For iOS devices: go to Settings -> Notifications -> Select TradingView app -> Turn on Allow Notifications. For Android devices: open TradingView app settings and enable push notifications")+"</li></ul></div>";function r(){const t={width:480,closeOnOutsideClick:!1,destroyOnClose:!0,closeButton:!1,focusFirstControl:!1,type:"modal",contentWrapTemplate:'<div class="tv-dialog__section tv-dialog__section--no-border"><div class="tv-text tv-text--position-outside"></div></div>',actionsWrapTemplate:'<div class="tv-dialog__section tv-dialog__section--actions tv-dialog__section--actions-adaptive tv-dialog__section--no-border">',content:a,actions:[{name:"confirm",type:"primary",text:(0,o.t)("Got it"),method:"close",key:[13,32]},{name:"do-not-show",type:"checkbox",text:(0,o.t)("Do not show this message again"),addClass:"tv-control-checkbox tv-control-checkbox--in-actions i-align_left i-float_left"}]};return new Promise(e=>{let i=!1;const o=(0,s.createDialog)(t);o.on("action:do-not-show",(t,e)=>{i=e}),o.on("destroy",()=>{e(i)}),o.open()})}},89725:(t,e,i)=>{"use strict";i.r(e),i.d(e,{createDialog:()=>n});var o=i(976),s=i(77544);function n(t){const e=t.type||"popup";return delete t.type,"modal"===e?new o.TVModal(t):new s.TVPopup(t)}},976:(t,e,i)=>{"use strict";i.d(e,{TVModal:()=>v});var o=i(28353),s=i(68587),n=i(49483),a=i(43989),r=i(51536),d=i(4185),l=i(85739),h=i(25760),c=i(23127),p=i(25977);let g=[];const u={ajax:{},closingDuration:s.dur/2,fixBodyState:!0,overlayTemplate:'<div class="tv-dialog__overlay"></div>',containerTemplate:'<div class="tv-dialog__modal-wrap"><div class="tv-dialog__modal-container"><div class="tv-dialog__modal-body"></div></div></div>',ajaxErrorTemplate:`<div class="tv-dialog__error js-dialog__close">${(0,o.t)("Error")}</div>`};class v extends r.TVDialogAbstract{constructor(t={}){if(super({...u,...t}),this.$overlay=c(this.options.overlayTemplate),
|
|
this.$modalWrap=c(this.options.containerTemplate),this.$body=this.$modalWrap.find(".tv-dialog__modal-body").append(this.$el),this.options.closeOnOutsideClick&&this.$overlay.add(this.$modalWrap).click(t=>{this.isEventOut(t)&&this.close()}),this.on("change:zIndex",()=>{this.$overlay.css("z-index",this.zIndex),this.$modalWrap.css("z-index",this.zIndex)}),this.on("destroy",()=>{const t=()=>{this.$overlay.remove(),this.$modalWrap.remove()};this.opened?(this.close(),setTimeout(t,this.options.closingDuration)):t()}),this.on("beforeOpen",()=>{g.push(this)}),this.options.ajax.url){const t=this.options.ajax.beforeSend||c.noop,e=this.options.ajax.success||!1,i=this.options.ajax.error||c.noop;c.extend(this.options.ajax,{beforeSend:()=>{this.trigger("beforeLoading",[this]),this.startSpinner(),t(this)},success:t=>{this.trigger("afterLoading",[this]),this.renderContent(e?e(this,t):t).showContent(),this.trigger("afterLoadingShow",[this])},error:()=>{this.renderContent(this.options.ajaxErrorTemplate),i(this),this.trigger("errorLoading",[this])}})}this.on("error",(t,e)=>{this.$modalWrap[0].getBoundingClientRect().height<this.$content[0].getBoundingClientRect().height&&e.addClass("i-fixed").css({width:this.$el.width()})}),this._keyboardBinderLockId=null}open(){if(this.opened)return;this.opened=!0,this._keyboardBinderLockId=l.disable(),this.options.fixBodyState&&(0,a.setFixedBodyState)(!0),this._hotkeys||(this._hotkeys=h.createGroup({desc:"Modal Dialog",isDisabled:()=>!this.opened,modal:!0}),this.options.closeOnEsc&&this._hotkeys.add({desc:"close",hotkey:27,handler:()=>this.close()}));const t=()=>{this.focus(),this.toTop(),this.trigger("beforeOpen",[this]),c(this.$wrap).append(this.$overlay.addClass("i-hidden i-closed").css("z-index",this.zIndex)).append(this.$modalWrap.addClass("i-hidden i-closed").css("z-index",this.zIndex)),this.$overlay.removeClass("i-hidden"),setTimeout(()=>{this.$overlay.removeClass("i-closed")},20),this.options.ajax.url?this.ajaxRequest=c.ajax(this.options.ajax):this.showContent()};return n.isSafari?setTimeout(()=>t(),50):t(),this}close(){if(this.opened)return this.opened=!1,this._keyboardBinderLockId&&l.enable(this._keyboardBinderLockId),this._hotkeys&&(this._hotkeys.destroy(),this._hotkeys=null),this.trigger("beforeClose",[this]),this.ajaxRequest&&(this.ajaxRequest.abort(),delete this.ajaxRequest),this.hideContent(),this.$overlay.addClass("i-closed"),setTimeout(()=>{this.$modalWrap.addClass("i-hidden").detach(),this.$overlay.addClass("i-hidden").detach(),g=p.without(g,this),this.options.fixBodyState&&(0,a.setFixedBodyState)(!1),this.trigger("afterClose",[this]),this.unfocus(),g.length>0&&g[g.length-1].focus(),this.options.destroyOnClose&&this.destroy()},this.options.closingDuration),this}showContent(){return this.$modalWrap.removeClass("i-hidden"),setTimeout(()=>{this.$modalWrap.removeClass("i-closed")},20),setTimeout(()=>{this.trigger("afterOpen",[this]),this.spinner&&this.stopSpinner()},.75*s.dur+20),this}hideContent(){if(this.$el)return this.$modalWrap.addClass("i-closed"),this.unfocus(),this}startSpinner(){
|
|
return this.spinner=new d.Spinner("large"),this.spinner.spin(this.$overlay[0]),this}stopSpinner(){if(this.spinner)return this.spinner.stop(),delete this.spinner,this}}},43989:(t,e,i)=>{"use strict";i.d(e,{setFixedBodyState:()=>a});var o=i(68722);let s=0,n=!1;function a(t){const{body:e}=document,i=e.querySelector(".widgetbar-wrap");if(t&&1==++s){const t=(0,o.getCSSProperty)(e,"overflow"),s=(0,o.getCSSPropertyNumericValue)(e,"padding-right");"hidden"!==t.toLowerCase()&&e.scrollHeight>e.offsetHeight&&((0,o.setStyle)(i,"right",(0,o.getScrollbarWidth)()+"px"),e.style.paddingRight=s+(0,o.getScrollbarWidth)()+"px",n=!0),e.classList.add("i-no-scroll")}else if(!t&&s>0&&0==--s&&(e.classList.remove("i-no-scroll"),n)){(0,o.setStyle)(i,"right","0px");let t=0;0,e.scrollHeight<=e.clientHeight&&(t-=(0,o.getScrollbarWidth)()),e.style.paddingRight=(t<0?0:t)+"px",n=!1}}},82595:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 79" width="48" height="79"><g fill="none" fill-rule="evenodd" transform="translate(2 2)"><rect width="39" height="70" fill="#2962FF" rx="3" x="7" y="7"/><path stroke="#FFF" stroke-linecap="round" stroke-linejoin="round" stroke-width="3" d="M13 26v5M13 18v1"/><rect width="39" height="70" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" rx="3"/><path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="4" d="M6 14.004C6 12.897 6.898 12 8.007 12h22.986C32.1 12 33 12.897 33 14.004v42.992A2.006 2.006 0 0 1 30.993 59H8.007A2.006 2.006 0 0 1 6 56.996V14.004zM15.5 6h7"/><ellipse fill="#4A4A4A" cx="19.5" cy="64.5" rx="2.5" ry="2.5"/></g></svg>'}}]); |