@jx3box/jx3box-ui 2.0.5 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (226) hide show
  1. package/.storybook/preview.js +22 -13
  2. package/.storybook/storybookMocks.js +191 -0
  3. package/README.md +6 -19
  4. package/assets/css/bread/admin.less +20 -2
  5. package/assets/css/bread/breadcrumb.less +5 -2
  6. package/assets/css/comment/quick-reply.less +1 -1
  7. package/assets/css/common/left-sidebar.less +1 -1
  8. package/assets/css/interact/like2.less +5 -2
  9. package/assets/css/single/author.less +15 -10
  10. package/assets/css/single/cms-single.less +1 -0
  11. package/assets/css/single/thx.less +34 -11
  12. package/assets/data/nav.json +344 -10
  13. package/assets/img/comment/comment.svg +1 -1
  14. package/assets/img/comment/heart_1.svg +1 -1
  15. package/assets/img/comment/hide.svg +1 -1
  16. package/assets/img/leftsidebar/medal.svg +1 -1
  17. package/assets/img/leftsidebar/post.svg +27 -46
  18. package/i18n/messages/en-US.js +357 -22
  19. package/i18n/messages/vi.js +350 -22
  20. package/i18n/messages/zh-CN.js +469 -20
  21. package/i18n/messages/zh-TW.js +350 -22
  22. package/index.js +19 -7
  23. package/package.json +8 -5
  24. package/service/cms.js +22 -0
  25. package/service/commit-history.js +18 -0
  26. package/service/community.js +60 -0
  27. package/service/fav.js +5 -6
  28. package/src/App.vue +154 -80
  29. package/src/Breadcrumb.vue +24 -11
  30. package/src/CommonFooter.vue +2 -2
  31. package/src/Footer.vue +13 -5
  32. package/src/LeftSideToggle.vue +10 -3
  33. package/src/LeftSidebar.vue +19 -5
  34. package/src/Main.vue +9 -2
  35. package/src/RightSidebar.vue +12 -3
  36. package/src/SuspendCommon.vue +52 -38
  37. package/src/author/AuthorFans.vue +7 -5
  38. package/src/author/AuthorFollow.vue +14 -7
  39. package/src/author/AuthorGift.vue +25 -17
  40. package/src/author/AuthorInfo.vue +46 -19
  41. package/src/author/AuthorLink.vue +3 -1
  42. package/src/author/AuthorMedals.vue +5 -2
  43. package/src/author/AuthorPosts.vue +31 -13
  44. package/src/author/AuthorRss.vue +7 -3
  45. package/src/author/AuthorTeams.vue +3 -1
  46. package/src/author/UserPop.vue +29 -17
  47. package/src/bread/Admin.vue +55 -32
  48. package/src/bread/AdminDirectMessage.vue +15 -8
  49. package/src/bread/AdminDrop.vue +124 -45
  50. package/src/bread/CommunityAdmin.vue +527 -0
  51. package/src/bread/DesignTask.vue +30 -26
  52. package/src/bread/ListAdmin.vue +199 -0
  53. package/src/bread/MigrateCommunity.vue +192 -0
  54. package/src/bread/MoveToCommunityDialog.vue +234 -0
  55. package/src/comment/Avatar.vue +18 -24
  56. package/src/comment/CommentContent.vue +57 -37
  57. package/src/comment/CommentContentSimple.vue +61 -63
  58. package/src/comment/CommentInputForm.vue +45 -34
  59. package/src/comment/CommentWithReply.vue +9 -6
  60. package/src/comment/QuickReply.vue +5 -1
  61. package/src/comment/ReplyForReply.vue +6 -4
  62. package/src/comment/ReplyList.vue +28 -18
  63. package/src/comment/Upload.vue +24 -6
  64. package/src/filters/clientBy.vue +10 -8
  65. package/src/filters/markBy.vue +35 -31
  66. package/src/filters/menuBy.vue +20 -22
  67. package/src/filters/orderBy.vue +17 -11
  68. package/src/filters/tagBy.vue +4 -2
  69. package/src/filters/topicBy.vue +12 -10
  70. package/src/filters/versionBy.vue +5 -3
  71. package/src/filters/zlpBy.vue +29 -25
  72. package/src/footer/copyright.vue +5 -5
  73. package/src/footer/links.vue +2 -2
  74. package/src/footer/official.vue +1 -1
  75. package/src/footer/resource.vue +6 -6
  76. package/src/header/alternate.vue +35 -18
  77. package/src/header/asset.vue +9 -19
  78. package/src/header/box.vue +20 -8
  79. package/src/header/box2.vue +16 -9
  80. package/src/header/client.vue +7 -7
  81. package/src/header/lang.vue +41 -6
  82. package/src/header/logo.vue +2 -3
  83. package/src/header/manage.vue +2 -2
  84. package/src/header/message.vue +3 -3
  85. package/src/header/nav.vue +26 -23
  86. package/src/header/publish.vue +2 -2
  87. package/src/header/search.vue +2 -2
  88. package/src/header/shop.vue +2 -2
  89. package/src/header/user.vue +4 -4
  90. package/src/header/userInfo.vue +22 -24
  91. package/src/header/vip.vue +2 -2
  92. package/src/interact/BoxcoinAdmin.vue +30 -16
  93. package/src/interact/BoxcoinRecords.vue +28 -11
  94. package/src/interact/BoxcoinUser.vue +33 -17
  95. package/src/interact/Fav.vue +5 -1
  96. package/src/interact/Homework.vue +318 -0
  97. package/src/interact/Like.vue +4 -2
  98. package/src/interact/Rss.vue +10 -4
  99. package/src/interact/Share.vue +18 -19
  100. package/src/interact/WatchLater.vue +5 -1
  101. package/src/main.js +1 -0
  102. package/src/single/Author.vue +5 -1
  103. package/src/single/CmsSingle.vue +29 -15
  104. package/src/single/Collection.vue +36 -26
  105. package/src/single/Comment.vue +19 -13
  106. package/src/single/Creators.vue +5 -3
  107. package/src/single/PostCollection.vue +158 -0
  108. package/src/single/PostDirectory.vue +0 -126
  109. package/src/single/PostGuide.vue +93 -0
  110. package/src/single/PostHeader.vue +39 -17
  111. package/src/single/PostTopic.vue +3 -3
  112. package/src/single/PostVersion.vue +219 -0
  113. package/src/single/RightAffix.vue +160 -0
  114. package/src/single/SimpleThx.vue +4 -2
  115. package/src/single/Thx.vue +14 -2
  116. package/src/single/VersionDialog.vue +238 -0
  117. package/src/stories/components/StoryPropsTable.vue +137 -0
  118. package/src/stories/filters/FilterGallery.stories.js +110 -0
  119. package/src/stories/filters/clientBy.stories.js +24 -0
  120. package/src/stories/filters/markBy.stories.js +6 -0
  121. package/src/stories/filters/menuBy.stories.js +6 -0
  122. package/src/stories/filters/orderBy.stories.js +6 -0
  123. package/src/stories/filters/tagBy.stories.js +6 -0
  124. package/src/stories/filters/topicBy.stories.js +6 -0
  125. package/src/stories/filters/versionBy.stories.js +6 -0
  126. package/src/stories/filters/zlpBy.stories.js +6 -0
  127. package/src/stories/layout/BaseShell.stories.js +38 -0
  128. package/src/stories/layout/Breadcrumb.stories.js +40 -0
  129. package/src/stories/layout/CommonFooter.stories.js +1 -1
  130. package/src/stories/layout/CommonHeader.stories.js +1 -1
  131. package/src/stories/layout/LeftSideToggle.stories.js +78 -0
  132. package/src/stories/layout/LeftSidebar.stories.js +40 -0
  133. package/src/stories/layout/Main.stories.js +41 -0
  134. package/src/stories/layout/RightSidebar.stories.js +36 -0
  135. package/src/stories/layout/StorybookShell.vue +271 -0
  136. package/src/stories/layout/SuspendCommon.stories.js +67 -0
  137. package/src/stories/layout/SuspendCommonStage.vue +143 -0
  138. package/src/stories/mockData.js +275 -0
  139. package/src/stories/other/UserPop.stories.js +51 -0
  140. package/src/stories/single/Author.stories.js +19 -0
  141. package/src/stories/single/AuthorStoryStage.vue +103 -0
  142. package/src/stories/single/CmsSingle.stories.js +19 -0
  143. package/src/stories/single/CmsSingleStoryStage.vue +118 -0
  144. package/src/stories/single/Collection.stories.js +34 -0
  145. package/src/stories/single/Comment.stories.js +36 -0
  146. package/src/stories/single/Creators.stories.js +34 -0
  147. package/src/stories/single/PostCollection.stories.js +34 -0
  148. package/src/stories/single/PostDirectory.stories.js +31 -0
  149. package/src/stories/single/PostGuide.stories.js +47 -0
  150. package/src/stories/single/PostHeader.stories.js +39 -0
  151. package/src/stories/single/PostVersion.stories.js +41 -0
  152. package/src/stories/single/RightAffix.stories.js +84 -0
  153. package/src/stories/single/SimpleThx.stories.js +39 -0
  154. package/src/stories/single/SingleGallery.stories.js +207 -0
  155. package/src/stories/single/Thx.stories.js +38 -0
  156. package/vue.config.js +2 -12
  157. package/assets/css/common/bottom.less +0 -25
  158. package/assets/css/editor/article.less +0 -36
  159. package/assets/css/editor/combo.less +0 -362
  160. package/assets/css/editor/resource.less +0 -399
  161. package/assets/css/editor/tinymce.less +0 -100
  162. package/assets/css/editor/upload.less +0 -136
  163. package/assets/css/module/author.less +0 -231
  164. package/assets/css/module/buff.less +0 -88
  165. package/assets/css/module/directory.less +0 -165
  166. package/assets/css/module/icon.less +0 -25
  167. package/assets/css/module/item.less +0 -279
  168. package/assets/css/module/item_simple.less +0 -58
  169. package/assets/css/module/jx3_element.less +0 -5
  170. package/assets/css/module/macro.less +0 -89
  171. package/assets/css/module/npc.less +0 -265
  172. package/assets/css/module/resource.less +0 -93
  173. package/assets/css/module/skill.less +0 -74
  174. package/assets/css/module/talent.less +0 -495
  175. package/assets/js/a.js +0 -46
  176. package/assets/js/code.js +0 -13
  177. package/assets/js/combo.js +0 -40
  178. package/assets/js/directory.js +0 -114
  179. package/assets/js/filter2.js +0 -186
  180. package/assets/js/fold.js +0 -11
  181. package/assets/js/gallery.js +0 -14
  182. package/assets/js/hljs_languages.js +0 -177
  183. package/assets/js/iframe.js +0 -38
  184. package/assets/js/img.js +0 -23
  185. package/assets/js/item/attribute_percent.js +0 -88
  186. package/assets/js/item/bind.js +0 -18
  187. package/assets/js/item/border.js +0 -19
  188. package/assets/js/item/border_quest.js +0 -12
  189. package/assets/js/item/color.js +0 -25
  190. package/assets/js/item/hljs_languages.js +0 -177
  191. package/assets/js/item/icon_url.js +0 -15
  192. package/assets/js/item/second_format.js +0 -19
  193. package/assets/js/jx3_element.js +0 -73
  194. package/assets/js/katex.js +0 -181
  195. package/assets/js/macro.js +0 -16
  196. package/assets/js/nextpage.js +0 -4
  197. package/assets/js/pswp.js +0 -67
  198. package/assets/js/pswp_template.js +0 -66
  199. package/assets/js/pz_iframe.js +0 -30
  200. package/assets/js/qixue.js +0 -28
  201. package/assets/js/renderImgPreview.js +0 -18
  202. package/assets/js/script.js +0 -6
  203. package/assets/js/stat.js +0 -107
  204. package/assets/js/talent2.js +0 -21
  205. package/assets/js/tex-mml-chtml.js +0 -36310
  206. package/assets/js/voice.js +0 -238
  207. package/assets/js/xss.js +0 -130
  208. package/src/editor/Article.vue +0 -230
  209. package/src/editor/BoxResource.vue +0 -441
  210. package/src/editor/Resource.vue +0 -623
  211. package/src/editor/Tinymce.vue +0 -204
  212. package/src/editor/Upload.vue +0 -277
  213. package/src/editor/UploadAlum.vue +0 -176
  214. package/src/editor/UploadBanner.vue +0 -156
  215. package/src/editor/components/Author.vue +0 -322
  216. package/src/editor/components/Avatar.vue +0 -95
  217. package/src/editor/components/Buff.vue +0 -80
  218. package/src/editor/components/Combo.vue +0 -259
  219. package/src/editor/components/Equip.vue +0 -299
  220. package/src/editor/components/GameText.vue +0 -242
  221. package/src/editor/components/Item.vue +0 -325
  222. package/src/editor/components/ItemSimple.vue +0 -134
  223. package/src/editor/components/Medal.vue +0 -43
  224. package/src/editor/components/Npc.vue +0 -215
  225. package/src/editor/components/PostAuthor.vue +0 -102
  226. package/src/editor/components/Skill.vue +0 -71
