@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
@@ -0,0 +1,158 @@
1
+ <template>
2
+ <div class="c-post-collection" v-if="list && list.length">
3
+ <div class="m-title">
4
+ <div class="c-post-collection-title">
5
+ <el-icon class="u-icon"><Connection>></Connection></el-icon> 关联
6
+ </div>
7
+ <div class="u-op" @click="toggle"><el-icon><DCaret></DCaret></el-icon> 折叠</div>
8
+ </div>
9
+ <transition name="collapse">
10
+ <ul v-show="show" class="c-post-collection-list">
11
+ <li v-for="(item, i) in list" :key="i">
12
+ <el-tooltip class="item" effect="dark" :content="item.title" placement="left">
13
+ <a :href="showLink(item)" target="_blank">
14
+ <el-icon><Link></Link></el-icon>
15
+ {{ item.title }}
16
+ </a>
17
+ </el-tooltip>
18
+ </li>
19
+ </ul>
20
+ </transition>
21
+ </div>
22
+ </template>
23
+
24
+ <script>
25
+ import { getLink, resolveImagePath } from "@jx3box/jx3box-common/js/utils";
26
+ import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
27
+ import { getCollection } from "../../service/cms";
28
+ const { __imgPath } = JX3BOX;
29
+ export default {
30
+ name: "PostCollection",
31
+ props: ["id", "store"],
32
+ components: {},
33
+ data: function () {
34
+ return {
35
+ data: {
36
+ title: "",
37
+ posts: [],
38
+ },
39
+ show: true,
40
+ };
41
+ },
42
+ computed: {
43
+ list: function () {
44
+ return this.store?.posts || this.data?.posts;
45
+ },
46
+ },
47
+ watch: {
48
+ id: {
49
+ immediate: true,
50
+ handler: function (val) {
51
+ !!~~val && this.loadData();
52
+ },
53
+ },
54
+ },
55
+ methods: {
56
+ loadData: function () {
57
+ getCollection(this.id).then((res) => {
58
+ this.data = res.data?.data;
59
+ });
60
+ },
61
+ showLink: function (item) {
62
+ if (item.type == "custom") {
63
+ return item.url;
64
+ } else {
65
+ return getLink(item.type, item.id);
66
+ }
67
+ },
68
+ getCover: function (val) {
69
+ return val ? resolveImagePath(val) : `${__imgPath}image/collection/default_cover.png`;
70
+ },
71
+ toggle: function () {
72
+ this.show = !this.show;
73
+ },
74
+ },
75
+ };
76
+ </script>
77
+ <style lang="less">
78
+ .c-post-collection {
79
+ .m-title {
80
+ .flex;
81
+ justify-content: space-between;
82
+ align-items: center;
83
+ line-height: 24px;
84
+ .u-op {
85
+ font-size: 13px;
86
+ font-weight: 500;
87
+ line-height: 18px;
88
+ padding: 0 5px;
89
+ color: #cdd1db;
90
+ cursor: pointer;
91
+ .flex(y);
92
+ &:hover {
93
+ color: #a1a9bb;
94
+ }
95
+ }
96
+ }
97
+ .u-image {
98
+ img {
99
+ .w(100%);
100
+ height: 226px;
101
+ object-fit: cover;
102
+ }
103
+ }
104
+ .c-post-collection-title {
105
+ font-weight: normal;
106
+ font-size: 16px;
107
+ line-height: 18px;
108
+ color: #333;
109
+ .flex;
110
+ align-items: center;
111
+ gap: 5px;
112
+ }
113
+ .u-icon {
114
+ font-size: 18px;
115
+ }
116
+ .c-post-collection-list {
117
+ list-style: none;
118
+ padding: 10px 20px;
119
+ margin: 0;
120
+ overflow: hidden;
121
+ li {
122
+ .fz(13px, 36px);
123
+ }
124
+ a {
125
+ .db;
126
+ color: var(--el-color-primary);
127
+ transition: 0.15s ease-in-out;
128
+ .nobreak;
129
+ &:hover {
130
+ background-color: #e6f0fb;
131
+ }
132
+ }
133
+ i {
134
+ .pr;
135
+ top: 2px;
136
+ }
137
+ }
138
+
139
+ .collapse-enter-active,
140
+ .collapse-leave-active {
141
+ transition: max-height 0.25s ease, opacity 0.2s ease, padding 0.25s ease;
142
+ }
143
+
144
+ .collapse-enter-from,
145
+ .collapse-leave-to {
146
+ max-height: 0;
147
+ opacity: 0;
148
+ padding-top: 0;
149
+ padding-bottom: 0;
150
+ }
151
+
152
+ .collapse-enter-to,
153
+ .collapse-leave-from {
154
+ max-height: 480px;
155
+ opacity: 1;
156
+ }
157
+ }
158
+ </style>
@@ -19,129 +19,3 @@ export default {
19
19
  mounted:function(){},
20
20
  }
