@jx3box/jx3box-ui 2.0.5 → 2.0.7

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 (241) hide show
  1. package/.storybook/preview.js +22 -13
  2. package/.storybook/storybookMocks.js +214 -0
  3. package/README.md +39 -43
  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/interact/qrcode.less +69 -0
  10. package/assets/css/single/author.less +15 -10
  11. package/assets/css/single/cms-single.less +1 -0
  12. package/assets/css/single/thx.less +34 -11
  13. package/assets/css/wiki/wiki-comments.less +176 -0
  14. package/assets/css/wiki/wiki-panel.less +177 -0
  15. package/assets/css/wiki/wiki-revisions.less +62 -0
  16. package/assets/data/nav.json +344 -10
  17. package/assets/img/comment/comment.svg +1 -1
  18. package/assets/img/comment/heart_1.svg +1 -1
  19. package/assets/img/comment/hide.svg +1 -1
  20. package/assets/img/leftsidebar/medal.svg +1 -1
  21. package/assets/img/leftsidebar/post.svg +27 -46
  22. package/i18n/messages/en-US.js +357 -22
  23. package/i18n/messages/vi.js +350 -22
  24. package/i18n/messages/zh-CN.js +469 -20
  25. package/i18n/messages/zh-TW.js +350 -22
  26. package/index.js +19 -7
  27. package/package.json +8 -5
  28. package/service/cms.js +22 -0
  29. package/service/commit-history.js +18 -0
  30. package/service/community.js +60 -0
  31. package/service/fav.js +5 -6
  32. package/src/App.vue +210 -80
  33. package/src/Breadcrumb.vue +24 -11
  34. package/src/CommonFooter.vue +2 -2
  35. package/src/Footer.vue +13 -5
  36. package/src/LeftSideToggle.vue +10 -3
  37. package/src/LeftSidebar.vue +19 -5
  38. package/src/Main.vue +9 -2
  39. package/src/RightSidebar.vue +12 -3
  40. package/src/SuspendCommon.vue +52 -38
  41. package/src/author/AuthorFans.vue +7 -5
  42. package/src/author/AuthorFollow.vue +14 -7
  43. package/src/author/AuthorGift.vue +25 -17
  44. package/src/author/AuthorInfo.vue +46 -19
  45. package/src/author/AuthorLink.vue +3 -1
  46. package/src/author/AuthorMedals.vue +5 -2
  47. package/src/author/AuthorPosts.vue +31 -13
  48. package/src/author/AuthorRss.vue +7 -3
  49. package/src/author/AuthorTeams.vue +3 -1
  50. package/src/author/UserPop.vue +29 -17
  51. package/src/bread/Admin.vue +55 -32
  52. package/src/bread/AdminDirectMessage.vue +15 -8
  53. package/src/bread/AdminDrop.vue +124 -45
  54. package/src/bread/CommunityAdmin.vue +527 -0
  55. package/src/bread/DesignTask.vue +30 -26
  56. package/src/bread/ListAdmin.vue +199 -0
  57. package/src/bread/MigrateCommunity.vue +192 -0
  58. package/src/bread/MoveToCommunityDialog.vue +234 -0
  59. package/src/comment/Avatar.vue +18 -24
  60. package/src/comment/CommentContent.vue +57 -37
  61. package/src/comment/CommentContentSimple.vue +61 -63
  62. package/src/comment/CommentInputForm.vue +45 -34
  63. package/src/comment/CommentWithReply.vue +9 -6
  64. package/src/comment/QuickReply.vue +5 -1
  65. package/src/comment/ReplyForReply.vue +6 -4
  66. package/src/comment/ReplyList.vue +28 -18
  67. package/src/comment/Upload.vue +24 -6
  68. package/src/filters/clientBy.vue +10 -8
  69. package/src/filters/markBy.vue +35 -31
  70. package/src/filters/menuBy.vue +20 -22
  71. package/src/filters/orderBy.vue +17 -11
  72. package/src/filters/tagBy.vue +4 -2
  73. package/src/filters/topicBy.vue +12 -10
  74. package/src/filters/versionBy.vue +5 -3
  75. package/src/filters/zlpBy.vue +29 -25
  76. package/src/footer/copyright.vue +5 -5
  77. package/src/footer/links.vue +2 -2
  78. package/src/footer/official.vue +1 -1
  79. package/src/footer/resource.vue +6 -6
  80. package/src/header/alternate.vue +35 -18
  81. package/src/header/asset.vue +9 -19
  82. package/src/header/box.vue +20 -8
  83. package/src/header/box2.vue +16 -9
  84. package/src/header/client.vue +7 -7
  85. package/src/header/lang.vue +41 -6
  86. package/src/header/logo.vue +2 -3
  87. package/src/header/manage.vue +2 -2
  88. package/src/header/message.vue +3 -3
  89. package/src/header/nav.vue +26 -23
  90. package/src/header/publish.vue +2 -2
  91. package/src/header/search.vue +2 -2
  92. package/src/header/shop.vue +2 -2
  93. package/src/header/user.vue +4 -4
  94. package/src/header/userInfo.vue +22 -24
  95. package/src/header/vip.vue +2 -2
  96. package/src/interact/BoxcoinAdmin.vue +30 -16
  97. package/src/interact/BoxcoinRecords.vue +28 -11
  98. package/src/interact/BoxcoinUser.vue +33 -17
  99. package/src/interact/Fav.vue +5 -1
  100. package/src/interact/Homework.vue +317 -0
  101. package/src/interact/Like.vue +4 -2
  102. package/src/interact/QRcode.vue +104 -0
  103. package/src/interact/Rss.vue +10 -4
  104. package/src/interact/Share.vue +18 -19
  105. package/src/interact/WatchLater.vue +5 -1
  106. package/src/main.js +1 -0
  107. package/src/single/Author.vue +5 -1
  108. package/src/single/CmsSingle.vue +29 -15
  109. package/src/single/Collection.vue +36 -26
  110. package/src/single/Comment.vue +19 -13
  111. package/src/single/Creators.vue +5 -3
  112. package/src/single/PostCollection.vue +158 -0
  113. package/src/single/PostDirectory.vue +0 -126
  114. package/src/single/PostGuide.vue +93 -0
  115. package/src/single/PostHeader.vue +39 -17
  116. package/src/single/PostTopic.vue +3 -3
  117. package/src/single/PostVersion.vue +219 -0
  118. package/src/single/RightAffix.vue +160 -0
  119. package/src/single/SimpleThx.vue +4 -2
  120. package/src/single/Thx.vue +14 -2
  121. package/src/single/VersionDialog.vue +238 -0
  122. package/src/stories/components/StoryPropsTable.vue +137 -0
  123. package/src/stories/filters/FilterGallery.stories.js +110 -0
  124. package/src/stories/filters/clientBy.stories.js +24 -0
  125. package/src/stories/filters/markBy.stories.js +6 -0
  126. package/src/stories/filters/menuBy.stories.js +6 -0
  127. package/src/stories/filters/orderBy.stories.js +6 -0
  128. package/src/stories/filters/tagBy.stories.js +6 -0
  129. package/src/stories/filters/topicBy.stories.js +6 -0
  130. package/src/stories/filters/versionBy.stories.js +6 -0
  131. package/src/stories/filters/zlpBy.stories.js +6 -0
  132. package/src/stories/interact/QRcode.stories.js +59 -0
  133. package/src/stories/layout/BaseShell.stories.js +38 -0
  134. package/src/stories/layout/Breadcrumb.stories.js +40 -0
  135. package/src/stories/layout/CommonFooter.stories.js +1 -1
  136. package/src/stories/layout/CommonHeader.stories.js +1 -1
  137. package/src/stories/layout/LeftSideToggle.stories.js +78 -0
  138. package/src/stories/layout/LeftSidebar.stories.js +40 -0
  139. package/src/stories/layout/Main.stories.js +41 -0
  140. package/src/stories/layout/RightSidebar.stories.js +36 -0
  141. package/src/stories/layout/StorybookShell.vue +271 -0
  142. package/src/stories/layout/SuspendCommon.stories.js +67 -0
  143. package/src/stories/layout/SuspendCommonStage.vue +143 -0
  144. package/src/stories/mockData.js +369 -0
  145. package/src/stories/other/UserPop.stories.js +51 -0
  146. package/src/stories/single/Author.stories.js +19 -0
  147. package/src/stories/single/AuthorStoryStage.vue +103 -0
  148. package/src/stories/single/CmsSingle.stories.js +19 -0
  149. package/src/stories/single/CmsSingleStoryStage.vue +118 -0
  150. package/src/stories/single/Collection.stories.js +34 -0
  151. package/src/stories/single/Comment.stories.js +36 -0
  152. package/src/stories/single/Creators.stories.js +34 -0
  153. package/src/stories/single/PostCollection.stories.js +34 -0
  154. package/src/stories/single/PostDirectory.stories.js +31 -0
  155. package/src/stories/single/PostGuide.stories.js +47 -0
  156. package/src/stories/single/PostHeader.stories.js +39 -0
  157. package/src/stories/single/PostVersion.stories.js +41 -0
  158. package/src/stories/single/RightAffix.stories.js +84 -0
  159. package/src/stories/single/SimpleThx.stories.js +39 -0
  160. package/src/stories/single/SingleGallery.stories.js +207 -0
  161. package/src/stories/single/Thx.stories.js +38 -0
  162. package/src/stories/wiki/GamePrice.stories.js +64 -0
  163. package/src/stories/wiki/WikiComments.stories.js +58 -0
  164. package/src/stories/wiki/WikiPanel.stories.js +69 -0
  165. package/src/stories/wiki/WikiRevisions.stories.js +47 -0
  166. package/src/wiki/GamePrice.vue +107 -0
  167. package/src/wiki/WikiComment.vue +153 -0
  168. package/src/wiki/WikiComments.vue +206 -0
  169. package/src/wiki/WikiPanel.vue +121 -0
  170. package/src/wiki/WikiRevisions.vue +125 -0
  171. package/vue.config.js +2 -12
  172. package/assets/css/common/bottom.less +0 -25
  173. package/assets/css/editor/article.less +0 -36
  174. package/assets/css/editor/combo.less +0 -362
  175. package/assets/css/editor/resource.less +0 -399
  176. package/assets/css/editor/tinymce.less +0 -100
  177. package/assets/css/editor/upload.less +0 -136
  178. package/assets/css/module/author.less +0 -231
  179. package/assets/css/module/buff.less +0 -88
  180. package/assets/css/module/directory.less +0 -165
  181. package/assets/css/module/icon.less +0 -25
  182. package/assets/css/module/item.less +0 -279
  183. package/assets/css/module/item_simple.less +0 -58
  184. package/assets/css/module/jx3_element.less +0 -5
  185. package/assets/css/module/macro.less +0 -89
  186. package/assets/css/module/npc.less +0 -265
  187. package/assets/css/module/resource.less +0 -93
  188. package/assets/css/module/skill.less +0 -74
  189. package/assets/css/module/talent.less +0 -495
  190. package/assets/js/a.js +0 -46
  191. package/assets/js/code.js +0 -13
  192. package/assets/js/combo.js +0 -40
  193. package/assets/js/directory.js +0 -114
  194. package/assets/js/filter2.js +0 -186
  195. package/assets/js/fold.js +0 -11
  196. package/assets/js/gallery.js +0 -14
  197. package/assets/js/hljs_languages.js +0 -177
  198. package/assets/js/iframe.js +0 -38
  199. package/assets/js/img.js +0 -23
  200. package/assets/js/item/attribute_percent.js +0 -88
  201. package/assets/js/item/bind.js +0 -18
  202. package/assets/js/item/border.js +0 -19
  203. package/assets/js/item/border_quest.js +0 -12
  204. package/assets/js/item/color.js +0 -25
  205. package/assets/js/item/hljs_languages.js +0 -177
  206. package/assets/js/item/icon_url.js +0 -15
  207. package/assets/js/item/second_format.js +0 -19
  208. package/assets/js/jx3_element.js +0 -73
  209. package/assets/js/katex.js +0 -181
  210. package/assets/js/macro.js +0 -16
  211. package/assets/js/nextpage.js +0 -4
  212. package/assets/js/pswp.js +0 -67
  213. package/assets/js/pswp_template.js +0 -66
  214. package/assets/js/pz_iframe.js +0 -30
  215. package/assets/js/qixue.js +0 -28
  216. package/assets/js/renderImgPreview.js +0 -18
  217. package/assets/js/script.js +0 -6
  218. package/assets/js/stat.js +0 -107
  219. package/assets/js/talent2.js +0 -21
  220. package/assets/js/tex-mml-chtml.js +0 -36310
  221. package/assets/js/voice.js +0 -238
  222. package/assets/js/xss.js +0 -130
  223. package/src/editor/Article.vue +0 -230
  224. package/src/editor/BoxResource.vue +0 -441
  225. package/src/editor/Resource.vue +0 -623
  226. package/src/editor/Tinymce.vue +0 -204
  227. package/src/editor/Upload.vue +0 -277
  228. package/src/editor/UploadAlum.vue +0 -176
  229. package/src/editor/UploadBanner.vue +0 -156
  230. package/src/editor/components/Author.vue +0 -322
  231. package/src/editor/components/Avatar.vue +0 -95
  232. package/src/editor/components/Buff.vue +0 -80
  233. package/src/editor/components/Combo.vue +0 -259
  234. package/src/editor/components/Equip.vue +0 -299
  235. package/src/editor/components/GameText.vue +0 -242
  236. package/src/editor/components/Item.vue +0 -325
  237. package/src/editor/components/ItemSimple.vue +0 -134
  238. package/src/editor/components/Medal.vue +0 -43
  239. package/src/editor/components/Npc.vue +0 -215
  240. package/src/editor/components/PostAuthor.vue +0 -102
  241. package/src/editor/components/Skill.vue +0 -71
