@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.
- package/.storybook/preview.js +22 -13
- package/.storybook/storybookMocks.js +214 -0
- package/README.md +39 -43
- package/assets/css/bread/admin.less +20 -2
- package/assets/css/bread/breadcrumb.less +5 -2
- package/assets/css/comment/quick-reply.less +1 -1
- package/assets/css/common/left-sidebar.less +1 -1
- package/assets/css/interact/like2.less +5 -2
- package/assets/css/interact/qrcode.less +69 -0
- package/assets/css/single/author.less +15 -10
- package/assets/css/single/cms-single.less +1 -0
- package/assets/css/single/thx.less +34 -11
- package/assets/css/wiki/wiki-comments.less +176 -0
- package/assets/css/wiki/wiki-panel.less +177 -0
- package/assets/css/wiki/wiki-revisions.less +62 -0
- package/assets/data/nav.json +344 -10
- package/assets/img/comment/comment.svg +1 -1
- package/assets/img/comment/heart_1.svg +1 -1
- package/assets/img/comment/hide.svg +1 -1
- package/assets/img/leftsidebar/medal.svg +1 -1
- package/assets/img/leftsidebar/post.svg +27 -46
- package/i18n/messages/en-US.js +357 -22
- package/i18n/messages/vi.js +350 -22
- package/i18n/messages/zh-CN.js +469 -20
- package/i18n/messages/zh-TW.js +350 -22
- package/index.js +19 -7
- package/package.json +8 -5
- package/service/cms.js +22 -0
- package/service/commit-history.js +18 -0
- package/service/community.js +60 -0
- package/service/fav.js +5 -6
- package/src/App.vue +210 -80
- package/src/Breadcrumb.vue +24 -11
- package/src/CommonFooter.vue +2 -2
- package/src/Footer.vue +13 -5
- package/src/LeftSideToggle.vue +10 -3
- package/src/LeftSidebar.vue +19 -5
- package/src/Main.vue +9 -2
- package/src/RightSidebar.vue +12 -3
- package/src/SuspendCommon.vue +52 -38
- package/src/author/AuthorFans.vue +7 -5
- package/src/author/AuthorFollow.vue +14 -7
- package/src/author/AuthorGift.vue +25 -17
- package/src/author/AuthorInfo.vue +46 -19
- package/src/author/AuthorLink.vue +3 -1
- package/src/author/AuthorMedals.vue +5 -2
- package/src/author/AuthorPosts.vue +31 -13
- package/src/author/AuthorRss.vue +7 -3
- package/src/author/AuthorTeams.vue +3 -1
- package/src/author/UserPop.vue +29 -17
- package/src/bread/Admin.vue +55 -32
- package/src/bread/AdminDirectMessage.vue +15 -8
- package/src/bread/AdminDrop.vue +124 -45
- package/src/bread/CommunityAdmin.vue +527 -0
- package/src/bread/DesignTask.vue +30 -26
- package/src/bread/ListAdmin.vue +199 -0
- package/src/bread/MigrateCommunity.vue +192 -0
- package/src/bread/MoveToCommunityDialog.vue +234 -0
- package/src/comment/Avatar.vue +18 -24
- package/src/comment/CommentContent.vue +57 -37
- package/src/comment/CommentContentSimple.vue +61 -63
- package/src/comment/CommentInputForm.vue +45 -34
- package/src/comment/CommentWithReply.vue +9 -6
- package/src/comment/QuickReply.vue +5 -1
- package/src/comment/ReplyForReply.vue +6 -4
- package/src/comment/ReplyList.vue +28 -18
- package/src/comment/Upload.vue +24 -6
- package/src/filters/clientBy.vue +10 -8
- package/src/filters/markBy.vue +35 -31
- package/src/filters/menuBy.vue +20 -22
- package/src/filters/orderBy.vue +17 -11
- package/src/filters/tagBy.vue +4 -2
- package/src/filters/topicBy.vue +12 -10
- package/src/filters/versionBy.vue +5 -3
- package/src/filters/zlpBy.vue +29 -25
- package/src/footer/copyright.vue +5 -5
- package/src/footer/links.vue +2 -2
- package/src/footer/official.vue +1 -1
- package/src/footer/resource.vue +6 -6
- package/src/header/alternate.vue +35 -18
- package/src/header/asset.vue +9 -19
- package/src/header/box.vue +20 -8
- package/src/header/box2.vue +16 -9
- package/src/header/client.vue +7 -7
- package/src/header/lang.vue +41 -6
- package/src/header/logo.vue +2 -3
- package/src/header/manage.vue +2 -2
- package/src/header/message.vue +3 -3
- package/src/header/nav.vue +26 -23
- package/src/header/publish.vue +2 -2
- package/src/header/search.vue +2 -2
- package/src/header/shop.vue +2 -2
- package/src/header/user.vue +4 -4
- package/src/header/userInfo.vue +22 -24
- package/src/header/vip.vue +2 -2
- package/src/interact/BoxcoinAdmin.vue +30 -16
- package/src/interact/BoxcoinRecords.vue +28 -11
- package/src/interact/BoxcoinUser.vue +33 -17
- package/src/interact/Fav.vue +5 -1
- package/src/interact/Homework.vue +317 -0
- package/src/interact/Like.vue +4 -2
- package/src/interact/QRcode.vue +104 -0
- package/src/interact/Rss.vue +10 -4
- package/src/interact/Share.vue +18 -19
- package/src/interact/WatchLater.vue +5 -1
- package/src/main.js +1 -0
- package/src/single/Author.vue +5 -1
- package/src/single/CmsSingle.vue +29 -15
- package/src/single/Collection.vue +36 -26
- package/src/single/Comment.vue +19 -13
- package/src/single/Creators.vue +5 -3
- package/src/single/PostCollection.vue +158 -0
- package/src/single/PostDirectory.vue +0 -126
- package/src/single/PostGuide.vue +93 -0
- package/src/single/PostHeader.vue +39 -17
- package/src/single/PostTopic.vue +3 -3
- package/src/single/PostVersion.vue +219 -0
- package/src/single/RightAffix.vue +160 -0
- package/src/single/SimpleThx.vue +4 -2
- package/src/single/Thx.vue +14 -2
- package/src/single/VersionDialog.vue +238 -0
- package/src/stories/components/StoryPropsTable.vue +137 -0
- package/src/stories/filters/FilterGallery.stories.js +110 -0
- package/src/stories/filters/clientBy.stories.js +24 -0
- package/src/stories/filters/markBy.stories.js +6 -0
- package/src/stories/filters/menuBy.stories.js +6 -0
- package/src/stories/filters/orderBy.stories.js +6 -0
- package/src/stories/filters/tagBy.stories.js +6 -0
- package/src/stories/filters/topicBy.stories.js +6 -0
- package/src/stories/filters/versionBy.stories.js +6 -0
- package/src/stories/filters/zlpBy.stories.js +6 -0
- package/src/stories/interact/QRcode.stories.js +59 -0
- package/src/stories/layout/BaseShell.stories.js +38 -0
- package/src/stories/layout/Breadcrumb.stories.js +40 -0
- package/src/stories/layout/CommonFooter.stories.js +1 -1
- package/src/stories/layout/CommonHeader.stories.js +1 -1
- package/src/stories/layout/LeftSideToggle.stories.js +78 -0
- package/src/stories/layout/LeftSidebar.stories.js +40 -0
- package/src/stories/layout/Main.stories.js +41 -0
- package/src/stories/layout/RightSidebar.stories.js +36 -0
- package/src/stories/layout/StorybookShell.vue +271 -0
- package/src/stories/layout/SuspendCommon.stories.js +67 -0
- package/src/stories/layout/SuspendCommonStage.vue +143 -0
- package/src/stories/mockData.js +369 -0
- package/src/stories/other/UserPop.stories.js +51 -0
- package/src/stories/single/Author.stories.js +19 -0
- package/src/stories/single/AuthorStoryStage.vue +103 -0
- package/src/stories/single/CmsSingle.stories.js +19 -0
- package/src/stories/single/CmsSingleStoryStage.vue +118 -0
- package/src/stories/single/Collection.stories.js +34 -0
- package/src/stories/single/Comment.stories.js +36 -0
- package/src/stories/single/Creators.stories.js +34 -0
- package/src/stories/single/PostCollection.stories.js +34 -0
- package/src/stories/single/PostDirectory.stories.js +31 -0
- package/src/stories/single/PostGuide.stories.js +47 -0
- package/src/stories/single/PostHeader.stories.js +39 -0
- package/src/stories/single/PostVersion.stories.js +41 -0
- package/src/stories/single/RightAffix.stories.js +84 -0
- package/src/stories/single/SimpleThx.stories.js +39 -0
- package/src/stories/single/SingleGallery.stories.js +207 -0
- package/src/stories/single/Thx.stories.js +38 -0
- package/src/stories/wiki/GamePrice.stories.js +64 -0
- package/src/stories/wiki/WikiComments.stories.js +58 -0
- package/src/stories/wiki/WikiPanel.stories.js +69 -0
- package/src/stories/wiki/WikiRevisions.stories.js +47 -0
- package/src/wiki/GamePrice.vue +107 -0
- package/src/wiki/WikiComment.vue +153 -0
- package/src/wiki/WikiComments.vue +206 -0
- package/src/wiki/WikiPanel.vue +121 -0
- package/src/wiki/WikiRevisions.vue +125 -0
- package/vue.config.js +2 -12
- package/assets/css/common/bottom.less +0 -25
- package/assets/css/editor/article.less +0 -36
- package/assets/css/editor/combo.less +0 -362
- package/assets/css/editor/resource.less +0 -399
- package/assets/css/editor/tinymce.less +0 -100
- package/assets/css/editor/upload.less +0 -136
- package/assets/css/module/author.less +0 -231
- package/assets/css/module/buff.less +0 -88
- package/assets/css/module/directory.less +0 -165
- package/assets/css/module/icon.less +0 -25
- package/assets/css/module/item.less +0 -279
- package/assets/css/module/item_simple.less +0 -58
- package/assets/css/module/jx3_element.less +0 -5
- package/assets/css/module/macro.less +0 -89
- package/assets/css/module/npc.less +0 -265
- package/assets/css/module/resource.less +0 -93
- package/assets/css/module/skill.less +0 -74
- package/assets/css/module/talent.less +0 -495
- package/assets/js/a.js +0 -46
- package/assets/js/code.js +0 -13
- package/assets/js/combo.js +0 -40
- package/assets/js/directory.js +0 -114
- package/assets/js/filter2.js +0 -186
- package/assets/js/fold.js +0 -11
- package/assets/js/gallery.js +0 -14
- package/assets/js/hljs_languages.js +0 -177
- package/assets/js/iframe.js +0 -38
- package/assets/js/img.js +0 -23
- package/assets/js/item/attribute_percent.js +0 -88
- package/assets/js/item/bind.js +0 -18
- package/assets/js/item/border.js +0 -19
- package/assets/js/item/border_quest.js +0 -12
- package/assets/js/item/color.js +0 -25
- package/assets/js/item/hljs_languages.js +0 -177
- package/assets/js/item/icon_url.js +0 -15
- package/assets/js/item/second_format.js +0 -19
- package/assets/js/jx3_element.js +0 -73
- package/assets/js/katex.js +0 -181
- package/assets/js/macro.js +0 -16
- package/assets/js/nextpage.js +0 -4
- package/assets/js/pswp.js +0 -67
- package/assets/js/pswp_template.js +0 -66
- package/assets/js/pz_iframe.js +0 -30
- package/assets/js/qixue.js +0 -28
- package/assets/js/renderImgPreview.js +0 -18
- package/assets/js/script.js +0 -6
- package/assets/js/stat.js +0 -107
- package/assets/js/talent2.js +0 -21
- package/assets/js/tex-mml-chtml.js +0 -36310
- package/assets/js/voice.js +0 -238
- package/assets/js/xss.js +0 -130
- package/src/editor/Article.vue +0 -230
- package/src/editor/BoxResource.vue +0 -441
- package/src/editor/Resource.vue +0 -623
- package/src/editor/Tinymce.vue +0 -204
- package/src/editor/Upload.vue +0 -277
- package/src/editor/UploadAlum.vue +0 -176
- package/src/editor/UploadBanner.vue +0 -156
- package/src/editor/components/Author.vue +0 -322
- package/src/editor/components/Avatar.vue +0 -95
- package/src/editor/components/Buff.vue +0 -80
- package/src/editor/components/Combo.vue +0 -259
- package/src/editor/components/Equip.vue +0 -299
- package/src/editor/components/GameText.vue +0 -242
- package/src/editor/components/Item.vue +0 -325
- package/src/editor/components/ItemSimple.vue +0 -134
- package/src/editor/components/Medal.vue +0 -43
- package/src/editor/components/Npc.vue +0 -215
- package/src/editor/components/PostAuthor.vue +0 -102
- package/src/editor/components/Skill.vue +0 -71
package/src/interact/Share.vue
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
class="u-share2-item"
|
|
9
9
|
:key="shareItem.key"
|
|
10
10
|
@click="share(shareItem.key)"
|
|
11
|
-
title="分享"
|
|
11
|
+
:title="$jx3boxT('jx3boxUi.share.share', '分享')"
|
|
12
12
|
>
|
|
13
13
|
<img class="u-share-icon" svg-inline :src="shareItem.img" :alt="shareItem.name">
|
|
14
14
|
<div class="u-share2-name">{{ shareItem.name }}</div>
|
|
@@ -22,24 +22,21 @@
|
|
|
22
22
|
:size="75"
|
|
23
23
|
level="H"
|
|
24
24
|
></qrcode-vue>
|
|
25
|
-
<span
|
|
25
|
+
<span>{{ $jx3boxT("jx3boxUi.share.wechatShare", "微信扫一扫分享") }}</span>
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
28
|
|
|
29
29
|
<template #reference>
|
|
30
|
-
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
:src="iconPath"
|
|
41
|
-
/>
|
|
42
|
-
<!-- </el-tooltip> -->
|
|
30
|
+
<div v-if="simple">
|
|
31
|
+
<img class="u-icon u-simple-icon" svg-inline :src="iconPath" />
|
|
32
|
+
<span class="u-text">{{ $jx3boxT("jx3boxUi.share.share", "分享") }}</span>
|
|
33
|
+
</div>
|
|
34
|
+
<img
|
|
35
|
+
v-else
|
|
36
|
+
class="u-icon"
|
|
37
|
+
svg-inline
|
|
38
|
+
:src="iconPath"
|
|
39
|
+
/>
|
|
43
40
|
</template>
|
|
44
41
|
</el-popover>
|
|
45
42
|
</div>
|
|
@@ -48,10 +45,12 @@
|
|
|
48
45
|
<script>
|
|
49
46
|
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
50
47
|
import QrcodeVue from "qrcode.vue";
|
|
48
|
+
import i18nMixin from "../../i18n/mixin";
|
|
51
49
|
|
|
52
50
|
const { __imgPath } = JX3BOX;
|
|
53
51
|
export default {
|
|
54
52
|
name: "ShareComp",
|
|
53
|
+
mixins: [i18nMixin],
|
|
55
54
|
props: {
|
|
56
55
|
postType: {
|
|
57
56
|
type: String,
|
|
@@ -81,22 +80,22 @@ export default {
|
|
|
81
80
|
},
|
|
82
81
|
shareList: [
|
|
83
82
|
{
|
|
84
|
-
name:
|
|
83
|
+
name: this.$jx3boxT("jx3boxUi.share.weibo", "微博"),
|
|
85
84
|
key: 'weibo',
|
|
86
85
|
img: require('../../assets/img/widget/weibo.svg'),
|
|
87
86
|
},
|
|
88
87
|
{
|
|
89
|
-
name:
|
|
88
|
+
name: this.$jx3boxT("jx3boxUi.share.qq", "QQ"),
|
|
90
89
|
key: 'qq',
|
|
91
90
|
img: require('../../assets/img/widget/qq.svg'),
|
|
92
91
|
},
|
|
93
92
|
{
|
|
94
|
-
name:
|
|
93
|
+
name: this.$jx3boxT("jx3boxUi.share.qzone", "QQ空间"),
|
|
95
94
|
key: 'qzone',
|
|
96
95
|
img: require('../../assets/img/widget/qzone.svg'),
|
|
97
96
|
},
|
|
98
97
|
{
|
|
99
|
-
name:
|
|
98
|
+
name: this.$jx3boxT("jx3boxUi.share.tieba", "贴吧"),
|
|
100
99
|
key: 'tieba',
|
|
101
100
|
img: require('../../assets/img/widget/tieba.svg'),
|
|
102
101
|
},
|
|
@@ -14,8 +14,10 @@ import User from "@jx3box/jx3box-common/js/user";
|
|
|
14
14
|
const JX3BOX = require("@jx3box/jx3box-common/data/jx3box.json");
|
|
15
15
|
import { addWatchLater, delWatchLater } from "../../service/fav";
|
|
16
16
|
import { omit } from "lodash";
|
|
17
|
+
import i18nMixin from "../../i18n/mixin";
|
|
17
18
|
export default {
|
|
18
19
|
name: "WatchLater",
|
|
20
|
+
mixins: [i18nMixin],
|
|
19
21
|
props: {
|
|
20
22
|
category: {
|
|
21
23
|
type: String,
|
|
@@ -46,7 +48,9 @@ export default {
|
|
|
46
48
|
},
|
|
47
49
|
computed: {
|
|
48
50
|
favContent() {
|
|
49
|
-
return this.favorite
|
|
51
|
+
return this.favorite
|
|
52
|
+
? this.$jx3boxT("jx3boxUi.watchLater.added", "已添加稍后在看")
|
|
53
|
+
: this.$jx3boxT("jx3boxUi.watchLater.add", "添加至稍后再看");
|
|
50
54
|
},
|
|
51
55
|
addSrc() {
|
|
52
56
|
return JX3BOX.__cdn + "design/vector/icon/time.svg"
|
package/src/main.js
CHANGED
|
@@ -46,6 +46,7 @@ import zhTw from "element-plus/es/locale/lang/zh-tw";
|
|
|
46
46
|
import vi from "element-plus/es/locale/lang/vi";
|
|
47
47
|
import "element-plus/dist/index.css";
|
|
48
48
|
import "@jx3box/jx3box-common/css/element-plus-theme.scss";
|
|
49
|
+
import "@jx3box/jx3box-common/css/element-fonticon.css";
|
|
49
50
|
|
|
50
51
|
const __elementLocaleMap = {
|
|
51
52
|
"zh-CN": zhCn,
|
package/src/single/Author.vue
CHANGED
|
@@ -6,7 +6,9 @@
|
|
|
6
6
|
<!-- <AuthorFollow style="margin-right: 8px;" :uid="uid" /> -->
|
|
7
7
|
<AuthorRss :uid="uid" :data="data" />
|
|
8
8
|
<!-- <AuthorGift :uid="uid" /> -->
|
|
9
|
-
<el-button class="u-btn" size="small" @click="onMessage" icon="Message"
|
|
9
|
+
<el-button class="u-btn" size="small" @click="onMessage" icon="Message">{{
|
|
10
|
+
$jx3boxT("jx3boxUi.author.message", "私信")
|
|
11
|
+
}}</el-button
|
|
10
12
|
>
|
|
11
13
|
</div>
|
|
12
14
|
<!-- <AuthorLink class="u-block u-links" :uid="uid" :data="data" /> -->
|
|
@@ -29,9 +31,11 @@ import AuthorMedals from "../author/AuthorMedals.vue";
|
|
|
29
31
|
// import AuthorTeams from "../author/AuthorTeams.vue";
|
|
30
32
|
import AuthorPosts from "../author/AuthorPosts.vue";
|
|
31
33
|
import AuthorRss from "../author/AuthorRss.vue";
|
|
34
|
+
import i18nMixin from "../../i18n/mixin";
|
|
32
35
|
const jx3box = require("@jx3box/jx3box-common/data/jx3box.json");
|
|
33
36
|
export default {
|
|
34
37
|
name: "AuthorComp",
|
|
38
|
+
mixins: [i18nMixin],
|
|
35
39
|
props: {
|
|
36
40
|
uid: {
|
|
37
41
|
type: [Number, String],
|
package/src/single/CmsSingle.vue
CHANGED
|
@@ -24,8 +24,7 @@
|
|
|
24
24
|
<el-divider content-position="left">JX3BOX</el-divider>
|
|
25
25
|
<div class="m-single-content">
|
|
26
26
|
<slot></slot>
|
|
27
|
-
|
|
28
|
-
<Article :content="post_content" @directoryRendered="updateDirectory" />
|
|
27
|
+
<Article :content="post_content" :post_mode="post_mode" @directoryRendered="updateDirectory" />
|
|
29
28
|
</div>
|
|
30
29
|
</div>
|
|
31
30
|
<div class="m-single-null" v-else>
|
|
@@ -48,13 +47,19 @@
|
|
|
48
47
|
:authors="authors"
|
|
49
48
|
:client="post_client"
|
|
50
49
|
showRss
|
|
50
|
+
v-if="showThx"
|
|
51
51
|
/>
|
|
52
52
|
|
|
53
53
|
<!-- 评论 -->
|
|
54
54
|
<div ref="commentView" class="m-single-comment">
|
|
55
|
-
<el-divider content-position="left"
|
|
55
|
+
<el-divider content-position="left">{{ $jx3boxT("jx3boxUi.cmsSingle.comment", "评论") }}</el-divider>
|
|
56
56
|
<Comment :id="id" category="post" v-if="id && allow_comment" />
|
|
57
|
-
<el-alert
|
|
57
|
+
<el-alert
|
|
58
|
+
:title="$jx3boxT('jx3boxUi.cmsSingle.commentDisabled', '作者没有开启评论功能')"
|
|
59
|
+
type="warning"
|
|
60
|
+
show-icon
|
|
61
|
+
v-else
|
|
62
|
+
></el-alert>
|
|
58
63
|
</div>
|
|
59
64
|
</div>
|
|
60
65
|
|
|
@@ -63,13 +68,13 @@
|
|
|
63
68
|
<slot name="single-footer"></slot>
|
|
64
69
|
</footer>
|
|
65
70
|
|
|
66
|
-
|
|
71
|
+
<right-affix
|
|
67
72
|
:postId="id"
|
|
68
73
|
:postType="post_type"
|
|
69
74
|
:postTitle="post_title"
|
|
70
75
|
:showComment="id && allow_comment"
|
|
71
76
|
@toComment="toComment($event)"
|
|
72
|
-
></right-affix>
|
|
77
|
+
></right-affix>
|
|
73
78
|
</div>
|
|
74
79
|
</template>
|
|
75
80
|
|
|
@@ -78,26 +83,24 @@ import PostHeader from "./PostHeader.vue";
|
|
|
78
83
|
import Creators from "./Creators.vue";
|
|
79
84
|
import Collection from "./Collection.vue";
|
|
80
85
|
import Thx from "./Thx.vue";
|
|
81
|
-
|
|
82
|
-
import Article from "
|
|
83
|
-
// import ArticleMarkdown from "@jx3box/jx3box-editor/src/ArticleMarkdown.vue";
|
|
84
|
-
import Comment from "./Comment.vue";
|
|
86
|
+
import RightAffix from "./RightAffix.vue";
|
|
87
|
+
import Article from "@jx3box/jx3box-editor/src/Article.vue";
|
|
85
88
|
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
86
89
|
import { getAppType } from "@jx3box/jx3box-common/js/utils";
|
|
90
|
+
import i18nMixin from "../../i18n/mixin";
|
|
87
91
|
|
|
88
92
|
const { __visibleMap } = JX3BOX;
|
|
89
93
|
|
|
90
94
|
export default {
|
|
91
95
|
name: "cms-single",
|
|
96
|
+
mixins: [i18nMixin],
|
|
92
97
|
components: {
|
|
93
98
|
PostHeader,
|
|
94
99
|
Creators,
|
|
95
100
|
Collection,
|
|
96
101
|
Thx,
|
|
97
102
|
Article,
|
|
98
|
-
|
|
99
|
-
Comment,
|
|
100
|
-
// RightAffix,
|
|
103
|
+
RightAffix,
|
|
101
104
|
},
|
|
102
105
|
props: {
|
|
103
106
|
post: {
|
|
@@ -108,6 +111,10 @@ export default {
|
|
|
108
111
|
type: Object,
|
|
109
112
|
default: () => ({}),
|
|
110
113
|
},
|
|
114
|
+
showThx: {
|
|
115
|
+
type: Boolean,
|
|
116
|
+
default: true,
|
|
117
|
+
},
|
|
111
118
|
},
|
|
112
119
|
data: function () {
|
|
113
120
|
return {
|
|
@@ -145,7 +152,7 @@ export default {
|
|
|
145
152
|
return !!this.post?._check;
|
|
146
153
|
},
|
|
147
154
|
null_tip: function () {
|
|
148
|
-
let str = "作者设置了【";
|
|
155
|
+
let str = this.$jx3boxT("jx3boxUi.cmsSingle.authorSet", "作者设置了【");
|
|
149
156
|
str += __visibleMap[this.post?.visible];
|
|
150
157
|
str += "】";
|
|
151
158
|
return str;
|
|
@@ -185,6 +192,10 @@ export default {
|
|
|
185
192
|
}
|
|
186
193
|
},
|
|
187
194
|
methods: {
|
|
195
|
+
shouldSkipNavigation: function () {
|
|
196
|
+
if (typeof window === "undefined" || typeof location === "undefined") return false;
|
|
197
|
+
return location.pathname.includes("iframe.html") || !!window.__STORYBOOK_PREVIEW__;
|
|
198
|
+
},
|
|
188
199
|
updateCollection: function (val) {
|
|
189
200
|
this.collection_data = val;
|
|
190
201
|
},
|
|
@@ -214,7 +225,7 @@ export default {
|
|
|
214
225
|
deep: true,
|
|
215
226
|
immediate: true,
|
|
216
227
|
handler: function (val) {
|
|
217
|
-
if (location.host.includes("localhost")) {
|
|
228
|
+
if (location.host.includes("localhost") || this.shouldSkipNavigation()) {
|
|
218
229
|
return;
|
|
219
230
|
}
|
|
220
231
|
|
|
@@ -226,6 +237,9 @@ export default {
|
|
|
226
237
|
community_id: {
|
|
227
238
|
immediate: true,
|
|
228
239
|
handler(val) {
|
|
240
|
+
if (this.shouldSkipNavigation()) {
|
|
241
|
+
return;
|
|
242
|
+
}
|
|
229
243
|
if (val && val != 0) {
|
|
230
244
|
// 防止死循环
|
|
231
245
|
if (location.href.includes(`/community/${val}`)) {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="w-collection" v-if="list && list.length">
|
|
3
3
|
<div class="w-collection-title" @click="handleShow" :class="{ on: visible }">
|
|
4
|
-
<
|
|
4
|
+
<el-icon><Notebook /></el-icon>
|
|
5
|
+
{{ $jx3boxT("jx3boxUi.collection.included", "该作品已被收录至作者的剑三小册") }}
|
|
5
6
|
<a @click.stop :href="collectionLink(id)" target="_blank">《{{ title }}》</a>
|
|
6
7
|
</div>
|
|
7
8
|
<transition name="fade">
|
|
@@ -9,7 +10,6 @@
|
|
|
9
10
|
<ol v-if="list && list.length" class="u-list" :style="{ display: visible ? 'block' : 'none' }">
|
|
10
11
|
<li v-for="(item, i) in list" :key="i" class="u-item">
|
|
11
12
|
<a v-if="item" :href="showLink(item)" target="_blank">
|
|
12
|
-
<!-- <i class="el-icon-link"></i> -->
|
|
13
13
|
{{ item.title }}
|
|
14
14
|
</a>
|
|
15
15
|
</li>
|
|
@@ -23,21 +23,23 @@
|
|
|
23
23
|
import * as utilModule from "@jx3box/jx3box-common/js/utils";
|
|
24
24
|
const { getLink } = utilModule;
|
|
25
25
|
import { getCollection } from "../../service/cms";
|
|
26
|
+
import i18nMixin from "../../i18n/mixin";
|
|
26
27
|
export default {
|
|
27
28
|
name: "SingleCollection",
|
|
29
|
+
mixins: [i18nMixin],
|
|
28
30
|
props: {
|
|
29
31
|
id: {
|
|
30
32
|
type: [Number, String],
|
|
31
33
|
default: 0,
|
|
32
34
|
},
|
|
33
35
|
defaultVisible: {
|
|
34
|
-
type: Boolean,
|
|
36
|
+
type: [Boolean, Number],
|
|
35
37
|
default: false,
|
|
36
38
|
},
|
|
37
39
|
},
|
|
38
40
|
inject: [],
|
|
39
41
|
components: {},
|
|
40
|
-
data: function() {
|
|
42
|
+
data: function () {
|
|
41
43
|
return {
|
|
42
44
|
visible: this.defaultVisible || false,
|
|
43
45
|
data: {
|
|
@@ -47,17 +49,17 @@ export default {
|
|
|
47
49
|
};
|
|
48
50
|
},
|
|
49
51
|
computed: {
|
|
50
|
-
title: function() {
|
|
52
|
+
title: function () {
|
|
51
53
|
return this.data?.title;
|
|
52
54
|
},
|
|
53
|
-
list: function() {
|
|
55
|
+
list: function () {
|
|
54
56
|
return this.data?.posts;
|
|
55
57
|
},
|
|
56
58
|
},
|
|
57
59
|
watch: {
|
|
58
60
|
id: {
|
|
59
61
|
immediate: true,
|
|
60
|
-
handler: function(val) {
|
|
62
|
+
handler: function (val) {
|
|
61
63
|
if (~~val) {
|
|
62
64
|
this.loadData();
|
|
63
65
|
} else {
|
|
@@ -68,24 +70,24 @@ export default {
|
|
|
68
70
|
}
|
|
69
71
|
},
|
|
70
72
|
},
|
|
71
|
-
defaultVisible: function(val) {
|
|
73
|
+
defaultVisible: function (val) {
|
|
72
74
|
this.visible = val;
|
|
73
75
|
},
|
|
74
76
|
},
|
|
75
77
|
methods: {
|
|
76
|
-
handleShow: function() {
|
|
78
|
+
handleShow: function () {
|
|
77
79
|
this.visible = !this.visible;
|
|
78
80
|
},
|
|
79
|
-
loadData: function() {
|
|
81
|
+
loadData: function () {
|
|
80
82
|
getCollection(this.id).then((res) => {
|
|
81
83
|
this.data = res.data?.data;
|
|
82
|
-
this.$emit(
|
|
84
|
+
this.$emit("collectionUpdate", this.data);
|
|
83
85
|
});
|
|
84
86
|
},
|
|
85
|
-
collectionLink: function(id) {
|
|
87
|
+
collectionLink: function (id) {
|
|
86
88
|
return getLink("collection", id);
|
|
87
89
|
},
|
|
88
|
-
showLink: function(item) {
|
|
90
|
+
showLink: function (item) {
|
|
89
91
|
if (item.type == "custom") {
|
|
90
92
|
return item.url;
|
|
91
93
|
} else {
|
|
@@ -93,20 +95,23 @@ export default {
|
|
|
93
95
|
}
|
|
94
96
|
},
|
|
95
97
|
},
|
|
96
|
-
created: function() {},
|
|
97
|
-
mounted: function() {},
|
|
98
|
+
created: function () {},
|
|
99
|
+
mounted: function () {},
|
|
98
100
|
};
|
|
99
101
|
</script>
|
|
100
102
|
|
|
101
103
|
<style lang="less">
|
|
102
104
|
.w-collection {
|
|
103
|
-
|
|
105
|
+
--el-color-primary: @primary;
|
|
106
|
+
|
|
107
|
+
.w-collection-title {
|
|
104
108
|
cursor: pointer;
|
|
105
109
|
position: relative;
|
|
106
110
|
border: 1px solid #ddd;
|
|
107
111
|
background-color: #fafbfc;
|
|
108
112
|
padding: 8px 10px 8px 10px;
|
|
109
|
-
display: block;
|
|
113
|
+
// display: block;
|
|
114
|
+
.flex(y);
|
|
110
115
|
margin-bottom: 0;
|
|
111
116
|
border-radius: 4px;
|
|
112
117
|
line-height: 1.6;
|
|
@@ -130,17 +135,30 @@ export default {
|
|
|
130
135
|
}
|
|
131
136
|
|
|
132
137
|
a {
|
|
133
|
-
|
|
138
|
+
color: var(--el-color-primary);
|
|
139
|
+
&:hover {
|
|
140
|
+
.underline(var(--el-color-primary));
|
|
141
|
+
}
|
|
134
142
|
}
|
|
135
143
|
}
|
|
136
144
|
|
|
137
145
|
counter-reset: collection;
|
|
146
|
+
|
|
147
|
+
.u-list {
|
|
148
|
+
padding: 10px 20px;
|
|
149
|
+
margin: 0;
|
|
150
|
+
border: 1px dashed #ddd;
|
|
151
|
+
background: none;
|
|
152
|
+
border-top: none;
|
|
153
|
+
}
|
|
154
|
+
|
|
138
155
|
.u-item {
|
|
139
156
|
.fz(13px, 32px);
|
|
140
157
|
border-bottom: 1px solid #eee;
|
|
141
158
|
transition: 0.15s ease-in-out;
|
|
142
159
|
.nobreak;
|
|
143
160
|
a {
|
|
161
|
+
color: var(--el-color-primary);
|
|
144
162
|
.db;
|
|
145
163
|
&:before {
|
|
146
164
|
counter-increment: collection;
|
|
@@ -158,14 +176,6 @@ export default {
|
|
|
158
176
|
}
|
|
159
177
|
}
|
|
160
178
|
|
|
161
|
-
.u-list {
|
|
162
|
-
padding: 10px 20px;
|
|
163
|
-
margin: 0;
|
|
164
|
-
border: 1px dashed #ddd;
|
|
165
|
-
background: none;
|
|
166
|
-
border-top: none;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
179
|
.on {
|
|
170
180
|
&::after {
|
|
171
181
|
transform: rotate(90deg);
|
package/src/single/Comment.vue
CHANGED
|
@@ -4,10 +4,10 @@
|
|
|
4
4
|
<CommentInputForm @submit="userSubmitInputForm" />
|
|
5
5
|
<div class="c-comment-panel">
|
|
6
6
|
<div class="u-order">
|
|
7
|
-
<span class="u-label"
|
|
7
|
+
<span class="u-label">{{ $jx3boxT("jx3boxUi.comment.sortMode", "排序模式:") }}</span>
|
|
8
8
|
<el-radio-group v-model="isDesc" @change="changeOrder" size="small">
|
|
9
|
-
<el-radio-button value="DESC"
|
|
10
|
-
<el-radio-button value="ASC"
|
|
9
|
+
<el-radio-button value="DESC">{{ $jx3boxT("jx3boxUi.comment.desc", "最后靠前") }}</el-radio-button>
|
|
10
|
+
<el-radio-button value="ASC">{{ $jx3boxT("jx3boxUi.comment.asc", "最早靠前") }}</el-radio-button>
|
|
11
11
|
</el-radio-group>
|
|
12
12
|
</div>
|
|
13
13
|
<div class="u-op">
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
class="c-comment-panel-likes"
|
|
16
16
|
v-model="orderByLikes"
|
|
17
17
|
@change="changeOrderByLikes"
|
|
18
|
-
active-text="获赞靠前"
|
|
18
|
+
:active-text="$jx3boxT('jx3boxUi.comment.likesFirst', '获赞靠前')"
|
|
19
19
|
>
|
|
20
20
|
</el-switch>
|
|
21
21
|
<el-switch
|
|
@@ -23,8 +23,8 @@
|
|
|
23
23
|
v-model="openWhiteList"
|
|
24
24
|
@change="changeWhiteList"
|
|
25
25
|
v-if="commentPower.is_author || commentPower.is_editor"
|
|
26
|
-
active-text="开启过滤"
|
|
27
|
-
title="开启过滤后,仅设为显示的评论可被其他人所见"
|
|
26
|
+
:active-text="$jx3boxT('jx3boxUi.comment.openWhitelist', '开启过滤')"
|
|
27
|
+
:title="$jx3boxT('jx3boxUi.comment.openWhitelistTip', '开启过滤后,仅设为显示的评论可被其他人所见')"
|
|
28
28
|
>
|
|
29
29
|
</el-switch>
|
|
30
30
|
</div>
|
|
@@ -87,8 +87,10 @@ import CommentWithReply from "../comment/CommentWithReply.vue";
|
|
|
87
87
|
import { GET, POST, DELETE, PUT, getOrderMode, setOrderMode } from "../../service/comment";
|
|
88
88
|
import { getConfig } from "../../service/cms";
|
|
89
89
|
import User from "@jx3box/jx3box-common/js/user";
|
|
90
|
+
import i18nMixin from "../../i18n/mixin";
|
|
90
91
|
export default {
|
|
91
92
|
name: "CommentComp",
|
|
93
|
+
mixins: [i18nMixin],
|
|
92
94
|
props: {
|
|
93
95
|
id: {
|
|
94
96
|
type: [Number, String],
|
|
@@ -197,7 +199,7 @@ export default {
|
|
|
197
199
|
.then(() => {
|
|
198
200
|
this.$notify({
|
|
199
201
|
title: "",
|
|
200
|
-
message: "删除成功!",
|
|
202
|
+
message: this.$jx3boxT("jx3boxUi.comment.deleteSuccess", "删除成功!"),
|
|
201
203
|
type: "success",
|
|
202
204
|
duration: 3000,
|
|
203
205
|
position: "bottom-right",
|
|
@@ -211,7 +213,7 @@ export default {
|
|
|
211
213
|
.then(() => {
|
|
212
214
|
this.$notify({
|
|
213
215
|
title: "",
|
|
214
|
-
message: "操作成功!",
|
|
216
|
+
message: this.$jx3boxT("jx3boxUi.comment.actionSuccess", "操作成功!"),
|
|
215
217
|
type: "success",
|
|
216
218
|
duration: 3000,
|
|
217
219
|
position: "bottom-right",
|
|
@@ -245,7 +247,7 @@ export default {
|
|
|
245
247
|
.then((responseJSON) => {
|
|
246
248
|
if (responseJSON && ~~responseJSON.code > 0) {
|
|
247
249
|
this.$notify({
|
|
248
|
-
title: "评论失败",
|
|
250
|
+
title: this.$jx3boxT("jx3boxUi.comment.commentFailed", "评论失败"),
|
|
249
251
|
message: responseJSON.msg || "",
|
|
250
252
|
type: "error",
|
|
251
253
|
duration: 3000,
|
|
@@ -255,7 +257,7 @@ export default {
|
|
|
255
257
|
}
|
|
256
258
|
this.$notify({
|
|
257
259
|
title: "",
|
|
258
|
-
message: "评论成功!",
|
|
260
|
+
message: this.$jx3boxT("jx3boxUi.comment.commentSuccess", "评论成功!"),
|
|
259
261
|
type: "success",
|
|
260
262
|
duration: 3000,
|
|
261
263
|
position: "bottom-right",
|
|
@@ -371,16 +373,16 @@ export default {
|
|
|
371
373
|
cursor: pointer;
|
|
372
374
|
margin-right: 10px;
|
|
373
375
|
// margin-left: 10px;
|
|
374
|
-
color: #
|
|
376
|
+
color: #555;
|
|
377
|
+
.pr;top:-1px;
|
|
375
378
|
|
|
376
379
|
&:hover {
|
|
377
|
-
color:
|
|
380
|
+
color: var(--el-color-primary);
|
|
378
381
|
}
|
|
379
382
|
}
|
|
380
383
|
.c-jx3box-emotion {
|
|
381
384
|
margin: 0;
|
|
382
385
|
position: relative;
|
|
383
|
-
top: 7px;
|
|
384
386
|
}
|
|
385
387
|
.c-comment-emotion {
|
|
386
388
|
overflow: hidden;
|
|
@@ -448,6 +450,10 @@ export default {
|
|
|
448
450
|
b {
|
|
449
451
|
color: #0366d6;
|
|
450
452
|
}
|
|
453
|
+
.u-order{
|
|
454
|
+
.flex;
|
|
455
|
+
align-items: center;
|
|
456
|
+
}
|
|
451
457
|
}
|
|
452
458
|
.c-comment-emotion {
|
|
453
459
|
max-height: 168px;
|
package/src/single/Creators.vue
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="w-creators" v-if="visible">
|
|
3
|
-
<span class="w-creators-title"
|
|
3
|
+
<span class="w-creators-title">{{ $jx3boxT("jx3boxUi.creators.title", "联合创作") }}</span>
|
|
4
4
|
<a
|
|
5
5
|
class="w-creators-super w-creators-item"
|
|
6
6
|
v-if="super_author"
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
</a>
|
|
27
27
|
</div>
|
|
28
28
|
<a class="w-creators-edit" :href="editLink" v-if="isCreator">
|
|
29
|
-
<el-icon><Edit /></el-icon> 编辑当前作品
|
|
29
|
+
<el-icon><Edit /></el-icon> {{ $jx3boxT("jx3boxUi.creators.editCurrent", "编辑当前作品") }}
|
|
30
30
|
</a>
|
|
31
31
|
</div>
|
|
32
32
|
</template>
|
|
@@ -35,8 +35,10 @@
|
|
|
35
35
|
import { getPostAuthors } from "../../service/cms";
|
|
36
36
|
import { showAvatar, authorLink, editLink } from "@jx3box/jx3box-common/js/utils";
|
|
37
37
|
import User from "@jx3box/jx3box-common/js/user";
|
|
38
|
+
import i18nMixin from "../../i18n/mixin";
|
|
38
39
|
export default {
|
|
39
40
|
name: "SingleCreators",
|
|
41
|
+
mixins: [i18nMixin],
|
|
40
42
|
props: {
|
|
41
43
|
postId: {
|
|
42
44
|
type: [Number, String],
|
|
@@ -173,7 +175,7 @@ export default {
|
|
|
173
175
|
.bold;
|
|
174
176
|
.db;
|
|
175
177
|
color: @color;
|
|
176
|
-
margin-bottom: 2px;
|
|
178
|
+
// margin-bottom: 2px;
|
|
177
179
|
.nobreak;
|
|
178
180
|
max-width: 120px;
|
|
179
181
|
}
|