21
21
  </script>
22
-
23
- <style lang="less">
24
- .c-article-directory {
25
- h1,
26
- h2,
27
- h3,
28
- h4,
29
- h5,
30
- h6 {
31
- margin: 0;
32
- padding: 0;
33
- cursor: pointer;
34
- font-weight: normal;
35
- white-space: nowrap;
36
- word-wrap: normal;
37
- word-break: keep-all;
38
- text-overflow: ellipsis;
39
- overflow: hidden;
40
- letter-spacing: 0.2px;
41
- line-height: 20px;
42
- padding: 8px 0;
43
- &:hover {
44
- // font-weight: 600;
45
- color: #0366d6;
46
- }
47
- font-size: 12px;
48
- }
49
- a {
50
- color: @color;
51
- }
52
-
53
- h1,
54
- h2,
55
- h3,
56
- h4,
57
- h5,
58
- h6 {
59
- &::before {
60
- content: "\e78b";
61
-
62
- font-family: element-icons !important;
63
- speak: none;
64
- font-style: normal;
65
- font-weight: 400;
66
- font-variant: normal;
67
- text-transform: none;
68
- line-height: 1;
69
- vertical-align: baseline;
70
- display: inline-block;
71
- -webkit-font-smoothing: antialiased;
72
- margin-right: 5px;
73
- font-size: 16px;
74
- }
75
- }
76
-
77
- // .hasChild {
78
- // font-size: 14px;
79
- // &::before {
80
- // content: "\e784";
81
- // }
82
- // }
83
-
84
- // h2,h3,h4,h5,h6{
85
- // margin-left: 20px;
86
- // }
87
- // .hasChild{
88
- // margin-left: 0;
89
- // }
90
-
91
- // h3 + h2,h4 + h3,h5 + h4,h6 + h5{
92
- // margin-left: 0;
93
- // }
94
-
95
- .lv2 {
96
- padding-left: 20px;
97
- }
98
-
99
- .lv3 {
100
- padding-left: 40px;
101
- }
102
-
103
- .lv0 {
104
- display: none;
105
- }
106
- }
107
-
108
- .c-article-directory-title {
109
- margin-bottom: 5px;
110
- .c-article-directory-title-label {
111
- font-weight: 300;
112
- font-size: 20px;
113
- // cursor: pointer;
114
- // &:hover {
115
- // color: #f39;
116
- // }
117
- }
118
- .c-article-directory-title-skip,
119
- .c-article-directory-title-folder {
120
- font-size: 14px;
121
- float: right;
122
- padding: 0 5px;
123
- line-height: 25px;
124
- color: darken(#dcdfe6, 5%);
125
- cursor: pointer;
126
- &:hover {
127
- color: darken(#dcdfe6, 20%);
128
- }
129
- }
130
- }
131
- .c-article-directory-content {
132
- padding: 10px 15px;
133
- }
134
-
135
- @keyframes focusFade {
136
- from {
137
- background-color: #c3fcff;
138
- }
139
- to {
140
- background-color: transparent;
141
- }
142
- }
143
-
144
- .c-article .isScrollFocus {
145
- animation: focusFade 0.5s ease-in-out;
146
- }
147
- </style>
@@ -0,0 +1,93 @@
1
+ <template>
2
+ <div class="w-post-guide" v-if="hasGuide">
3
+ <div class="u-prev">
4
+ <a :href="getPostLink(post?.prev_post)" class="el-button el-button--default el-button--small is-plain" :class="{'is-disabled': !post?.prev_post }">
5
+ <el-icon><ArrowLeft></ArrowLeft></el-icon>
6
+ <span>上一篇</span>
7
+ </a>
8
+ <a :href="getPostLink(post?.prev_post)" class="u-post-title">{{ getPostTitle(post?.prev_post) }}</a>
9
+ </div>
10
+ <div class="u-next">
11
+ <a :href="getPostLink(post?.next_post)" class="el-button el-button--default el-button--small is-plain" :class="{'is-disabled': !post.next_post }">
12
+ <span>下一篇</span>
13
+ <el-icon><ArrowRight></ArrowRight></el-icon>
14
+ </a>
15
+ <a :href="getPostLink(post?.next_post)" class="u-post-title">{{ getPostTitle(post?.next_post) }}</a>
16
+ </div>
17
+ </div>
18
+ </template>
19
+
20
+ <script>
21
+ import { getLink } from '@jx3box/jx3box-common/js/utils';
22
+ export default {
23
+ name: "PostGuide",
24
+ props: {
25
+ post: {
26
+ type: Object,
27
+ default: () => ({}),
28
+ },
29
+ },
30
+ computed: {
31
+ hasGuide() {
32
+ const isPrevValid = this.post.prev_post && typeof this.post.prev_post === "object";
33
+ const isNextValid = this.post.next_post && typeof this.post.next_post === "object";
34
+ return isPrevValid || isNextValid;
35
+ }
36
+ },
37
+ methods: {
38
+ getPostLink({ ID: id, post_type }) {
39
+ const link = id ? getLink(post_type, id) : "javascript:;";
40
+ return link;
41
+ },
42
+ getPostTitle(item) {
43
+ return item?.post_title || "";
44
+ }
45
+ },
46
+ };
47
+ </script>
48
+
49
+ <style lang="less">
50
+ .w-post-guide {
51
+ .flex;
52
+ align-items: center;
53
+ justify-content: space-between;
54
+
55
+ .u-post-title {
56
+ margin-left: 10px;
57
+ font-size: 14px;
58
+ // color: #666;
59
+
60
+ &:hover {
61
+ // color: #0366d6;
62
+ // box-shadow: 0 1px 0 #0366d6;
63
+ .underline(var(--el-color-primary));
64
+ color:var(--el-color-primary);
65
+ }
66
+ }
67
+ }
68
+
69
+ @media screen and (max-width: @phone) {
70
+ .w-post-guide {
71
+ flex-wrap: wrap;
72
+
73
+ .u-prev,.u-next {
74
+ width: 100%;
75
+ .nobreak;
76
+ }
77
+
78
+ .u-prev {
79
+ margin-bottom: 10px;
80
+ span{
81
+ margin-left:5px;
82
+ }
83
+ }
84
+
85
+ .u-next {
86
+ margin-left: 0;
87
+ span{
88
+ margin-right:5px;
89
+ }
90
+ }
91
+ }
92
+ }
93
+ </style>
@@ -3,7 +3,7 @@
3
3
  <!-- 标题 -->
4
4
  <div class="m-single-title">
5
5
  <span class="u-title u-sub-block" :href="url" :title="title">
6
- <i class="u-original" v-if="isOriginal">原创</i>
6
+ <i class="u-original" v-if="isOriginal">{{ $jx3boxT("jx3boxUi.postHeader.original", "原创") }}</i>
7
7
  <i class="u-private" v-if="post.post_status != 'publish' || !!~~post.visible">
8
8
  <el-icon
9
9
  v-if="post.post_status == 'draft' || post.post_status == 'pending' || !!~~post.visible"
@@ -16,7 +16,7 @@
16
16
  <template v-if="titleExtra">
17
17
  <span class="u-client" :class="'i-client-' + client">{{ showClientLabel(client) }}</span>
18
18
  <span class="u-client u-zlp" v-if="zlp">{{ zlp }}</span>
19
- <span class="u-client i-client-wujie" v-if="is_wujie">无界</span>
19
+ <span class="u-client i-client-wujie" v-if="is_wujie">{{ $jx3boxT("jx3boxUi.postHeader.wujie", "无界") }}</span>
20
20
  </template>
21
21
  </span>
22
22
  </div>
@@ -29,7 +29,7 @@
29
29
  <img svg-inline src="../../assets/img/single/author.svg" />
30
30
  </i>
31
31
  <a class="u-name" :href="author_link" v-if="!anonymous">{{ author_name }}</a>
32
- <span class="u-name u-anonymous" v-else>神秘侠士</span>
32
+ <span class="u-name u-anonymous" v-else>{{ $jx3boxT("jx3boxUi.postHeader.mysterious", "神秘侠士") }}</span>
33
33
  </div>
34
34
 
35
35
  <!-- 自定义字段 -->
@@ -43,13 +43,16 @@
43
43
 
44
44
  <!-- 客户端 -->
45
45
  <div class="u-meta u-sub-block">
46
- <em class="u-label">适用客户端</em>
46
+ <em class="u-label">{{ $jx3boxT("jx3boxUi.postHeader.client", "适用客户端") }}</em>
47
47
  <span class="u-value u-client" :class="client">{{ showClientLabel(client) }}</span>
48
- <span class="u-value u-client wujie" v-if="is_wujie">无界</span>
48
+ <span class="u-value u-client wujie" v-if="is_wujie">{{ $jx3boxT("jx3boxUi.postHeader.wujie", "无界") }}</span>
49
49
  </div>
50
50
 
51
51
  <!-- 发布日期 -->
52
- <span class="u-podate u-sub-block" :title="'发布日期:' + post_time">
52
+ <span
53
+ class="u-podate u-sub-block"
54
+ :title="$jx3boxT('jx3boxUi.postHeader.publishDateTitle', '发布日期:{time}', { time: post_time })"
55
+ >
53
56
  <i class="u-icon-podate">
54
57
  <img svg-inline src="../../assets/img/single/podate.svg" />
55
58
  </i>
@@ -57,7 +60,10 @@
57
60
  </span>
58
61
 
59
62
  <!-- 最后更新 -->
60
- <span class="u-modate u-sub-block" :title="'最后更新:' + update_time">
63
+ <span
64
+ class="u-modate u-sub-block"
65
+ :title="$jx3boxT('jx3boxUi.postHeader.updateDateTitle', '最后更新:{time}', { time: update_time })"
66
+ >
61
67
  <i class="u-icon-modate">
62
68
  <img svg-inline src="../../assets/img/single/modate.svg" />
63
69
  </i>
@@ -70,7 +76,11 @@
70
76
  {{ views }}
71
77
  </span>
72
78
 
73
- <span class="u-word-count u-sub-block" v-if="wordCount" title="累计字数">
79
+ <span
80
+ class="u-word-count u-sub-block"
81
+ v-if="wordCount"
82
+ :title="$jx3boxT('jx3boxUi.postHeader.wordCount', '累计字数')"
83
+ >
74
84
  <el-icon :size="15"><Sunny /></el-icon>
75
85
  {{ wordCount }}
76
86
  </span>
@@ -78,7 +88,7 @@
78
88
  <!-- 编辑 -->
79
89
  <a class="u-edit u-sub-block" :href="edit_link" v-if="canEdit && !anonymous">
80
90
  <el-icon class="u-icon-edit" :size="16"><Edit /></el-icon>
81
- <span>编辑</span>
91
+ <span>{{ $jx3boxT("jx3boxUi.postHeader.edit", "编辑") }}</span>
82
92
  </a>
83
93
  </div>
84
94
  </header>
@@ -90,10 +100,12 @@ import { showDate, showTime } from "@jx3box/jx3box-common/js/moment";
90
100
  import { editLink, authorLink } from "@jx3box/jx3box-common/js/utils.js";
91
101
  import User from "@jx3box/jx3box-common/js/user.js";
92
102
  import $ from "jquery";
103
+ import i18nMixin from "../../i18n/mixin";
93
104
  const { __clients } = JX3BOX;
94
105
 
95
106
  export default {
96
107
  name: "PostHeader",
108
+ mixins: [i18nMixin],
97
109
  props: {
98
110
  post: {
99
111
  type: Object,
@@ -125,13 +137,13 @@ export default {
125
137
  return !!~~this.post?.original;
126
138
  },
127
139
  title: function () {
128
- return this.post?.post_title || "无标题";
140
+ return this.post?.post_title || this.$jx3boxT("jx3boxUi.postHeader.noTitle", "无标题");
129
141
  },
130
142
  author_link: function () {
131
143
  return authorLink(this.post?.post_author);
132
144
  },
133
145
  author_name: function () {
134
- return this.post?.author_info?.display_name || "匿名";
146
+ return this.post?.author_info?.display_name || this.$jx3boxT("jx3boxUi.postHeader.anonymous", "匿名");
135
147
  },
136
148
  post_date: function () {
137
149
  return showDate(new Date(this.post?.post_date));
@@ -218,8 +230,8 @@ export default {
218
230
  // padding-right: 280px;
219
231
  .pr;
220
232
  .u-sub-block {
221
- .dbi;
222
- .y(top);
233
+ .flex;
234
+ align-items: center;
223
235
  }
224
236
  }
225
237
  @media screen and (max-width: @phone) {
@@ -244,7 +256,7 @@ export default {
244
256
  // }
245
257
  letter-spacing: 0.5px;
246
258
  font-weight: 300;
247
- .db;
259
+ // .db;
248
260
  .nobreak;
249
261
  }
250
262
  .u-author {
@@ -263,9 +275,11 @@ export default {
263
275
  }
264
276
 
265
277
  .u-private {
266
- .y(-4px);
278
+ // .y(-4px);
267
279
  margin-right: 5px;
268
280
  color: #111;
281
+ top:2px;
282
+ .pr;
269
283
  }
270
284
  }
271
285
  @media screen and (max-width: @phone) {
@@ -285,15 +299,20 @@ export default {
285
299
  }
286
300
 
287
301
  .m-single-info {
302
+
303
+
288
304
  margin-top: 10px;
289
305
  .clearfix;
290
306
  .fz(12px, 20px);
291
307
  color: #666;
308
+ .flex;
309
+ align-items: center;
292
310
 
293
311
  @origin: #0eb7ce;
294
312
  @std: #f0b400;
295
313
  @all: #a26ef7;
296
314
  @wujie: #fc79bf;
315
+ --el-color-primary: @primary;
297
316
 
298
317
  .u-client {
299
318
  // .fl;
@@ -343,8 +362,11 @@ export default {
343
362
  }
344
363
 
345
364
  .u-author {
365
+ a {
366
+ color: var(--el-color-primary);
367
+ }
346
368
  a:hover {
347
- box-shadow: 0 1px 0 @color-link;
369
+ .underline(var(--el-color-primary));
348
370
  }
349
371
  i {
350
372
  .pr;
@@ -373,9 +395,9 @@ export default {
373
395
  font-size: 16px;
374
396
  }
375
397
  .pr;
376
- top: 4px;
377
398
  .mr(1px);
378
399
  }
400
+ color: var(--el-color-primary);
379
401
  &:hover {
380
402
  box-shadow: 0 1px 0 @color-link;
381
403
  }
@@ -80,14 +80,14 @@ export default {
80
80
  }
81
81
  </script>
82
82
 
83
- <style lang="less" scoped>
83
+ <style lang="less">
84
84
  .c-post-topic {
85
- margin-bottom: 10px;
85
+ margin-bottom: 20px;
86
86
  }
87
87
  .c-post-topic__banner {
88
88
  position: relative;
89
89
  margin-bottom: 10px;
90
- padding: 10px 10px 0 10px;
90
+ //padding: 10px 10px 0 10px;
91
91
  .c-topic-text {
92
92
  font-size: 12px;
93
93
  font-weight: 700;