@@ -32,7 +32,7 @@
32
32
  </div>
33
33
  <div class="m-more" v-if="btnConfig.showMore" @click="setMore">
34
34
  <!-- <img class="u-icon" src="../assets/img/suspend/more.svg" svg-inline /> -->
35
- 更多
35
+ {{ $jx3boxT("jx3boxUi.suspendCommon.more", "更多") }}
36
36
  </div>
37
37
  </div>
38
38
  <!-- 样式分类(icon&more) -->
@@ -46,7 +46,7 @@
46
46
  <div
47
47
  v-if="btnConfig.showFixed"
48
48
  class="u-icon-d"
49
- @click="clickDrawer({ type: 'pin', text: '固定按钮' }, 1)"
49
+ @click="clickDrawer({ type: 'pin', text: $jx3boxT('jx3boxUi.suspendCommon.pinButton', '固定按钮') }, 1)"
50
50
  >
51
51
  <img
52
52
  class="u-icon active"
@@ -60,7 +60,7 @@
60
60
  <div
61
61
  v-if="btnConfig.showCollect"
62
62
  class="u-icon-d"
63
- @click="clickDrawer({ type: 'collect', text: '收藏' }, 1)"
63
+ @click="clickDrawer({ type: 'collect', text: $jx3boxT('jx3boxUi.suspendCommon.collect', '收藏') }, 1)"
64
64
  >
