Server IP : 80.87.202.40 / Your IP : 216.73.216.169 Web Server : Apache System : Linux rospirotorg.ru 5.14.0-539.el9.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Dec 5 22:26:13 UTC 2024 x86_64 User : bitrix ( 600) PHP Version : 8.2.27 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/bitrix/ext_www/rospirotorg.ru/bitrix/js/pull/components/status/dist/ |
Upload File : |
(function(t,s,i){"use strict";s.Vue.component("bx-pull-status",{props:{canReconnect:{default:false}},data:function t(){return{status:i.PullClient.PullStatus.Online,showed:null}},created:function t(){var s=this;this.isMac=navigator.userAgent.toLowerCase().includes("macintosh");this.setStatusTimeout=null;this.hideTimeout=null;this.pullUnSubscribe=function(){};if(typeof this.$root.$bitrixPullClient!=="undefined"){if(this.$root.$bitrixPullClient){this.subscribe(this.$root.$bitrixPullClient)}else{this.$root.$on("onBitrixPullClientInited",function(){s.subscribe(s.$root.$bitrixPullClient)})}}else if(typeof BX.PULL!=="undefined"){this.subscribe(BX.PULL)}window.component=this},beforeDestroy:function t(){this.pullUnSubscribe()},methods:{subscribe:function t(s){var e=this;this.pullUnSubscribe=s.subscribe({type:i.PullClient.SubscriptionType.Status,callback:function t(s){return e.statusChange(s.status)}})},reconnect:function t(){if(this.canReconnect){this.$emit("reconnect")}else{location.reload()}},statusChange:function t(s){var e=this;clearTimeout(this.setStatusTimeout);if(this.status===s){return false}var l=[i.PullClient.PullStatus.Online,i.PullClient.PullStatus.Offline,i.PullClient.PullStatus.Connecting];if(l.indexOf(s)<0){return false}var n=500;if(s===i.PullClient.PullStatus.Connecting){n=5e3}else if(s===i.PullClient.PullStatus.Offline){n=2e3}this.setStatusTimeout=setTimeout(function(){e.status=s;e.showed=true},n);return true}},watch:{status:function t(){var s=this;clearTimeout(this.hideTimeout);if(this.status==i.PullClient.PullStatus.Online){clearTimeout(this.hideTimeout);this.hideTimeout=setTimeout(function(){return s.showed=false},4e3)}}},computed:{connectionClass:function t(){var s="";if(this.showed===true){s="bx-pull-status-show"}else if(this.showed===false){s="bx-pull-status-hide"}if(this.status===i.PullClient.PullStatus.Online){s+=" bx-pull-status-online"}else if(this.status===i.PullClient.PullStatus.Offline){s+=" bx-pull-status-offline"}else if(this.status===i.PullClient.PullStatus.Connecting){s+=" bx-pull-status-connecting"}return s},connectionText:function t(){var s="";if(this.status===i.PullClient.PullStatus.Online){s=this.localize.BX_PULL_STATUS_ONLINE}else if(this.status===i.PullClient.PullStatus.Offline){s=this.localize.BX_PULL_STATUS_OFFLINE}else if(this.status===i.PullClient.PullStatus.Connecting){s=this.localize.BX_PULL_STATUS_CONNECTING}return s},button:function t(){var s="";var i="";if(this.canReconnect){i=this.localize.BX_PULL_STATUS_BUTTON_RECONNECT}else{s=this.isMac?"⌘+R":"Ctrl+R";i=this.localize.BX_PULL_STATUS_BUTTON_RELOAD}return{title:i,key:s}},localize:function t(){return s.Vue.getFilteredPhrases("BX_PULL_STATUS_",this.$root.$bitrixMessages)}},template:'\n\t\t<div :class="[\'bx-pull-status\', connectionClass]">\n\t\t\t<div class="bx-pull-status-wrap">\n\t\t\t\t<span class="bx-pull-status-text">{{connectionText}}</span>\n\t\t\t\t<span class="bx-pull-status-button" @click="reconnect">\n\t\t\t\t\t<span class="bx-pull-status-button-title">{{button.title}}</span>\n\t\t\t\t\t<span class="bx-pull-status-button-key" v-html="button.key"></span>\n\t\t\t\t</span>\n\t\t\t</div>\n\t\t</div>\n\t'})})(this.window=this.window||{},BX,BX); //# sourceMappingURL=status.bundle.map.js