mirror of
https://github.com/flarum/framework.git
synced 2024-11-26 02:10:09 +08:00
Bundled output for commit 20fc262c81
[skip ci]
This commit is contained in:
parent
20fc262c81
commit
641688f280
2
extensions/pusher/js/dist/admin.js
vendored
2
extensions/pusher/js/dist/admin.js
vendored
|
@ -1,2 +1,2 @@
|
|||
module.exports=function(t){var r={};function e(n){if(r[n])return r[n].exports;var a=r[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,e),a.l=!0,a.exports}return e.m=t,e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var a in t)e.d(n,a,function(r){return t[r]}.bind(null,a));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)},e.p="",e(e.s=7)}([function(t,r){t.exports=flarum.core.compat.app},function(t,r){t.exports=flarum.core.compat.extend},,,,,function(t,r){t.exports=flarum.core.compat["components/SettingsModal"]},function(t,r,e){"use strict";e.r(r);e(1);var n=e(0),a=e.n(n);var o=e(6),u=function(t){var r,e;function n(){return t.apply(this,arguments)||this}e=t,(r=n).prototype=Object.create(e.prototype),r.prototype.constructor=r,r.__proto__=e;var a=n.prototype;return a.className=function(){return"PusherSettingsModal Modal--small"},a.title=function(){return app.translator.trans("flarum-pusher.admin.pusher_settings.title")},a.form=function(){return[m("div",{className:"Form-group"},m("label",null,app.translator.trans("flarum-pusher.admin.pusher_settings.app_id_label")),m("input",{className:"FormControl",bidi:this.setting("flarum-pusher.app_id")})),m("div",{className:"Form-group"},m("label",null,app.translator.trans("flarum-pusher.admin.pusher_settings.app_key_label")),m("input",{className:"FormControl",bidi:this.setting("flarum-pusher.app_key")})),m("div",{className:"Form-group"},m("label",null,app.translator.trans("flarum-pusher.admin.pusher_settings.app_secret_label")),m("input",{className:"FormControl",bidi:this.setting("flarum-pusher.app_secret")})),m("div",{className:"Form-group"},m("label",null,app.translator.trans("flarum-pusher.admin.pusher_settings.app_cluster_label")),m("input",{className:"FormControl",bidi:this.setting("flarum-pusher.app_cluster")}))]},n}(e.n(o).a);a.a.initializers.add("flarum-pusher",(function(t){t.extensionSettings["flarum-pusher"]=function(){return t.modal.show(u)}}))}]);
|
||||
module.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var a=t[n]={i:n,l:!1,exports:{}};return e[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var a in e)r.d(n,a,function(t){return e[t]}.bind(null,a));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=7)}({0:function(e,t){e.exports=flarum.core.compat.app},7:function(e,t,r){"use strict";r.r(t);var n=r(0);r.n(n).a.initializers.add("flarum-pusher",(function(e){e.extensionData.for("flarum-pusher").registerSetting({setting:"flarum-pusher.app_id",label:e.translator.trans("flarum-pusher.admin.pusher_settings.app_id_label"),type:"text"},30).registerSetting({setting:"flarum-pusher.app_key",label:e.translator.trans("flarum-pusher.admin.pusher_settings.app_key_label"),type:"text"},20).registerSetting({setting:"flarum-pusher.app_secret",label:e.translator.trans("flarum-pusher.admin.pusher_settings.app_secret_label"),type:"text"},10).registerSetting({setting:"flarum-pusher.app_cluster",label:e.translator.trans("flarum-pusher.admin.pusher_settings.app_cluster_label"),type:"text"},0)}))}});
|
||||
//# sourceMappingURL=admin.js.map
|
2
extensions/pusher/js/dist/admin.js.map
vendored
2
extensions/pusher/js/dist/admin.js.map
vendored
File diff suppressed because one or more lines are too long
2
extensions/pusher/js/dist/forum.js
vendored
2
extensions/pusher/js/dist/forum.js
vendored
|
@ -1,2 +1,2 @@
|
|||
module.exports=function(t){var e={};function n(o){if(e[o])return e[o].exports;var s=e[o]={i:o,l:!1,exports:{}};return t[o].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(o,s,function(e){return t[e]}.bind(null,s));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=8)}([function(t,e){t.exports=flarum.core.compat.app},function(t,e){t.exports=flarum.core.compat.extend},function(t,e){t.exports=flarum.core.compat["components/DiscussionList"]},function(t,e){t.exports=flarum.core.compat["components/IndexPage"]},function(t,e){t.exports=flarum.core.compat["components/DiscussionPage"]},function(t,e){t.exports=flarum.core.compat["components/Button"]},,,function(t,e,n){"use strict";n.r(e);var o=n(1),s=n(0),r=n.n(s),i=n(2),u=n.n(i),a=n(4),c=n.n(a),d=n(3),p=n.n(d),f=n(5),l=n.n(f);r.a.initializers.add("flarum-pusher",(function(){var t=new Promise((function(t){$.getScript("//cdn.jsdelivr.net/npm/pusher-js@3.0.0/dist/pusher.min.js",(function(){var e=new Pusher(r.a.forum.attribute("pusherKey"),{authEndpoint:r.a.forum.attribute("apiUrl")+"/pusher/auth",cluster:r.a.forum.attribute("pusherCluster"),auth:{headers:{"X-CSRF-Token":r.a.session.csrfToken}}});return t({main:e.subscribe("public"),user:r.a.session.user?e.subscribe("private-user"+r.a.session.user.id()):null})}))}));r.a.pusher=t,r.a.pushedUpdates=[],Object(o.extend)(u.a.prototype,"oncreate",(function(){r.a.pusher.then((function(t){t.main.bind("newPost",(function(t){var e=r.a.discussions.getParams();if(!e.q&&!e.sort&&!e.filter){if(e.tags){var n=r.a.store.getBy("tags","slug",e.tags);if(-1===t.tagIds.indexOf(n.id()))return}var o=String(t.discussionId);r.a.current.get("discussion")&&o===r.a.current.get("discussion").id()||-1!==r.a.pushedUpdates.indexOf(o)||(r.a.pushedUpdates.push(o),r.a.current.matches(p.a)&&r.a.setTitleCount(r.a.pushedUpdates.length),m.redraw())}}))}))})),Object(o.extend)(u.a.prototype,"onremove",(function(){r.a.pusher.then((function(t){t.main.unbind("newPost")}))})),Object(o.extend)(u.a.prototype,"view",(function(t){var e=this;if(r.a.pushedUpdates){var n=r.a.pushedUpdates.length;n&&t.children.unshift(l.a.component({className:"Button Button--block DiscussionList-update",onclick:function(){e.attrs.state.refresh(!1).then((function(){e.loadingUpdated=!1,r.a.pushedUpdates=[],r.a.setTitleCount(0),m.redraw()})),e.loadingUpdated=!0},loading:this.loadingUpdated},r.a.translator.transChoice("flarum-pusher.forum.discussion_list.show_updates_text",n,{count:n})))}})),Object(o.extend)(u.a.prototype,"addDiscussion",(function(t,e){var n=r.a.pushedUpdates.indexOf(e.id());-1!==n&&r.a.pushedUpdates.splice(n,1),r.a.current.matches(p.a)&&r.a.setTitleCount(r.a.pushedUpdates.length),m.redraw()})),Object(o.extend)(c.a.prototype,"oncreate",(function(){var t=this;r.a.pusher.then((function(e){e.main.bind("newPost",(function(e){var n=String(e.discussionId);if(t.discussion&&t.discussion.id()===n&&t.stream){var o=t.discussion.commentCount();r.a.store.find("discussions",t.discussion.id()).then((function(){t.stream.update(),document.hasFocus()||(r.a.setTitleCount(Math.max(0,t.discussion.commentCount()-o)),$(window).one("focus",(function(){return r.a.setTitleCount(0)})))}))}}))}))})),Object(o.extend)(c.a.prototype,"onremove",(function(){r.a.pusher.then((function(t){t.main.unbind("newPost")}))})),Object(o.extend)(p.a.prototype,"actionItems",(function(t){t.remove("refresh")})),r.a.pusher.then((function(t){t.user&&t.user.bind("notification",(function(){r.a.session.user.pushAttributes({unreadNotificationCount:r.a.session.user.unreadNotificationCount()+1,newNotificationCount:r.a.session.user.newNotificationCount()+1}),r.a.notifications.clear(),m.redraw()}))}))}))}]);
|
||||
module.exports=function(t){var e={};function n(o){if(e[o])return e[o].exports;var s=e[o]={i:o,l:!1,exports:{}};return t[o].call(s.exports,s,s.exports,n),s.l=!0,s.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var s in t)n.d(o,s,function(e){return t[e]}.bind(null,s));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=6)}([function(t,e){t.exports=flarum.core.compat.app},function(t,e){t.exports=flarum.core.compat.extend},function(t,e){t.exports=flarum.core.compat["components/DiscussionList"]},function(t,e){t.exports=flarum.core.compat["components/IndexPage"]},function(t,e){t.exports=flarum.core.compat["components/DiscussionPage"]},function(t,e){t.exports=flarum.core.compat["components/Button"]},function(t,e,n){"use strict";n.r(e);var o=n(1),s=n(0),r=n.n(s),i=n(2),u=n.n(i),a=n(4),c=n.n(a),d=n(3),p=n.n(d),f=n(5),l=n.n(f);r.a.initializers.add("flarum-pusher",(function(){var t=new Promise((function(t){$.getScript("//cdn.jsdelivr.net/npm/pusher-js@3.0.0/dist/pusher.min.js",(function(){var e=new Pusher(r.a.forum.attribute("pusherKey"),{authEndpoint:r.a.forum.attribute("apiUrl")+"/pusher/auth",cluster:r.a.forum.attribute("pusherCluster"),auth:{headers:{"X-CSRF-Token":r.a.session.csrfToken}}});return t({main:e.subscribe("public"),user:r.a.session.user?e.subscribe("private-user"+r.a.session.user.id()):null})}))}));r.a.pusher=t,r.a.pushedUpdates=[],Object(o.extend)(u.a.prototype,"oncreate",(function(){r.a.pusher.then((function(t){t.main.bind("newPost",(function(t){var e=r.a.discussions.getParams();if(!e.q&&!e.sort&&!e.filter){if(e.tags){var n=r.a.store.getBy("tags","slug",e.tags);if(-1===t.tagIds.indexOf(n.id()))return}var o=String(t.discussionId);r.a.current.get("discussion")&&o===r.a.current.get("discussion").id()||-1!==r.a.pushedUpdates.indexOf(o)||(r.a.pushedUpdates.push(o),r.a.current.matches(p.a)&&r.a.setTitleCount(r.a.pushedUpdates.length),m.redraw())}}))}))})),Object(o.extend)(u.a.prototype,"onremove",(function(){r.a.pusher.then((function(t){t.main.unbind("newPost")}))})),Object(o.extend)(u.a.prototype,"view",(function(t){var e=this;if(r.a.pushedUpdates){var n=r.a.pushedUpdates.length;n&&t.children.unshift(l.a.component({className:"Button Button--block DiscussionList-update",onclick:function(){e.attrs.state.refresh(!1).then((function(){e.loadingUpdated=!1,r.a.pushedUpdates=[],r.a.setTitleCount(0),m.redraw()})),e.loadingUpdated=!0},loading:this.loadingUpdated},r.a.translator.transChoice("flarum-pusher.forum.discussion_list.show_updates_text",n,{count:n})))}})),Object(o.extend)(u.a.prototype,"addDiscussion",(function(t,e){var n=r.a.pushedUpdates.indexOf(e.id());-1!==n&&r.a.pushedUpdates.splice(n,1),r.a.current.matches(p.a)&&r.a.setTitleCount(r.a.pushedUpdates.length),m.redraw()})),Object(o.extend)(c.a.prototype,"oncreate",(function(){var t=this;r.a.pusher.then((function(e){e.main.bind("newPost",(function(e){var n=String(e.discussionId);if(t.discussion&&t.discussion.id()===n&&t.stream){var o=t.discussion.commentCount();r.a.store.find("discussions",t.discussion.id()).then((function(){t.stream.update(),document.hasFocus()||(r.a.setTitleCount(Math.max(0,t.discussion.commentCount()-o)),$(window).one("focus",(function(){return r.a.setTitleCount(0)})))}))}}))}))})),Object(o.extend)(c.a.prototype,"onremove",(function(){r.a.pusher.then((function(t){t.main.unbind("newPost")}))})),Object(o.extend)(p.a.prototype,"actionItems",(function(t){t.remove("refresh")})),r.a.pusher.then((function(t){t.user&&t.user.bind("notification",(function(){r.a.session.user.pushAttributes({unreadNotificationCount:r.a.session.user.unreadNotificationCount()+1,newNotificationCount:r.a.session.user.newNotificationCount()+1}),r.a.notifications.clear(),m.redraw()}))}))}))}]);
|
||||
//# sourceMappingURL=forum.js.map
|
2
extensions/pusher/js/dist/forum.js.map
vendored
2
extensions/pusher/js/dist/forum.js.map
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user