65
65
  <img class="u-icon active" src="../assets/img/suspend/collect.svg" svg-inline v-if="!isCollect" />
66
66
  <img class="u-icon active" src="../assets/img/suspend/collect_slash.svg" svg-inline v-else />
@@ -72,14 +72,14 @@
72
72
  </div>
73
73
  <div class="m-more" v-if="btnConfig.showMore" @click="setMore">
74
74
  <!-- <img class="u-icon" src="../assets/img/suspend/more.svg" svg-inline /> -->
75
- 更多
75
+ {{ $jx3boxT("jx3boxUi.suspendCommon.more", "更多") }}
76
76
  </div>
77
77
  </div>
78
78
  <!-- 横向固定内容区域 -->
79
79
  <div class="m-pin-box" v-if="btnConfig.showPin && !btnConfig.showHome && !btnConfig.showIcon">
80
80
  <div class="u-item" v-for="(item, index) in fixList" :key="'fix' + index">
81
- <div class="u-text-r" v-if="item.type == 'text'">
82
- {{ item.title.match(/[\u3400-\u9FFF\uF900-\uFAFF]/)?.[0] || "固" }}
81
+ <div class="u-text-r" v-if="item.type == 'text'">
82
+ {{ item.title.match(/[\u3400-\u9FFF\uF900-\uFAFF]/)?.[0] || $jx3boxT("jx3boxUi.suspendCommon.pinShort", "固") }}
83
83
  </div>
84
84
  <img :src="item.imgUrl" class="u-icon" v-else />
85
85
  </div>
@@ -94,7 +94,7 @@
94
94
  v-model="drawer"
95
95
  :direction="drawerConfig.direction"
96
96
  :with-header="false"
97
- custom-class="u-drawer"
97
+ class="u-drawer"
98
98
  modal-class="p-drawer-suspend"
99
99
  :modal-append-to-body="false"
100
100
  append-to-body
@@ -119,7 +119,7 @@
119
119
  <div class="u-circle-top">
120
120
  <div v-if="fixList?.[0]">
121
121
  <div class="u-text-r" v-if="fixList?.[0]?.type == 'text'">
122
- {{ fixList?.[0]?.title.match(/[\u3400-\u9FFF\uF900-\uFAFF]/)?.[0] || "固" }}
122
+ {{ fixList?.[0]?.title.match(/[\u3400-\u9FFF\uF900-\uFAFF]/)?.[0] || $jx3boxT("jx3boxUi.suspendCommon.pinShort", "固") }}
123
123
  </div>
124
124
  <img :src="fixList?.[0]?.imgUrl" class="u-icon" v-else />
125
125
  </div>
@@ -131,7 +131,7 @@
131
131
  <div class="u-text-r" v-if="fixList?.[index + 1]?.type == 'text'">