@@ -2,12 +2,12 @@
2
2
  <div
3
3
  class="c-header-logo"
4
4
  @click="toggleBox($event)"
5
- :title="$jx3boxT('jx3boxUi.header.expandBoxMatrix', '点击展开魔盒矩阵')"
5
+ :title="$jx3boxT('jx3boxUi.commonHeader.expandBoxMatrix', '点击展开魔盒矩阵')"
6
6
  >
7
7
  <i class="u-pic" id="c-header-logo">
8
8
  <img svg-inline src="../../assets/img/common/logo.svg" alt="JX3BOX" />
9
9
  </i>
10
- <span class="u-txt" :class="{ on: isIndex }" href="/">{{ $jx3boxT("jx3boxUi.header.box", "魔盒") }}</span>
10
+ <span class="u-txt" :class="{ on: isIndex }" href="/">{{ $jx3boxT("jx3boxUi.commonHeader.box", "魔盒") }}</span>
11
11
  </div>
12
12
  </template>
13
13
 
@@ -30,7 +30,6 @@ export default {
30
30
  },
31
31
  computed: {},
32
32
  methods: {
33
- // TODO: 主页和魔盒矩阵的切换
34
33
  // 盒子
35
34
  toggleBox: function (e) {
36
35
  e.stopPropagation();
@@ -7,7 +7,7 @@
7
7
  class="u-add"
8
8
  svg-inline
9
9
  src="../../assets/img/common/manage.svg"
10
- :alt="$jx3boxT('jx3boxUi.header.manageCenter', '扩展中心')"
10
+ :alt="$jx3boxT('jx3boxUi.commonHeader.manageCenter', '扩展中心')"
11
11
  />
12
12
  </span>
13
13
  <ul class="u-menu u-pop-content">
@@ -87,7 +87,7 @@ export default {
87
87
  },
88
88
  methods: {
89
89
  getPanelLabel(item) {
90
- if (item?.key) return this.$jx3boxT(`jx3boxUi.header.panel.${item.key}`, item.label || item.key);
90
+ if (item?.key) return this.$jx3boxT(`jx3boxUi.commonHeader.panel.${item.key}`, item.label || item.key);
91
91
  return item?.label || "";
92
92
  },
93
93
  loadPanel: function () {
@@ -2,7 +2,7 @@
2
2
  <div class="c-header-msg" id="c-header-msg">
3
3
  <el-tooltip
4
4
  effect="dark"
5
- :content="$jx3boxT('jx3boxUi.header.messageCenter', '消息中心')"
5
+ :content="$jx3boxT('jx3boxUi.commonHeader.messageCenter', '消息中心')"
6
6
  placement="bottom"
7
7
  popper-class="c-header-tooltip"
8
8
  >
@@ -13,7 +13,7 @@
13
13
  <img
14
14
  svg-inline
15
15
  src="../../assets/img/common/bell.svg"
16
- :alt="$jx3boxT('jx3boxUi.header.messageCenter', '消息中心')"
16
+ :alt="$jx3boxT('jx3boxUi.commonHeader.messageCenter', '消息中心')"
17
17
  />
18
18
  </i>
19
19
  </a>
@@ -80,7 +80,7 @@ export default {
80
80
  border-radius: 50%;
81
81
  position: absolute;
82
82
  right: -5px;
83
- top: -6px;
83
+ top: -2px;
84
84
  .z(1);
85
85
  }
86
86
  }
@@ -10,7 +10,7 @@
10
10
  :class="{ on: isFocus(item.link) }"
11
11
  :href="item.link"
12
12
  :target="isSelf(item.link)"
13
- >{{ $jx3boxT(`jx3boxUi.nav.${item.key}`, item.label) }}</a
13
+ >{{ $jx3boxT(`jx3boxUi.commonHeader.nav.${item.key}`, item.label) }}</a
14
14
  >
15
15
  <template #dropdown>
16
16
  <el-dropdown-menu class="c-header-menu">
@@ -21,7 +21,7 @@
21
21
  class="u-menu-item"
22
22
  >
23
23
  <a :href="subitem.link" :target="isSelf(subitem.link)"
24
- >{{ $jx3boxT(`jx3boxUi.nav.${subitem.key}`, subitem.label) }}
24
+ >{{ $jx3boxT(`jx3boxUi.commonHeader.nav.${subitem.key}`, subitem.label) }}
25
25
  <span v-if="subitem.desc">{{ subitem.desc }}</span></a
26
26
  >
27
27
  </el-dropdown-item>
@@ -32,7 +32,7 @@
32
32
  </template>
33
33
  <template v-else>
34
34
  <a class="u-item" :class="{ on: isFocus(item.link) }" :href="item.link">{{
35
- $jx3boxT(`jx3boxUi.nav.${item.key}`, item.label)
35
+ $jx3boxT(`jx3boxUi.commonHeader.nav.${item.key}`, item.label)
36
36
  }}</a>
37
37
  </template>
38
38
  </template>
@@ -41,7 +41,7 @@
41
41
  <!-- <div class="c-header-nav--pad">
42
42
  <el-menu mode="horizontal" class="c-quick-menu" :default-active="activeIndex">
43
43
  <el-sub-menu index="quick-menu" popper-class="c-quick-menu__submenu">
44
- <template #title>快捷导航</template>
44
+ <template #title>{{ $jx3boxT("jx3boxUi.nav.quickNav", "快捷导航") }}</template>
45
45
  <template v-for="item in finalNav" :key="'header-nav-' + item.key">
46
46
  <el-sub-menu
47
47
  v-if="matchedClient(item.client) && item.children && item.children.length"
@@ -127,13 +127,14 @@ const activeNav = {
127
127
  import { getMenu } from "../../service/header";
128
128
  import { trimSlash } from "./utils";
129
129
  import i18nMixin from "../../i18n/mixin";
130
+ import navData from "../../assets/data/nav.json";
130
131
 
131
132
  export default {
132
133
  mixins: [i18nMixin],
133
134
  props: {},
134
135
  data: function () {
135
136
  return {
136
- nav: default_nav,
137
+ nav: navData,
137
138
 
138
139
  activeIndex: "",
139
140
  };
@@ -190,24 +191,25 @@ export default {
190
191
  return link.startsWith("/") ? "_self" : "_blank";
191
192
  },
192
193
  loadNav() {
193
- try {
194
- const nav = (sessionStorage.getItem("nav") && JSON.parse(sessionStorage.getItem("nav"))) || null;
195
- if (nav) {
196
- this.nav = nav;
197
- this.syncActiveIndex();
198
- } else {
199
- getMenu("nav").then((res) => {
200
- if (res.data) {
201
- this.nav = res?.data?.data?.val;
202
- sessionStorage.setItem("nav", JSON.stringify(this.nav));
203
- this.syncActiveIndex();
204
- }
205
- });
206
- }
207
- } catch (e) {
208
- this.nav = default_nav;
209
- console.log("loadNav error", e);
210
- }
194
+ this.nav = navData;
195
+ // try {
196
+ // const nav = (sessionStorage.getItem("nav") && JSON.parse(sessionStorage.getItem("nav"))) || null;
197
+ // if (nav) {
198
+ // this.nav = nav;
199
+ // this.syncActiveIndex();
200
+ // } else {
201
+ // getMenu("nav").then((res) => {
202
+ // if (res.data) {
203
+ // this.nav = res?.data?.data?.val;
204
+ // sessionStorage.setItem("nav", JSON.stringify(this.nav));
205
+ // this.syncActiveIndex();
206
+ // }
207
+ // });
208
+ // }
209
+ // } catch (e) {
210
+ // this.nav = default_nav;
211
+ // console.log("loadNav error", e);
212
+ // }
211
213
  },
212
214
  trimSlash(link) {
213
215
  return trimSlash(`${this.prefix}:${link}`);
@@ -287,6 +289,7 @@ export default {
287
289
 
288
290
  .c-header-nav--pc,
289
291
  .c-header-nav--pad {
292
+ // .flex;
290
293
  .flex(y);
291
294
  }
292
295
  .c-header-nav--pad {
@@ -2,7 +2,7 @@
2
2
  <div class="c-header-panel" id="c-header-panel">
3
3
  <el-tooltip
4
4
  effect="dark"
5
- :content="$jx3boxT('jx3boxUi.header.createCenter', '创作中心')"
5
+ :content="$jx3boxT('jx3boxUi.commonHeader.createCenter', '创作中心')"
6
6
  placement="bottom"
7
7
  popper-class="c-header-tooltip"
8
8
  >
@@ -12,7 +12,7 @@
12
12
  class="u-add"
13
13
  svg-inline
14
14
  src="../../assets/img/common/edit.svg"
15
- :alt="$jx3boxT('jx3boxUi.header.createCenter', '创作中心')"
15
+ :alt="$jx3boxT('jx3boxUi.commonHeader.createCenter', '创作中心')"
16
16
  />
17
17
  </a>
18
18
  </el-tooltip>
@@ -7,7 +7,7 @@
7
7
  type="text"
8
8
  autocomplete="off"
9
9
  name="q"
10
- :placeholder="$jx3boxT('jx3boxUi.header.searchPlaceholder', '搜索..')"
10
+ :placeholder="$jx3boxT('jx3boxUi.commonHeader.searchPlaceholder', '搜索..')"
11
11
  ref="searchInput"
12
12
  />
13
13
  <input type="hidden" name="client" :value="client" />
@@ -16,7 +16,7 @@
16
16
  <img
17
17
  svg-inline
18
18
  src="../../assets/img/common/search-key-slash.svg"
19
- :alt="$jx3boxT('jx3boxUi.header.search', '搜索')"
19
+ :alt="$jx3boxT('jx3boxUi.commonHeader.search', '搜索')"
20
20
  />
21
21
  </i>
22
22
  </form>
@@ -2,7 +2,7 @@
2
2
  <div class="c-header-panel c-header-shop">
3
3
  <el-tooltip
4
4
  effect="dark"
5
- :content="$jx3boxT('jx3boxUi.header.mallPoints', '积分商城')"
5
+ :content="$jx3boxT('jx3boxUi.commonHeader.mallPoints', '积分商城')"
6
6
  placement="bottom"
7
7
  popper-class="c-header-tooltip"
8
8
  >
@@ -14,7 +14,7 @@
14
14
  class="u-icon"
15
15
  svg-inline
16
16
  src="../../assets/img/common/gift.svg"
17
- :alt="$jx3boxT('jx3boxUi.header.mallPoints', '积分商城')"
17
+ :alt="$jx3boxT('jx3boxUi.commonHeader.mallPoints', '积分商城')"
18
18
  />
19
19
  </i>
20
20
  </a>
@@ -30,13 +30,13 @@
30
30
  <lang />
31
31
 
32
32
  <a class="c-header-console" :href="login_url">{{
33
- $jx3boxT("jx3boxUi.header.loginRegister", "登录/注册")
33
+ $jx3boxT("jx3boxUi.commonHeader.loginRegister", "登录/注册")
34
34
  }}</a>
35
35
 
36
36
  <!-- <div class="c-header-login">
37
- <a class="u-register u-default" :href="register_url">注册</a>
37
+ <a class="u-register u-default" :href="register_url">{{ $jx3boxT("jx3boxUi.user.register", "注册") }}</a>
38
38
  <em>|</em>
39
- <a class="u-login u-default" :href="login_url">登录</a>
39
+ <a class="u-login u-default" :href="login_url">{{ $jx3boxT("jx3boxUi.user.login", "登录") }}</a>
40
40
  </div> -->
41
41
  </template>
42
42
  </div>
@@ -118,7 +118,7 @@ export default {
118
118
  .then(() => {
119
119
  let msg = this.$message({
120
120
  type: "success",
121
- message: this.$jx3boxT("jx3boxUi.header.signInSuccess", "签到成功"),
121
+ message: this.$jx3boxT("jx3boxUi.commonHeader.signInSuccess", "签到成功"),
122
122
  customClass: "c-header-signin",
123
123
  duration: 0,
124
124
  });
@@ -5,31 +5,29 @@
5
5
  <template v-if="isPhone">
6
6
  <ul class="u-menu u-pop-content">
7
7
  <li>
8
- <a href="/dashboard">{{ $jx3boxT("jx3boxUi.header.profileCenter", "个人中心") }}</a>
8
+ <a href="/dashboard">{{ $jx3boxT("jx3boxUi.commonHeader.profileCenter", "个人中心") }}</a>
9
9
  </li>
10
10
  <li>
11
- <a :href="url.msg">{{ $jx3boxT("jx3boxUi.header.messageCenter", "消息中心") }}</a>
11
+ <a :href="url.msg">{{ $jx3boxT("jx3boxUi.commonHeader.messageCenter", "消息中心") }}</a>
12
12
  </li>
13
13
  <li>
14
- <a :href="url.publish">{{ $jx3boxT("jx3boxUi.header.publishCenter", "发布中心") }}</a>
14
+ <a :href="url.publish">{{ $jx3boxT("jx3boxUi.commonHeader.publishCenter", "发布中心") }}</a>
15
15
  </li>
16
16
  <hr />
17
17
  <li v-for="item in userPanel" :key="item.label">
18
18
  <a :href="item.link" :target="item.target || '_self'">
19
- <!-- <i :class="item.icon || 'el-icon-present'"></i> -->
20
19
  {{ item.label }}
21
20
  </a>
22
21
  </li>
23
22
  <template v-if="isTeammate">
24
23
  <li v-for="item in adminPanel" :key="item.label">
25
24
  <a :href="item.link" :target="item.target || '_self'">
26
- <!-- <i :class="item.icon || 'el-icon-present'"></i> -->
27
25
  {{ item.label }}
28
26
  </a>
29
27
  </li>
30
28
  </template>
31
29
  <li>
32
- <a @click="logout">{{ $jx3boxT("jx3boxUi.header.logout", "退出登录") }}</a>
30
+ <a @click="logout">{{ $jx3boxT("jx3boxUi.commonHeader.logout", "退出登录") }}</a>
33
31
  </li>
34
32
  </ul>
35
33
  </template>
@@ -45,18 +43,18 @@
45
43
  :src="super_author_icon"
46
44
  class="u-superauthor-profile"
47
45
  alt="superauthor"
48
- :title="$jx3boxT('jx3boxUi.header.superAuthor', '签约作者')"
46
+ :title="$jx3boxT('jx3boxUi.commonHeader.superAuthor', '签约作者')"
49
47
  :class="{ off: !isSuperAuthor }"
50
48
  /></a>
51
49
  <a
52
50
  class="u-vip"
53
51
  href="/vip/premium?from=header_usermenu"
54
52
  target="_blank"
55
- :title="$jx3boxT('jx3boxUi.header.proAccount', '专业版账号')"
53
+ :title="$jx3boxT('jx3boxUi.commonHeader.proAccount', '专业版账号')"
56
54
  >
57
55
  <i class="i-icon-vip" :class="{ on: isPRO }">{{ vipType }}</i>
58
56
  <span class="u-expire" v-if="isPRO">{{
59
- $jx3boxT("jx3boxUi.header.proExpireUntil", "(有效期至:{date})", {
57
+ $jx3boxT("jx3boxUi.commonHeader.proExpireUntil", "(有效期至:{date})", {
60
58
  date: pro_expire_date,
61
59
  })
62
60
  }}</span>
@@ -64,9 +62,9 @@
64
62
  </div>
65
63
  <div class="u-id">
66
64
  <span
67
- >{{ $jx3boxT("jx3boxUi.header.uidPrefix", "魔盒UID:") }}<b>{{ user.ID }}</b></span
65
+ >{{ $jx3boxT("jx3boxUi.commonHeader.uidPrefix", "魔盒UID:") }}<b>{{ user.ID }}</b></span
68
66
  >
69
- <el-icon class="el-icon-document-copy u-copy" @click.stop="copyText(user.ID)"
67
+ <el-icon class="u-copy" @click.stop="copyText(user.ID)"
70
68
  ><DocumentCopy
71
69
  /></el-icon>
72
70
  </div>
@@ -74,39 +72,39 @@
74
72
 
75
73
  <el-button-group class="u-actions">
76
74
  <a class="el-button el-button--default is-plain" href="/dashboard/config">{{
77
- $jx3boxT("jx3boxUi.header.config", "偏好设置")
75
+ $jx3boxT("jx3boxUi.commonHeader.config", "偏好设置")
78
76
  }}</a>
79
77
  <a class="el-button el-button--default is-plain" @click="changeAlternate">{{
80
- $jx3boxT("jx3boxUi.header.switchAlternate", "切换马甲")
78
+ $jx3boxT("jx3boxUi.commonHeader.switchAlternate", "切换马甲")
81
79
  }}</a>
82
80
  <a class="el-button el-button--default is-plain" href="/dashboard/frame">{{
83
- $jx3boxT("jx3boxUi.header.themeStyle", "主题风格")
81
+ $jx3boxT("jx3boxUi.commonHeader.themeStyle", "主题风格")
84
82
  }}</a>
85
83
  </el-button-group>
86
84
 
87
85
  <div class="u-other">
88
86
  <a href="/dashboard/role" class="u-item"
89
- ><el-icon><User /></el-icon>{{ $jx3boxT("jx3boxUi.header.roleManage", "角色管理") }}
87
+ ><el-icon><User /></el-icon>{{ $jx3boxT("jx3boxUi.commonHeader.roleManage", "角色管理") }}
90
88
  </a>
91
89
  <a href="/dashboard/fav" class="u-item"
92
- ><el-icon><Star /></el-icon>{{ $jx3boxT("jx3boxUi.header.favorites", "收藏订阅") }}
90
+ ><el-icon><Star /></el-icon>{{ $jx3boxT("jx3boxUi.commonHeader.favorites", "收藏订阅") }}
93
91
  </a>
94
92
  <a href="/dashboard/mall" class="u-item"
95
- ><el-icon><Memo /></el-icon>{{ $jx3boxT("jx3boxUi.header.orderCenter", "订单中心") }}
93
+ ><el-icon><Memo /></el-icon>{{ $jx3boxT("jx3boxUi.commonHeader.orderCenter", "订单中心") }}
96
94
  </a>
97
95
  <a href="/dashboard/config" class="u-item"
98
- ><el-icon><Help /></el-icon>{{ $jx3boxT("jx3boxUi.header.dashboard", "个人中心") }}
96
+ ><el-icon><Help /></el-icon>{{ $jx3boxT("jx3boxUi.commonHeader.dashboard", "个人中心") }}
99
97
  </a>
100
98
  <hr />
101
99
  <a href="/dashboard/profile" class="u-item"
102
- ><el-icon><Setting /></el-icon>{{ $jx3boxT("jx3boxUi.header.profile", "资料修改") }}
100
+ ><el-icon><Setting /></el-icon>{{ $jx3boxT("jx3boxUi.commonHeader.profile", "资料修改") }}
103
101
  </a>
104
102
  <a href="/dashboard/feedback" class="u-item"
105
- ><el-icon><Phone /></el-icon>{{ $jx3boxT("jx3boxUi.header.feedbackHelp", "反馈帮助") }}
103
+ ><el-icon><Phone /></el-icon>{{ $jx3boxT("jx3boxUi.commonHeader.feedbackHelp", "反馈帮助") }}
106
104
  </a>
107
105
  <hr />
108
106
  <div class="u-logout">
109
- <el-button @click="logout" plain>{{ $jx3boxT("jx3boxUi.header.logout", "退出登录") }}</el-button>
107
+ <el-button @click="logout" plain>{{ $jx3boxT("jx3boxUi.commonHeader.logout", "退出登录") }}</el-button>
110
108
  </div>
111
109
  </div>
112
110
  </div>
@@ -228,15 +226,15 @@ export default {
228
226
  .then(() => {
229
227
  if (mute) return;
230
228
  this.$notify({
231
- title: this.$jx3boxT("jx3boxUi.header.success", "成功"),
232
- message: this.$jx3boxT("jx3boxUi.header.logoutSuccess", "登出成功"),
229
+ title: this.$jx3boxT("jx3boxUi.commonHeader.success", "成功"),
230
+ message: this.$jx3boxT("jx3boxUi.commonHeader.logoutSuccess", "登出成功"),
233
231
  type: "success",
234
232
  duration: 1000,
235
233
  });
236
234
  });
237
235
  },
238
236
  showUserName: function (val) {
239
- return val || this.$jx3boxT("jx3boxUi.header.anonymous", "匿名");
237
+ return val || this.$jx3boxT("jx3boxUi.commonHeader.anonymous", "匿名");
240
238
  },
241
239
  loadMyInfo: function () {
242
240
  getMyInfo()
@@ -2,7 +2,7 @@
2
2
  <div class="c-header-panel c-header-vip" id="c-header-vip">
3
3
  <el-tooltip
4
4
  effect="dark"
5
- :content="$jx3boxT('jx3boxUi.header.vipCenter', '会员中心')"
5
+ :content="$jx3boxT('jx3boxUi.commonHeader.vipCenter', '会员中心')"
6
6
  placement="bottom"
7
7
  popper-class="c-header-tooltip"
8
8
  >
@@ -14,7 +14,7 @@
14
14
  class="u-add"
15
15
  svg-inline
16
16
  src="../../assets/img/common/vip.svg"
17
- :alt="$jx3boxT('jx3boxUi.header.vipCenter', '会员中心')"
17
+ :alt="$jx3boxT('jx3boxUi.commonHeader.vipCenter', '会员中心')"
18
18
  />
19
19
  </i>
20
20
  </a>
@@ -1,12 +1,16 @@
1
1
  <template>
2
2
  <div class="w-boxcoin-admin" v-if="allowBoxcoin">
3
- <el-tooltip effect="dark" content="品鉴" placement="top-start">
3
+ <el-tooltip
4
+ effect="dark"
5
+ :content="$jx3boxT('jx3boxUi.boxcoinAdmin.tooltip', '品鉴')"
6
+ placement="top-start"
7
+ >
4
8
  <div class="w-boxcoin-block">
5
9
  <img @click="openBoxcoinPop" class="u-icon" svg-inline :src="iconPath" />
6
10
  </div>
7
11
  </el-tooltip>
8
12
  <el-dialog
9
- title="品鉴评分"
13
+ :title="$jx3boxT('jx3boxUi.boxcoinAdmin.dialogTitle', '品鉴评分')"
10
14
  v-model="visible"
11
15
  class="w-boxcoin-pop"
12
16
  :close-on-click-modal="false"
@@ -14,8 +18,14 @@
14
18
  >
15
19
  <div class="w-boxcoin-admin-content">
16
20
  <div class="u-left">
17
- <em class="u-label">本月状态</em>
18
- 已用<b>{{ this.used }}</b> 剩余<b>{{ this.left }}</b> 总计<b>{{ this.total }}</b>
21
+ <em class="u-label">{{ $jx3boxT("jx3boxUi.boxcoinAdmin.monthStatus", "本月状态") }}</em>
22
+ {{
23
+ $jx3boxT("jx3boxUi.boxcoinAdmin.monthSummary", "已用{used} 剩余{left} 总计{total}", {
24
+ used: this.used,
25
+ left: this.left,
26
+ total: this.total,
27
+ })
28
+ }}
19
29
  <el-progress
20
30
  :percentage="100 - (this.used * 100) / this.total"
21
31
  :stroke-width="15"
@@ -23,43 +33,45 @@
23
33
  ></el-progress>
24
34
  </div>
25
35
  <div class="u-list">
26
- <em class="u-label">❤️ 品鉴</em>
36
+ <em class="u-label">❤️ {{ $jx3boxT("jx3boxUi.boxcoinAdmin.appraise", "品鉴") }}</em>
27
37
  <Contributors v-if="authors && authors.length" :authors="authors" @chosen="handleChosen" />
28
38
  <div class="u-points">
29
39
  <el-radio-group v-model="count">
30
40
  <el-radio :value="item" v-for="item in fitPoints" :key="item" border>
31
41
  <b>{{ item }}</b
32
- >盒币
42
+ >{{ $jx3boxT("jx3boxUi.boxcoinAdmin.boxcoin", "盒币") }}
33
43
  </el-radio>
34
- <el-radio value="custom" border>自定义</el-radio>
44
+ <el-radio value="custom" border>{{ $jx3boxT("jx3boxUi.boxcoinAdmin.custom", "自定义") }}</el-radio>
35
45
  <el-input
36
46
  v-model="amount"
37
47
  v-show="count === 'custom'"
38
- placeholder="输入自定义数量"
48
+ :placeholder="$jx3boxT('jx3boxUi.boxcoinAdmin.customPlaceholder', '输入自定义数量')"
39
49
  ></el-input>
40
50
  </el-radio-group>
41
51
  </div>
42
52
  </div>
43
53
  <div class="u-msg">
44
- <em class="u-label">📝 寄语</em>
54
+ <em class="u-label">📝 {{ $jx3boxT("jx3boxUi.boxcoinAdmin.remark", "寄语") }}</em>
45
55
  <div class="u-input">
46
56
  <el-input
47
57
  v-model="remark"
48
- placeholder="请输入寄语(必填)"
58
+ :placeholder="$jx3boxT('jx3boxUi.boxcoinAdmin.remarkPlaceholder', '请输入寄语(必填)')"
49
59
  :minlength="2"
50
60
  :maxlength="30"
51
61
  show-word-limit
52
62
  ></el-input>
53
63
  <el-button :disabled="fetchingCurrentRelease" @click="insertCurrentRelease"
54
- >插入当前版本</el-button
64
+ >{{ $jx3boxT("jx3boxUi.boxcoinAdmin.insertCurrentRelease", "插入当前版本") }}</el-button
55
65
  >
56
66
  </div>
57
67
  </div>
58
68
  </div>
59
69
  <template #footer>
60
70
  <span class="dialog-footer">
61
- <el-button @click="visible = false">取 消</el-button>
62
- <el-button type="primary" @click="submit" :disabled="!ready || submitting">确 定</el-button>
71
+ <el-button @click="visible = false">{{ $jx3boxT("jx3boxUi.common.cancel", "取消") }}</el-button>
72
+ <el-button type="primary" @click="submit" :disabled="!ready || submitting">{{
73
+ $jx3boxT("jx3boxUi.common.confirm", "确定")
74
+ }}</el-button>
63
75
  </span>
64
76
  </template>
65
77
  </el-dialog>
@@ -72,8 +84,10 @@ import { getBreadcrumb } from "../../service/breadcrumb.js";
72
84
  import User from "@jx3box/jx3box-common/js/user";
73
85
  import Contributors from "./Contributors.vue";
74
86
  import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
87
+ import i18nMixin from "../../i18n/mixin";
75
88
  export default {
76
89
  name: "BoxcoinAdmin",
90
+ mixins: [i18nMixin],
77
91
  props: {
78
92
  postType: {
79
93
  type: String,
@@ -124,7 +138,7 @@ export default {
124
138
  visible: false,
125
139
  count: 0,
126
140
 
127
- remark: "辛苦,感谢!",
141
+ remark: this.$jx3boxT("jx3boxUi.boxcoinAdmin.defaultRemark", "辛苦,感谢!"),
128
142
  left: this.own,
129
143
  chosen: "", // 被选中的人
130
144
  amount: "",
@@ -186,7 +200,7 @@ export default {
186
200
  })
187
201
  .then((res) => {
188
202
  this.$message({
189
- message: "操作成功",
203
+ message: this.$jx3boxT("jx3boxUi.boxcoinAdmin.success", "操作成功"),
190
204
  type: "success",
191
205
  });
192
206
  return res.data.data;
@@ -210,7 +224,7 @@ export default {
210
224
  })
211
225
  .catch(() => {
212
226
  this.$message({
213
- message: "获取失败",
227
+ message: this.$jx3boxT("jx3boxUi.boxcoinAdmin.fetchFailed", "获取失败"),
214
228
  type: "error",
215
229
  });
216
230
  })
@@ -6,25 +6,25 @@
6
6
  <span class="u-meta u-action">
7
7
  <el-icon><Trophy /></el-icon>
8
8
  </span>
9
- <span class="u-meta u-user">参与打赏</span>
10
- <span class="u-meta u-user">收益作者</span>
11
- <span class="u-meta u-count">盒币</span>
12
- <span class="u-meta u-remark">寄语</span>
9
+ <span class="u-meta u-user">{{ $jx3boxT("jx3boxUi.boxcoinRecords.participant", "参与打赏") }}</span>
10
+ <span class="u-meta u-user">{{ $jx3boxT("jx3boxUi.boxcoinRecords.author", "收益作者") }}</span>
11
+ <span class="u-meta u-count">{{ $jx3boxT("jx3boxUi.boxcoinRecords.boxcoin", "盒币") }}</span>
12
+ <span class="u-meta u-remark">{{ $jx3boxT("jx3boxUi.boxcoinRecords.remark", "寄语") }}</span>
13
13
  <time class="u-meta u-time"></time>
14
14
  </li>
15
15
  <li v-for="(item, i) in list" :key="i" class="u-item u-body">
16
16
  <span class="u-meta u-action">
17
17
  <template v-if="item.is_user_gift">
18
- <i title="打赏"><img class svg-inline src="../../assets/img/widget/gift.svg" /></i>
18
+ <i :title="$jx3boxT('jx3boxUi.boxcoinRecords.reward', '打赏')"><img class svg-inline src="../../assets/img/widget/gift.svg" /></i>
19
19
  </template>
20
20
  <template v-else>
21
- <i title="品鉴"><img class svg-inline src="../../assets/img/widget/admin_gift.svg" /></i>
21
+ <i :title="$jx3boxT('jx3boxUi.boxcoinRecords.appraise', '品鉴')"><img class svg-inline src="../../assets/img/widget/admin_gift.svg" /></i>
22
22
  </template>
23
23
  </span>
24
24
  <template v-if="item.ext_operate_user_info?.id == 1">
25
25
  <span class="u-meta u-user u-default">
26
26
  <img class="u-user-avatar" :src="showAvatar(item.ext_operate_user_info.avatar)" alt />
27
- <span>系统</span>
27
+ <span>{{ $jx3boxT("jx3boxUi.boxcoinRecords.system", "系统") }}</span>
28
28
  </span>
29
29
  </template>
30
30
  <a v-else class="u-meta u-user" :href="authorLink(item.operate_user_id)" target="_blank">
@@ -43,7 +43,7 @@
43
43
  <time class="u-meta u-time">{{ showTime(item.created_at) }}</time>
44
44
  <span class="u-client" v-if="isSuperAdmin">{{ item.client }}</span>
45
45
  <span class="u-delete" v-if="isSuperAdmin" @click="recovery(item, i)">
46
- <i class="Delete"></i>撤销
46
+ <i class="Delete"></i>{{ $jx3boxT("jx3boxUi.boxcoinRecords.revoke", "撤销") }}
47
47
  </span>
48
48
  </li>
49
49
  </ul>
@@ -56,6 +56,7 @@
56
56
  :page-size="per"
57
57
  :total="total"
58
58
  v-model="page"
59
+ center
59
60
  ></el-pagination>
60
61
  </div>
61
62
  </template>
@@ -65,8 +66,10 @@ import { getPostBoxcoinRecords, recoveryBoxcoin } from "../../service/thx";
65
66
  import User from "@jx3box/jx3box-common/js/user";
66
67
  import { showAvatar, authorLink } from "@jx3box/jx3box-common/js/utils";
67
68
  import { showTime } from "@jx3box/jx3box-common/js/moment";
69
+ import i18nMixin from "../../i18n/mixin";
68
70
  export default {
69
71
  name: "BoxcoinRecords",
72
+ mixins: [i18nMixin],
70
73
  props: {
71
74
  postType: {
72
75
  type: String,
@@ -149,13 +152,16 @@ export default {
149
152
  });
150
153
  },
151
154
  recovery: function (item, i) {
152
- this.$alert("是否确定撤销该评分?", "确认", {
153
- confirmButtonText: "确定",
155
+ this.$alert(
156
+ this.$jx3boxT("jx3boxUi.boxcoinRecords.confirmRevoke", "是否确定撤销该评分?"),
157
+ this.$jx3boxT("jx3boxUi.boxcoinRecords.confirmTitle", "确认"),
158
+ {
159
+ confirmButtonText: this.$jx3boxT("jx3boxUi.common.confirm", "确定"),
154
160
  callback: (action) => {
155
161
  if (action == "confirm") {
156
162
  recoveryBoxcoin(item.id).then(() => {
157
163
  this.$message({
158
- message: "撤销成功",
164
+ message: this.$jx3boxT("jx3boxUi.boxcoinRecords.revokeSuccess", "撤销成功"),
159
165
  type: "success",
160
166
  });
161
167
  this.list.splice(i, 1);
@@ -172,3 +178,14 @@ export default {
172
178
  },
173
179
  };
174
180
  </script>
181
+
182
+
183
+ <style lang="less">
184
+ .w-boxcoin-records-pages{
185
+
186
+ --el-color-primary: @primary;
187
+
188
+ .flex(x);
189
+ margin-top:5px;
190
+ }
191
+ </style>