1
1
/******/ ( ( ) => { // webpackBootstrap
2
- /******/ // runtime can't be in strict mode because a global variable is assign and maybe created.
3
- /******/ var __webpack_modules__ = ( {
4
-
5
- /***/ "./src/forum/index.js" :
6
- /*!****************************!*\
7
- !*** ./src/forum/index.js ***!
8
- \****************************/
9
- /***/ ( ( __unused_webpack_module , __webpack_exports__ , __webpack_require__ ) => {
10
-
11
- "use strict" ;
12
- __webpack_require__ . r ( __webpack_exports__ ) ;
13
- /* harmony import */ var flarum_forum_app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__ ( /*! flarum/forum/app */ "flarum/forum/app" ) ;
14
- /* harmony import */ var flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/ __webpack_require__ . n ( flarum_forum_app__WEBPACK_IMPORTED_MODULE_0__ ) ;
15
- /* harmony import */ var flarum_common_extend__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__ ( /*! flarum/common/extend */ "flarum/common/extend" ) ;
16
- /* harmony import */ var flarum_common_extend__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/ __webpack_require__ . n ( flarum_common_extend__WEBPACK_IMPORTED_MODULE_1__ ) ;
17
- /* harmony import */ var flarum_forum_components_PostStream__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__ ( /*! flarum/forum/components/PostStream */ "flarum/forum/components/PostStream" ) ;
18
- /* harmony import */ var flarum_forum_components_PostStream__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/ __webpack_require__ . n ( flarum_forum_components_PostStream__WEBPACK_IMPORTED_MODULE_2__ ) ;
19
-
20
-
21
-
22
- function getKey ( key ) {
23
- return "flarum-lang-chinese-simplified." + key ;
24
- }
25
- flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default ( ) . initializers . add ( 'flarum-lang/chinese-simplified' , function ( ) {
26
- var isZhHans = ( flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default ( ) . data ) . locale === 'zh-Hans' ;
27
-
28
- // 调整侧边栏日期
29
- ( 0 , flarum_common_extend__WEBPACK_IMPORTED_MODULE_1__ . override ) ( ( flarum_forum_components_PostStream__WEBPACK_IMPORTED_MODULE_2___default ( ) . prototype ) , 'updateScrubber' , function ( original ) {
30
- var _this = this ;
31
- var reformatTime = ( flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default ( ) . forum ) . data . attributes [ getKey ( 'reformat_time' ) ] ;
32
- for ( var _len = arguments . length , args = new Array ( _len > 1 ? _len - 1 : 0 ) , _key = 1 ; _key < _len ; _key ++ ) {
33
- args [ _key - 1 ] = arguments [ _key ] ;
34
- }
35
- original . apply ( void 0 , args ) ;
36
- if ( isZhHans && reformatTime && this . stream . discussion . payload ) {
37
- this . stream . loadPromise . then ( function ( ) {
38
- var index = _this . stream . index . toFixed ( 0 ) - 1 ;
39
- // const index = this.stream.targetPost.index || 0;
40
- var id = _this . stream . discussion . payload . data . relationships . posts . data [ index ] [ 'id' ] ;
41
- var post = _this . stream . discussion . store . data . posts [ id ] ;
42
- var time = post . data . attributes . createdAt ;
43
- _this . stream . description = dayjs ( time ) . format ( 'YYYY年MMM' ) ;
44
- } ) ;
45
- }
46
- } ) ;
47
- ( 0 , flarum_common_extend__WEBPACK_IMPORTED_MODULE_1__ . override ) ( dayjs . prototype , 'format' , function ( original , format ) {
48
- var reformatTimeForce = ( flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default ( ) . forum ) . data . attributes [ getKey ( 'reformat_time_force' ) ] ;
49
- for ( var _len2 = arguments . length , args = new Array ( _len2 > 2 ? _len2 - 2 : 0 ) , _key2 = 2 ; _key2 < _len2 ; _key2 ++ ) {
50
- args [ _key2 - 2 ] = arguments [ _key2 ] ;
51
- }
52
- if ( reformatTimeForce && isZhHans ) {
53
- return format === 'D MMM' ? original . apply ( void 0 , [ 'MMMD日' ] . concat ( args ) ) : original . apply ( void 0 , [ format ] . concat ( args ) ) ;
54
- } else {
55
- return original . apply ( void 0 , [ format ] . concat ( args ) ) ;
56
- }
57
- } ) ;
58
- } ) ;
59
-
60
- /***/ } ) ,
61
-
62
- /***/ "flarum/common/extend" :
63
- /*!******************************************************!*\
64
- !*** external "flarum.core.compat['common/extend']" ***!
65
- \******************************************************/
66
- /***/ ( ( module ) => {
67
-
68
- "use strict" ;
69
- module . exports = flarum . core . compat [ 'common/extend' ] ;
70
-
71
- /***/ } ) ,
72
-
73
- /***/ "flarum/forum/app" :
74
- /*!**************************************************!*\
75
- !*** external "flarum.core.compat['forum/app']" ***!
76
- \**************************************************/
77
- /***/ ( ( module ) => {
78
-
79
- "use strict" ;
80
- module . exports = flarum . core . compat [ 'forum/app' ] ;
81
-
82
- /***/ } ) ,
83
-
84
- /***/ "flarum/forum/components/PostStream" :
85
- /*!********************************************************************!*\
86
- !*** external "flarum.core.compat['forum/components/PostStream']" ***!
87
- \********************************************************************/
88
- /***/ ( ( module ) => {
89
-
90
- "use strict" ;
91
- module . exports = flarum . core . compat [ 'forum/components/PostStream' ] ;
92
-
93
- /***/ } )
94
-
95
- /******/ } ) ;
96
- /************************************************************************/
97
- /******/ // The module cache
98
- /******/ var __webpack_module_cache__ = { } ;
2
+ /******/ "use strict" ;
99
3
/******/
100
- /******/ // The require function
101
- /******/ function __webpack_require__ ( moduleId ) {
102
- /******/ // Check if module is in cache
103
- /******/ var cachedModule = __webpack_module_cache__ [ moduleId ] ;
104
- /******/ if ( cachedModule !== undefined ) {
105
- /******/ return cachedModule . exports ;
106
- /******/ }
107
- /******/ // Create a new module (and put it into the cache)
108
- /******/ var module = __webpack_module_cache__ [ moduleId ] = {
109
- /******/ // no module.id needed
110
- /******/ // no module.loaded needed
111
- /******/ exports : { }
112
- /******/ } ;
113
4
/******/
114
- /******/ // Execute the module function
115
- /******/ __webpack_modules__ [ moduleId ] ( module , module . exports , __webpack_require__ ) ;
116
- /******/
117
- /******/ // Return the exports of the module
118
- /******/ return module . exports ;
119
- /******/ }
120
- /******/
121
- /************************************************************************/
122
- /******/ /* webpack/runtime/compat get default export */
123
- /******/ ( ( ) => {
124
- /******/ // getDefaultExport function for compatibility with non-harmony modules
125
- /******/ __webpack_require__ . n = ( module ) => {
126
- /******/ var getter = module && module . __esModule ?
127
- /******/ ( ) => ( module [ 'default' ] ) :
128
- /******/ ( ) => ( module ) ;
129
- /******/ __webpack_require__ . d ( getter , { a : getter } ) ;
130
- /******/ return getter ;
131
- /******/ } ;
132
- /******/ } ) ( ) ;
133
- /******/
134
- /******/ /* webpack/runtime/define property getters */
135
- /******/ ( ( ) => {
136
- /******/ // define getter functions for harmony exports
137
- /******/ __webpack_require__ . d = ( exports , definition ) => {
138
- /******/ for ( var key in definition ) {
139
- /******/ if ( __webpack_require__ . o ( definition , key ) && ! __webpack_require__ . o ( exports , key ) ) {
140
- /******/ Object . defineProperty ( exports , key , { enumerable : true , get : definition [ key ] } ) ;
141
- /******/ }
142
- /******/ }
143
- /******/ } ;
144
- /******/ } ) ( ) ;
145
- /******/
146
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
147
- /******/ ( ( ) => {
148
- /******/ __webpack_require__ . o = ( obj , prop ) => ( Object . prototype . hasOwnProperty . call ( obj , prop ) )
149
- /******/ } ) ( ) ;
150
- /******/
151
- /******/ /* webpack/runtime/make namespace object */
152
- /******/ ( ( ) => {
153
- /******/ // define __esModule on exports
154
- /******/ __webpack_require__ . r = ( exports ) => {
155
- /******/ if ( typeof Symbol !== 'undefined' && Symbol . toStringTag ) {
156
- /******/ Object . defineProperty ( exports , Symbol . toStringTag , { value : 'Module' } ) ;
157
- /******/ }
158
- /******/ Object . defineProperty ( exports , '__esModule' , { value : true } ) ;
159
- /******/ } ;
160
- /******/ } ) ( ) ;
161
- /******/
162
- /************************************************************************/
163
- var __webpack_exports__ = { } ;
164
- // This entry need to be wrapped in an IIFE because it need to be in strict mode.
165
- ( ( ) => {
166
- "use strict" ;
167
- /*!******************!*\
168
- !*** ./forum.js ***!
169
- \******************/
170
- __webpack_require__ . r ( __webpack_exports__ ) ;
171
- /* harmony import */ var _src_forum__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__ ( /*! ./src/forum */ "./src/forum/index.js" ) ;
172
-
173
- } ) ( ) ;
174
-
175
- module . exports = __webpack_exports__ ;
176
5
/******/ } ) ( )
177
- ;
178
- //# sourceMappingURL=forum.js.map
6
+ ;
0 commit comments