132
132
  {{
133
133
  fixList?.[index + 1].title.match(/[\u3400-\u9FFF\uF900-\uFAFF]/)?.[0] ||
134
- "固"
134
+ $jx3boxT("jx3boxUi.suspendCommon.pinShort", "固")
135
135
  }}
136
136
  </div>
137
137
  <img :src="fixList?.[index + 1].imgUrl" class="u-icon" v-else />
@@ -214,28 +214,40 @@
214
214
  class="u-text"
215
215
  v-if="(areaKey === 'collect' && !isCollect) || (areaKey === 'rss' && !isSubscribe)"
216
216
  >
217
- {{ areaKey === "collect" ? "收藏" : "订阅" }}作品
217
+ {{
218
+ areaKey === "collect"
219
+ ? $jx3boxT("jx3boxUi.suspendCommon.collectWork", "收藏作品")
220
+ : $jx3boxT("jx3boxUi.suspendCommon.subscribeWork", "订阅作品")
221
+ }}
218
222
  </div>
219
223
  </div>
220
224
  <div class="u-collect-tips" v-if="areaKey === 'collect'">
221
- {{ isCollect ? "你已经收藏该作品" : "喜欢程度不够?可以试试添加到稍后再看" }}
225
+ {{
226
+ isCollect
227
+ ? $jx3boxT("jx3boxUi.suspendCommon.alreadyCollected", "你已经收藏该作品")
228
+ : $jx3boxT("jx3boxUi.suspendCommon.tryWatchLater", "喜欢程度不够?可以试试添加到稍后再看")
229
+ }}
222
230
  </div>
223
231
  <div class="u-collect-tips" v-if="areaKey === 'rss'">
224
- {{ isSubscribe ? "你已经订阅该作品" : "喜欢程度不够?可以试试添加到稍后再看" }}
232
+ {{
233
+ isSubscribe
234
+ ? $jx3boxT("jx3boxUi.suspendCommon.alreadySubscribed", "你已经订阅该作品")
235
+ : $jx3boxT("jx3boxUi.suspendCommon.tryWatchLater", "喜欢程度不够?可以试试添加到稍后再看")
236
+ }}
225
237
  </div>
226
238
  <div class="u-btn-box">
227
239
  <div class="u-btn collect" @click="collectOrSubscribe">
228
240
  {{
229
241
  areaKey === "collect"
230
242
  ? isCollect
231
- ? "取消收藏"
232
- : "收藏"
243
+ ? $jx3boxT("jx3boxUi.suspendCommon.cancelCollect", "取消收藏")
244
+ : $jx3boxT("jx3boxUi.suspendCommon.collect", "收藏")
233
245
  : isSubscribe
234
- ? "取消订阅"
235
- : "订阅"
236
- }}作品
246
+ ? $jx3boxT("jx3boxUi.suspendCommon.cancelSubscribe", "取消订阅")
247
+ : $jx3boxT("jx3boxUi.suspendCommon.subscribe", "订阅")
248
+ }}{{ $jx3boxT("jx3boxUi.suspendCommon.workSuffix", "作品") }}
237
249
  </div>
238
- <div class="u-btn" @click="laterOn">添加到稍后再看</div>
250
+ <div class="u-btn" @click="laterOn">{{ $jx3boxT("jx3boxUi.suspendCommon.addWatchLater", "添加到稍后再看") }}</div>
239
251
  </div>
240
252
  </div>
241
253
  </transition>
@@ -255,16 +267,16 @@
255
267
  v-if="fixIsActive && !fixIsFull"
256
268
  />
257
269
  <img src="../assets/img/suspend/report_100.svg" svg-inline v-if="fixIsFull" />
258
- <div class="u-text">{{ fixIsActive ? "取消固定" : "固定内容" }}</div>
270
+ <div class="u-text">{{ fixIsActive ? $jx3boxT("jx3boxUi.suspendCommon.cancelPin", "取消固定") : $jx3boxT("jx3boxUi.suspendCommon.pinContent", "固定内容") }}</div>
259
271
  </div>
260
272
  <div class="u-collect-tips" v-if="!fixIsActive && !fixIsEdit">
261
- 你可以随时在其他页面查看固定的内容
273
+ {{ $jx3boxT("jx3boxUi.suspendCommon.viewPinnedAnywhere", "你可以随时在其他页面查看固定的内容") }}
262
274
  </div>
263
- <div class="u-edit-title" v-if="fixIsEdit">固定内容</div>
275
+ <div class="u-edit-title" v-if="fixIsEdit">{{ $jx3boxT("jx3boxUi.suspendCommon.pinContent", "固定内容") }}</div>
264
276
  <div class="u-pin-box">
265
277
  <div class="u-item" v-if="!fixIsEdit">
266
278
  <div class="u-text-r" v-if="fixPageConfig.type == 'text'">
267
- {{ fixPageConfig.title.match(/[\u3400-\u9FFF\uF900-\uFAFF]/)?.[0] || "固" }}
279
+ {{ fixPageConfig.title.match(/[\u3400-\u9FFF\uF900-\uFAFF]/)?.[0] || $jx3boxT("jx3boxUi.suspendCommon.pinShort", "固") }}
268
280
  </div>
269
281
  <img :src="fixPageConfig.imgUrl" class="u-icon" v-else />
270
282
  <div class="u-text">{{ fixPageConfig.title }}</div>
@@ -277,7 +289,7 @@
277
289
  @click="fixDataClick(item)"
278
290
  >
279
291
  <div class="u-text-r" v-if="item.type == 'text'">
280
- {{ item.title.match(/[\u3400-\u9FFF\uF900-\uFAFF]/)?.[0] || "固" }}
292
+ {{ item.title.match(/[\u3400-\u9FFF\uF900-\uFAFF]/)?.[0] || $jx3boxT("jx3boxUi.suspendCommon.pinShort", "固") }}
281
293
  </div>
282
294
  <img :src="item.imgUrl" class="u-icon" v-else />
283
295
  <div class="u-text">{{ item.title }}</div>
@@ -295,14 +307,14 @@
295
307
  </div>
296
308
  </div>
297
309
  <div class="u-btn-box" v-if="!fixIsEdit">
298
- <div class="u-btn collect" @click="fixClick">确定</div>
310
+ <div class="u-btn collect" @click="fixClick">{{ $jx3boxT("jx3boxUi.common.confirm", "确定") }}</div>
299
311
  <!-- <div class="u-btn">编辑固定内容</div> -->
300
312
  </div>
301
- <div class="u-collect-tips" v-if="fixIsActive && !fixIsEdit">你可以在原页面再次将其固定</div>
313
+ <div class="u-collect-tips" v-if="fixIsActive && !fixIsEdit">{{ $jx3boxT("jx3boxUi.suspendCommon.pinAgain", "你可以在原页面再次将其固定") }}</div>
302
314
  <div class="u-collect-tips edit" v-if="fixIsEdit">
303
- 在支持固定的页面可以按
315
+ {{ $jx3boxT("jx3boxUi.suspendCommon.supportedPinPrefix", "在支持固定的页面可以按") }}
304
316
  <img src="../assets/img/suspend/pin_touchbar_24.svg" svg-inline class="u-icon" />
305
- 将页面固定
317
+ {{ $jx3boxT("jx3boxUi.suspendCommon.supportedPinSuffix", "将页面固定") }}
306
318
  </div>
307
319
  </div>
308
320
  </transition>
@@ -321,7 +333,7 @@
321
333
  v-if="iframeInfo?.url"
322
334
  class="u-iframe"
323
335
  />
324
- <span v-else>查找页面失败</span>
336
+ <span v-else>{{ $jx3boxT("jx3boxUi.suspendCommon.openFailed", "查找页面失败") }}</span>
325
337
  </div>
326
338
  </transition>
327
339
  </el-drawer>
@@ -357,9 +369,11 @@ import pinSlashTouchbar40 from "../assets/img/suspend/pin_slash_touchbar_40.svg"
357
369
  import collectTouchbar from "../assets/img/suspend/collect_touchbar.svg";
358
370
  import rssTouchbar from "../assets/img/suspend/rss_touchbar.svg";
359
371
  import lafterTouchbar from "../assets/img/suspend/lafter_touchbar.svg";
372
+ import i18nMixin from "../i18n/mixin";
360
373
 
361
374
  export default {
362
375
  name: "SuspendCommon",
376
+ mixins: [i18nMixin],
363
377
  props: {
364
378
  btnOptions: {
365
379
  type: Object,
@@ -399,24 +413,24 @@ export default {
399
413
  //弹窗type组合
400
414
  drawerType: {
401
415
  one: [
402
- { type: "search", text: "搜索内容", icon: searchTouchbar },
416
+ { type: "search", text: this.$jx3boxT("jx3boxUi.suspendCommon.searchContent", "搜索内容"), icon: searchTouchbar },
403
417
  {
404
418
  type: "pin",
405
- text: "固定本页",
419
+ text: this.$jx3boxT("jx3boxUi.suspendCommon.pinCurrent", "固定本页"),
406
420
  icon: pinTouchbar,
407
- text_slash: "取消固定",
421
+ text_slash: this.$jx3boxT("jx3boxUi.suspendCommon.cancelPin", "取消固定"),
408
422
  icon_slash: pinSlashTouchbar40,
409
423
  },
410
- { type: "fix", text: "查看固定", icon: null, isSlot: true },
424
+ { type: "fix", text: this.$jx3boxT("jx3boxUi.suspendCommon.viewPinned", "查看固定"), icon: null, isSlot: true },
411
425
  ],
412
426
  two: [
413
- { type: "collect", text: "收藏作品", icon: collectTouchbar },
414
- { type: "rss", text: "订阅作品", icon: rssTouchbar },
415
- { type: "laterOn", text: "稍后再看", icon: lafterTouchbar },
427
+ { type: "collect", text: this.$jx3boxT("jx3boxUi.suspendCommon.collectWork", "收藏作品"), icon: collectTouchbar },
428
+ { type: "rss", text: this.$jx3boxT("jx3boxUi.suspendCommon.subscribeWork", "订阅作品"), icon: rssTouchbar },
429
+ { type: "laterOn", text: this.$jx3boxT("jx3boxUi.suspendCommon.watchLater", "稍后再看"), icon: lafterTouchbar },
416
430
  ],
417
431
  three: [
418
- { type: "user", text: "作者", isSlot: true },
419
- { type: "report", text: "举报" },
432
+ { type: "user", text: this.$jx3boxT("jx3boxUi.suspendCommon.author", "作者"), isSlot: true },
433
+ { type: "report", text: this.$jx3boxT("jx3boxUi.suspendCommon.report", "举报") },
420
434
  ],
421
435
  },
422
436
  fixList: [],
@@ -691,7 +705,7 @@ export default {
691
705
  title: conf.title,
692
706
  };
693
707
  later(params).then((res) => {
694
- ElMessage.success("已添加稍后再看");
708
+ ElMessage.success(this.$jx3boxT("jx3boxUi.suspendCommon.addedWatchLater", "已添加稍后再看"));
695
709
  this.areaKey = "home";
696
710
  this.$emit("laterOn");
697
711
  });
@@ -2,27 +2,27 @@
2
2
  <div class="c-author-fans" v-if="list && list.length">
3
3
  <div class="u-label">
4
4
  <img svg-inline src="../../assets/img/leftsidebar/fans.svg" />
5
- <span>粉丝榜</span>
5
+ <span>{{ $jx3boxT("jx3boxUi.authorFans.title", "粉丝榜") }}</span>
6
6
  </div>
7
7
  <div class="f-avatar" v-if="list && list.length">
8
8
  <el-tooltip
9
9
  class="item"
10
10
  effect="dark"
11
- :content="'累计打赏' + item.summary.toString() + '盒币'"
11
+ :content="$jx3boxT('jx3boxUi.authorFans.summary', '累计打赏{count}盒币', { count: item.summary.toString() })"
12
12
  placement="top"
13
13
  v-for="item in list"
14
14
  :key="item.pay_user_id"
15
15
  >
16
16
  <a class="u-fan" :href="authorLink(item.user_id)"
17
17
  ><el-avatar class="u-avatar" shape="circle" :size="20" :src="showAvatar(item.user_info.avatar)"
18
- ><i class="el-icon-s-custom"></i></el-avatar
18
+ ><el-icon><Avatar></Avatar></el-icon></el-avatar
19
19
  ></a>
20
20
  </el-tooltip>
21
21
  </div>
22
22
  <div class="f-bottom">
23
- 粉丝数: <span class="u-count">{{ fans_count }}</span
23
+ {{ $jx3boxT("jx3boxUi.authorFans.fansCount", "粉丝数: {count}", { count: fans_count }) }}
24
24
  ><template v-if="boxcoin_count"
25
- >,累计收到盒币打赏: <span class="u-count">{{ boxcoin_count }}</span></template
25
+ >{{ $jx3boxT("jx3boxUi.authorFans.boxcoinCount", ",累计收到盒币打赏: {count}", { count: boxcoin_count }) }}</template
26
26
  >
27
27
  </div>
28
28
  </div>
@@ -31,8 +31,10 @@
31
31
  <script>
32
32
  import { getFansList, getSummary } from "../../service/author";
33
33
  import { showAvatar, authorLink } from "@jx3box/jx3box-common/js/utils";
34
+ import i18nMixin from "../../i18n/mixin";
34
35
  export default {
35
36
  name: "AuthorFans",
37
+ mixins: [i18nMixin],
36
38
  props: {
37
39
  uid: {
38
40
  type: [Number, String],
@@ -33,8 +33,10 @@
33
33
  <script>
34
34
  import { follow, unfollow, getFansCount } from "../../service/follow";
35
35
  import User from "@jx3box/jx3box-common/js/user";
36
+ import i18nMixin from "../../i18n/mixin";
36
37
  export default {
37
38
  name: "AuthorFollow",
39
+ mixins: [i18nMixin],
38
40
  props: {
39
41
  uid: {
40
42
  type: [Number, String],
@@ -50,7 +52,9 @@ export default {
50
52
  },
51
53
  computed: {
52
54
  btnText() {
53
- return this.isFollow ? "已粉" : "关注";
55
+ return this.isFollow
56
+ ? this.$jx3boxT("jx3boxUi.authorFollow.followed", "已粉")
57
+ : this.$jx3boxT("jx3boxUi.authorFollow.follow", "关注");
54
58
  },
55
59
  btnType() {
56
60
  return this.isFollow ? "info" : "warning";
@@ -64,7 +68,7 @@ export default {
64
68
  // },
65
69
  // },
66
70
  {
67
- label: "取消关注",
71
+ label: this.$jx3boxT("jx3boxUi.authorFollow.unfollow", "取消关注"),
68
72
  action: () => {
69
73
  this.unfollow();
70
74
  },
@@ -106,7 +110,7 @@ export default {
106
110
  }
107
111
  follow(this.uid)
108
112
  .then(() => {
109
- this.$message.success("关注成功");
113
+ this.$message.success(this.$jx3boxT("jx3boxUi.authorFollow.followSuccess", "关注成功"));
110
114
  this.isFollow = true;
111
115
  this.loadFans();
112
116
  })
@@ -116,14 +120,17 @@ export default {
116
120
  },
117
121
  // 取消关注
118
122
  unfollow() {
119
- this.$confirm("确定不再关注此人?", "提示", {
120
- confirmButtonText: "确定",
121
- cancelButtonText: "取消",
123
+ this.$confirm(
124
+ this.$jx3boxT("jx3boxUi.authorFollow.confirmUnfollow", "确定不再关注此人?"),
125
+ this.$jx3boxT("jx3boxUi.common.tip", "提示"),
126
+ {
127
+ confirmButtonText: this.$jx3boxT("jx3boxUi.common.confirm", "确定"),
128
+ cancelButtonText: this.$jx3boxT("jx3boxUi.common.cancel", "取消"),
122
129
  type: "warning",
123
130
  }).then(() => {
124
131
  unfollow(this.uid)
125
132
  .then(() => {
126
- this.$message.success("取关成功");
133
+ this.$message.success(this.$jx3boxT("jx3boxUi.authorFollow.unfollowSuccess", "取关成功"));
127
134
  this.isFollow = false;
128
135
  this.loadFans();
129
136
  })
@@ -8,33 +8,39 @@
8
8
  :title="btnTitle"
9
9
  plain
10
10
  size="small"
11
- >赠礼</el-button
11
+ >{{ $jx3boxT("jx3boxUi.authorGift.button", "赠礼") }}</el-button
12
12
  >
13
13
 
14
- <el-dialog title="赠礼" v-model="visible" :append-to-body="true" class="c-author-gift-dialog" v-if="status">
14
+ <el-dialog
15
+ :title="$jx3boxT('jx3boxUi.authorGift.dialogTitle', '赠礼')"
16
+ v-model="visible"
17
+ :append-to-body="true"
18
+ class="c-author-gift-dialog"
19
+ v-if="status"
20
+ >
15
21
  <div class="u-content">
16
22
  <div class="u-left">
17
- <em class="u-label">🌟 金箔</em>
23
+ <em class="u-label">🌟 {{ $jx3boxT("jx3boxUi.authorGift.leaf", "金箔") }}</em>
18
24
  <b>{{ left }}</b>
19
- <a class="u-charge" :href="chargeLink" target="_blank">[充值]</a>
25
+ <a class="u-charge" :href="chargeLink" target="_blank">[{{ $jx3boxT("jx3boxUi.authorGift.recharge", "充值") }}]</a>
20
26
  </div>
21
27
  <div class="u-list">
22
- <em class="u-label">❤️ 赠送</em>
28
+ <em class="u-label">❤️ {{ $jx3boxT("jx3boxUi.authorGift.give", "赠送") }}</em>
23
29
  <div class="u-points">
24
30
  <el-radio-group v-model="count">
25
31
  <el-radio :value="item" v-for="item in fitPoints" :key="item" border>
26
32
  <b>{{ item }}</b
27
- >金箔
33
+ >{{ $jx3boxT("jx3boxUi.authorGift.leaf", "金箔") }}
28
34
  </el-radio>
29
35
  </el-radio-group>
30
36
  </div>
31
37
  </div>
32
38
  <div class="u-msg">
33
- <em class="u-label">📝 寄语</em>
39
+ <em class="u-label">📝 {{ $jx3boxT("jx3boxUi.authorGift.remark", "寄语") }}</em>
34
40
  <div class="u-input">
35
41
  <el-input
36
42
  v-model="remark"
37
- placeholder="请输入寄语(必填)"
43
+ :placeholder="$jx3boxT('jx3boxUi.authorGift.remarkPlaceholder', '请输入寄语(必填)')"
38
44
  :minlength="2"
39
45
  :maxlength="30"
40
46
  show-word-limit
@@ -44,9 +50,9 @@
44
50
  </div>
45
51
  <template #footer>
46
52
  <span class="dialog-footer">
47
- <el-button @click="visible = false">取 消</el-button>
53
+ <el-button @click="visible = false">{{ $jx3boxT("jx3boxUi.common.cancel", "取消") }}</el-button>
48
54
  <el-button type="primary" @click="submit" :disabled="!ready || loading" :loading="loading"
49
- >确 定</el-button
55
+ >{{ $jx3boxT("jx3boxUi.common.confirm", "确定") }}</el-button
50
56
  >
51
57
  </span>
52
58
  </template>
@@ -57,8 +63,10 @@
57
63
  <script>
58
64
  import User from "@jx3box/jx3box-common/js/user";
59
65
  import { sendCny, checkCnyStatus, checkGiftStatus } from "../../service/thx";
66
+ import i18nMixin from "../../i18n/mixin";
60
67
  export default {
61
68
  name: "AuthorGift",
69
+ mixins: [i18nMixin],
62
70
  props: {
63
71
  uid: {
64
72
  type: [Number, String],
@@ -77,7 +85,7 @@ export default {
77
85
  chargeLink: "/vip/cny?redirect=" + location.href,
78
86
 
79
87
  count: 0, //打赏数量
80
- remark: "辛苦,感谢!",
88
+ remark: this.$jx3boxT("jx3boxUi.authorGift.defaultRemark", "辛苦,感谢!"),
81
89
  };
82
90
  },
83
91
  computed: {
@@ -96,9 +104,9 @@ export default {
96
104
  },
97
105
  btnTitle: function () {
98
106
  if (this.isSelf) {
99
- return "不能给自己赠送礼物";
107
+ return this.$jx3boxT("jx3boxUi.authorGift.selfDisabled", "不能给自己赠送礼物");
100
108
  } else if (!this.status) {
101
- return "作者没有开启接受礼物";
109
+ return this.$jx3boxT("jx3boxUi.authorGift.statusDisabled", "作者没有开启接受礼物");
102
110
  }
103
111
  return "";
104
112
  },
@@ -131,7 +139,7 @@ export default {
131
139
  // 状态轮询
132
140
  const loading = this.$loading({
133
141
  lock: true,
134
- text: "正在处理中",
142
+ text: this.$jx3boxT("jx3boxUi.authorGift.processing", "正在处理中"),
135
143
  spinner: "el-icon-loading",
136
144
  background: "rgba(255, 255, 255, 0.8)",
137
145
  });
@@ -154,14 +162,14 @@ export default {
154
162
  this.visible = false;
155
163
  this.loading = false;
156
164
  this.$message({
157
- message: "赠送成功",
165
+ message: this.$jx3boxT("jx3boxUi.authorGift.success", "赠送成功"),
158
166
  type: "success",
159
167
  });
160
168
 
161
169
  // 结算与重置
162
170
  this.left = this.left - this.count;
163
171
  this.count = 100;
164
- this.remark = "辛苦,感谢!";
172
+ this.remark = this.$jx3boxT("jx3boxUi.authorGift.defaultRemark", "辛苦,感谢!");
165
173
  } else {
166
174
  console.info(`[AUTHOR.CNY]重新轮询`);
167
175
  }
@@ -180,7 +188,7 @@ export default {
180
188
  // 关闭加载状态 & 消息提醒
181
189
  this.visible = false;
182
190
  this.loading = false;
183
- this.$message("交易繁忙,请稍后再试");
191
+ this.$message(this.$jx3boxT("jx3boxUi.authorGift.busy", "交易繁忙,请稍后再试"));
184
192
  }
185
193
  }, 1000);
186
194
  });
@@ -4,20 +4,32 @@
4
4
  <Avatar class="u-avatar" :uid="uid" :url="data.user_avatar" size="s" :frame="data.user_avatar_frame" />
5
5
  <div class="u-info">
6
6
  <div class="u-name">
7
- <el-tooltip class="item" effect="dark" content="签约作者" placement="top" v-if="isSuperAuthor">
7
+ <el-tooltip
8
+ class="item"
9
+ effect="dark"
10
+ :content="$jx3boxT('jx3boxUi.authorInfo.superAuthor', '签约作者')"
11
+ placement="top"
12
+ v-if="isSuperAuthor"
13
+ >
8
14
  <a class="u-superauthor" href="/about/superauthor" target="_blank">
9
15
  <img :src="super_author_icon" alt="superauthor" />
10
16
  </a>
11
17
  </el-tooltip>
12
18
  <a class="u-displayname" :href="authorLink(uid)" target="_blank" v-if="!anonymous">
13
- {{ data.display_name || "未知" }}
19
+ {{ data.display_name || $jx3boxT("jx3boxUi.authorInfo.unknown", "未知") }}
14
20
  </a>
15
- <span class="u-displayname u-anonymous" v-else>神秘侠士</span>
21
+ <span class="u-displayname u-anonymous" v-else>{{
22
+ $jx3boxT("jx3boxUi.authorInfo.mysterious", "神秘侠士")
23
+ }}</span>
16
24
  </div>
17
25
  <div class="u-extend">
18
26
  <el-tooltip class="item" effect="dark" placement="top" v-if="!anonymous">
19
27
  <template #content>
20
- <span class="u-tips">经验值:{{ data.experience }}</span>
28
+ <span class="u-tips">{{
29
+ $jx3boxT("jx3boxUi.authorInfo.experience", "经验值:{value}", {
30
+ value: data.experience,
31
+ })
32
+ }}</span>
21
33
  </template>
22
34
  <a
23
35
  class="u-level"
@@ -37,7 +49,13 @@
37
49
  target="_blank"
38
50
  >Lv.{{ level }}</a
39
51
  >
40
- <el-tooltip class="item" effect="dark" :content="vipTypeTitle" placement="top" v-if="isVip && !anonymous">
52
+ <el-tooltip
53
+ class="item"
54
+ effect="dark"
55
+ :content="vipTypeTitle"
56
+ placement="top"
57
+ v-if="isVip && !anonymous"
58
+ >
41
59
  <a class="u-vip" href="/vip/premium?from=sidebar_author" target="_blank">
42
60
  <i class="i-icon-vip on">{{ vipType }}</i>
43
61
  </a>
@@ -58,10 +76,12 @@ import User from "@jx3box/jx3box-common/js/user";
58
76
  import { getUserInfo } from "../../service/author";
59
77
  import Avatar from "./Avatar.vue";
60
78
  import Honor from "./AuthorHonor.vue";
79
+ import i18nMixin from "../../i18n/mixin";
61
80
 
62
81
  const { __imgPath, __userLevelColor } = JX3BOX;
63
82
  export default {
64
83
  name: "AuthorInfo",
84
+ mixins: [i18nMixin],
65
85
  props: {
66
86
  uid: {
67
87
  type: [Number, String],
@@ -94,7 +114,9 @@ export default {
94
114
  return this.data?.is_pro ? "PRO" : "PRE";
95
115
  },
96
116
  vipTypeTitle: function () {
97
- return this.data?.is_pro ? "专业版会员" : "高级版会员";
117
+ return this.data?.is_pro
118
+ ? this.$jx3boxT("jx3boxUi.authorInfo.proVip", "专业版会员")
119
+ : this.$jx3boxT("jx3boxUi.authorInfo.preVip", "高级版会员");
98
120
  },
99
121
  isVip: function () {
100
122
  return this.data?.is_pro || this.data?.is_pre;
@@ -135,22 +157,35 @@ export default {
135
157
  <style lang="less">
136
158
  .c-author-info {
137
159
  .u-author {
138
- .clearfix;
139
- .db;
160
+ .flex(y);
161
+ gap:15px;
162
+ // .db;
140
163
  .mb(10px);
141
164
  .pr;
142
165
  }
143
166
  .u-avatar {
144
- .fl;
145
- .mr(15px);
167
+ // .fl;
168
+ // .mr(15px);
146
169
  .size(68px);
170
+ flex-shrink: 0;
171
+ }
172
+ .u-info {
173
+ .pr;
174
+ // top: -4px;
175
+ // .h(68px);
176
+ display: flex;
177
+ flex-direction: column;
178
+ justify-content: center;
179
+ gap:8px;
147
180
  }
148
181
  .u-name {
149
182
  .flex;
150
183
  align-items: center;
184
+ max-width: 120px;
185
+ .break;
151
186
  }
152
187
  .u-displayname {
153
- .lh(2.2);
188
+ .lh(1.2);
154
189
  .bold;
155
190
  color: @darkblue;
156
191
  .nobreak;
@@ -175,14 +210,6 @@ export default {
175
210
  }
176
211
  }
177
212
 
178
- .u-info {
179
- .pr;
180
- top: -4px;
181
- .h(68px);
182
- display: flex;
183
- flex-direction: column;
184
- justify-content: center;
185
- }
186
213
  .u-bio {
187
214
  .fz(12px, 2);
188
215
  .break(3);
@@ -25,7 +25,7 @@
25
25
  :class="'u-link__' + data.tv_type"
26
26
  :href="tv_link"
27
27
  target="_blank"
28
- :title="`房间号:${data.tv_id}`"
28
+ :title="$jx3boxT('jx3boxUi.authorLink.roomId', '房间号:{id}', { id: data.tv_id })"
29
29
  >
30
30
  <img :src="getIcon(data.tv_type)" />
31
31
  </a>
@@ -35,9 +35,11 @@
35
35
  <script>
36
36
  import * as utilModule from "@jx3box/jx3box-common/js/utils";
37
37
  const { tvLink } = utilModule;
38
+ import i18nMixin from "../../i18n/mixin";
38
39
 
39
40
  export default {
40
41
  name: "AuthorLink",
42
+ mixins: [i18nMixin],
41
43
  props: {
42
44
  data: {
43
45
  type: Object,