@jx3box/jx3box-ui 2.0.3 → 2.0.4
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/README.md +51 -0
- package/i18n/messages/en-US.js +1 -0
- package/i18n/messages/vi.js +1 -0
- package/i18n/messages/zh-CN.js +1 -0
- package/i18n/messages/zh-TW.js +1 -0
- package/package.json +1 -1
- package/src/App.vue +1 -1
- package/src/comment/CommentContent.vue +10 -10
- package/src/footer/resource.vue +3 -1
- package/src/header/alternate.vue +2 -2
- package/src/header/box.vue +4 -4
- package/src/header/box2.vue +47 -14
- package/src/header/lang.vue +1 -2
- package/src/header/logo.vue +2 -2
- package/src/header/userInfo.vue +4 -4
- package/src/header/bus.js +0 -9
- /package/docs/{README.md → i18n.md} +0 -0
- /package/src/single/{cms-single.vue → CmsSingle.vue} +0 -0
package/README.md
CHANGED
|
@@ -50,3 +50,54 @@
|
|
|
50
50
|
- topicBy 主题筛选
|
|
51
51
|
- versionBy 版本筛选
|
|
52
52
|
- zlpBy 资料片筛选
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
### 顶部模块
|
|
56
|
+
|
|
57
|
+
主要是header的模块
|
|
58
|
+
|
|
59
|
+
- alternate 马甲切换
|
|
60
|
+
- asset 用户资产
|
|
61
|
+
- box 魔盒矩阵(移动端)
|
|
62
|
+
- box2 魔盒矩阵(PC)
|
|
63
|
+
- client 客户端切换
|
|
64
|
+
- lang 语言切换
|
|
65
|
+
- logo
|
|
66
|
+
- manage 后台管理入口
|
|
67
|
+
- message 消息中心入口
|
|
68
|
+
- nav 导航栏
|
|
69
|
+
- publish 创作中心入口
|
|
70
|
+
- search 搜索框
|
|
71
|
+
- shop 商城入口
|
|
72
|
+
- user 用户头像+信息pop
|
|
73
|
+
- 会员中心入口
|
|
74
|
+
|
|
75
|
+
### 交互模块
|
|
76
|
+
|
|
77
|
+
主要是文章详情中用于用户交互的组件,包含打赏,分享,收藏等等
|
|
78
|
+
|
|
79
|
+
- BoxcoinAdmin 管理员品鉴
|
|
80
|
+
- BoxcoinRecords 品鉴+打赏记录
|
|
81
|
+
- BoxcoinUser 用户打赏
|
|
82
|
+
- Contributors 多人合作文章中打赏目标选择
|
|
83
|
+
- Fav 收藏
|
|
84
|
+
- Like 点赞
|
|
85
|
+
- Rss 订阅
|
|
86
|
+
- Share 分享
|
|
87
|
+
- WatchLater 稍后再看
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
### 单页
|
|
91
|
+
|
|
92
|
+
主要是用于详情页的展示内容
|
|
93
|
+
|
|
94
|
+
- Author 侧边栏作者信息
|
|
95
|
+
- CmsSingle 单页框架
|
|
96
|
+
- Collection 小册
|
|
97
|
+
- Comment 评论
|
|
98
|
+
- Creators 联合创作
|
|
99
|
+
- PostDirectory 目录
|
|
100
|
+
- PostHeader 创作信息
|
|
101
|
+
- PostTopic 右侧边栏头条
|
|
102
|
+
- SimpleThx 简单交互组件集合
|
|
103
|
+
- Thx 交互组件
|
package/i18n/messages/en-US.js
CHANGED
package/i18n/messages/vi.js
CHANGED
package/i18n/messages/zh-CN.js
CHANGED
package/i18n/messages/zh-TW.js
CHANGED
package/package.json
CHANGED
package/src/App.vue
CHANGED
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
</template>
|
|
79
79
|
|
|
80
80
|
<script>
|
|
81
|
-
import singlebox from "./single/
|
|
81
|
+
import singlebox from "./single/CmsSingle.vue";
|
|
82
82
|
import UploadAlum from "./editor/UploadAlum.vue";
|
|
83
83
|
import Author from "./single/Author.vue";
|
|
84
84
|
import SimpleThxVue from "./single/SimpleThx.vue";
|
|
@@ -213,27 +213,27 @@ export default {
|
|
|
213
213
|
default: "",
|
|
214
214
|
},
|
|
215
215
|
hasReply: {
|
|
216
|
-
type: Boolean,
|
|
216
|
+
type: [Boolean, Number],
|
|
217
217
|
default: false,
|
|
218
218
|
},
|
|
219
219
|
canDelete: {
|
|
220
|
-
type: Boolean,
|
|
220
|
+
type: [Boolean, Number],
|
|
221
221
|
default: false,
|
|
222
222
|
},
|
|
223
223
|
canSetTop: {
|
|
224
|
-
type: Boolean,
|
|
224
|
+
type: [Boolean, Number],
|
|
225
225
|
default: false,
|
|
226
226
|
},
|
|
227
227
|
canCancelTop: {
|
|
228
|
-
type: Boolean,
|
|
228
|
+
type: [Boolean, Number],
|
|
229
229
|
default: false,
|
|
230
230
|
},
|
|
231
231
|
canHide: {
|
|
232
|
-
type: Boolean,
|
|
232
|
+
type: [Boolean, Number],
|
|
233
233
|
default: false,
|
|
234
234
|
},
|
|
235
235
|
isLike: {
|
|
236
|
-
type: Boolean,
|
|
236
|
+
type: [Boolean, Number],
|
|
237
237
|
default: false,
|
|
238
238
|
},
|
|
239
239
|
likes: {
|
|
@@ -241,11 +241,11 @@ export default {
|
|
|
241
241
|
default: 0,
|
|
242
242
|
},
|
|
243
243
|
canSetStar: {
|
|
244
|
-
type: Boolean,
|
|
244
|
+
type: [Boolean, Number],
|
|
245
245
|
default: false,
|
|
246
246
|
},
|
|
247
247
|
canCancelStar: {
|
|
248
|
-
type: Boolean,
|
|
248
|
+
type: [Boolean, Number],
|
|
249
249
|
default: false,
|
|
250
250
|
},
|
|
251
251
|
attachments: {
|
|
@@ -257,11 +257,11 @@ export default {
|
|
|
257
257
|
default: 0,
|
|
258
258
|
},
|
|
259
259
|
canAddWhite: {
|
|
260
|
-
type: Boolean,
|
|
260
|
+
type: [Boolean, Number],
|
|
261
261
|
default: false,
|
|
262
262
|
},
|
|
263
263
|
canRemoveWhite: {
|
|
264
|
-
type: Boolean,
|
|
264
|
+
type: [Boolean, Number],
|
|
265
265
|
default: false,
|
|
266
266
|
},
|
|
267
267
|
},
|
package/src/footer/resource.vue
CHANGED
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
:alt="$jx3boxT('jx3boxUi.footer.qqBot', 'QQ机器人')"
|
|
63
63
|
/>
|
|
64
64
|
</div>
|
|
65
|
-
<div>
|
|
65
|
+
<div @click="copyText('3889010020')" class="cursor-pointer">
|
|
66
66
|
<p class="font-bold uppercase tracking-wider text-gray-500" style="font-size: 10px">
|
|
67
67
|
{{ $jx3boxT("jx3boxUi.footer.qqBotService", "QQ 机器人服务") }}
|
|
68
68
|
</p>
|
|
@@ -82,6 +82,7 @@
|
|
|
82
82
|
</template>
|
|
83
83
|
|
|
84
84
|
<script>
|
|
85
|
+
import { copyText } from "../../utils";
|
|
85
86
|
import i18nMixin from "../../i18n/mixin";
|
|
86
87
|
export default {
|
|
87
88
|
name: "FooterResource",
|
|
@@ -127,6 +128,7 @@ export default {
|
|
|
127
128
|
computed: {},
|
|
128
129
|
watch: {},
|
|
129
130
|
methods: {
|
|
131
|
+
copyText,
|
|
130
132
|
getDownloadName(item) {
|
|
131
133
|
if (item?.key) {
|
|
132
134
|
const k = item.key === "harmonyNext" ? "harmonyNext" : item.key;
|
package/src/header/alternate.vue
CHANGED
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
</template>
|
|
43
43
|
|
|
44
44
|
<script>
|
|
45
|
-
import Bus from "
|
|
45
|
+
import Bus from "../../utils/bus";
|
|
46
46
|
import { showAvatar } from "@jx3box/jx3box-common/js/utils";
|
|
47
47
|
import dayjs from "dayjs";
|
|
48
48
|
import User from "@jx3box/jx3box-common/js/user";
|
|
@@ -75,7 +75,7 @@ export default {
|
|
|
75
75
|
},
|
|
76
76
|
},
|
|
77
77
|
mounted() {
|
|
78
|
-
Bus
|
|
78
|
+
Bus.on("showAlternate", () => {
|
|
79
79
|
this.visible = true;
|
|
80
80
|
});
|
|
81
81
|
this.init();
|
package/src/header/box.vue
CHANGED
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
<script>
|
|
31
31
|
import search from "./search.vue";
|
|
32
32
|
import _ from "lodash";
|
|
33
|
-
import Bus from "
|
|
33
|
+
import Bus from "../../utils/bus";
|
|
34
34
|
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
35
35
|
import i18nMixin from "../../i18n/mixin";
|
|
36
36
|
import box from "../../assets/data/box.json";
|
|
@@ -76,7 +76,7 @@ export default {
|
|
|
76
76
|
},
|
|
77
77
|
methods: {
|
|
78
78
|
closeBox: function () {
|
|
79
|
-
Bus
|
|
79
|
+
Bus.emit("toggleBox", false);
|
|
80
80
|
},
|
|
81
81
|
matchedClient: function (client) {
|
|
82
82
|
return client == "all" ? true : client == this.client;
|
|
@@ -126,7 +126,7 @@ export default {
|
|
|
126
126
|
this.loadMenu();
|
|
127
127
|
},
|
|
128
128
|
mounted: function () {
|
|
129
|
-
Bus
|
|
129
|
+
Bus.on("toggleBox", (status) => {
|
|
130
130
|
if (status == undefined) {
|
|
131
131
|
this.status = !this.status;
|
|
132
132
|
} else {
|
|
@@ -134,7 +134,7 @@ export default {
|
|
|
134
134
|
}
|
|
135
135
|
});
|
|
136
136
|
document.addEventListener("click", function () {
|
|
137
|
-
Bus
|
|
137
|
+
Bus.emit("toggleBox", false);
|
|
138
138
|
});
|
|
139
139
|
},
|
|
140
140
|
components: {
|
package/src/header/box2.vue
CHANGED
|
@@ -41,6 +41,14 @@
|
|
|
41
41
|
<span class="u-txt">{{ item.abbr }}</span>
|
|
42
42
|
</a>
|
|
43
43
|
</li>
|
|
44
|
+
<li v-if="allMatched && filteredList.length > 0">
|
|
45
|
+
<a class="u-item" href="/app">
|
|
46
|
+
<div class="u-icon-wrap">
|
|
47
|
+
<img class="u-pic" svg-inline :src="allicon" />
|
|
48
|
+
</div>
|
|
49
|
+
<span class="u-txt">{{ $jx3boxT("jx3boxUi.header.all", "全部") }}</span>
|
|
50
|
+
</a>
|
|
51
|
+
</li>
|
|
44
52
|
</ul>
|
|
45
53
|
<div v-if="searchQuery && !homeMatched && filteredList.length === 0" class="u-empty">
|
|
46
54
|
未找到匹配应用
|
|
@@ -52,13 +60,15 @@
|
|
|
52
60
|
</template>
|
|
53
61
|
|
|
54
62
|
<script>
|
|
55
|
-
import Bus from "
|
|
63
|
+
import Bus from "../../utils/bus";
|
|
56
64
|
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
57
65
|
import i18nMixin from "../../i18n/mixin";
|
|
58
66
|
import box from "../../assets/data/box.json";
|
|
59
67
|
import { getMenu } from "../../service/header.js";
|
|
68
|
+
import axios from "axios";
|
|
69
|
+
import { flatten } from "lodash";
|
|
60
70
|
|
|
61
|
-
const {
|
|
71
|
+
const { __cdn, __imgPath } = JX3BOX;
|
|
62
72
|
|
|
63
73
|
export default {
|
|
64
74
|
name: "Box2",
|
|
@@ -67,17 +77,27 @@ export default {
|
|
|
67
77
|
return {
|
|
68
78
|
status: false,
|
|
69
79
|
searchQuery: "",
|
|
70
|
-
data:
|
|
80
|
+
data: [],
|
|
71
81
|
client: location.href.includes("origin") ? "origin" : "std",
|
|
72
82
|
};
|
|
73
83
|
},
|
|
74
84
|
computed: {
|
|
75
85
|
homeicon: function () {
|
|
76
|
-
return
|
|
86
|
+
return this.getBoxIcon("home.svg");
|
|
87
|
+
},
|
|
88
|
+
allicon: function () {
|
|
89
|
+
return this.getBoxIcon("more.svg");
|
|
77
90
|
},
|
|
78
91
|
list: function () {
|
|
79
92
|
return this.data.filter((item) => {
|
|
80
|
-
|
|
93
|
+
const currentClient = String(this.client || "").toLowerCase();
|
|
94
|
+
const rawClient = item.client;
|
|
95
|
+
const matchedClient = !rawClient
|
|
96
|
+
? true
|
|
97
|
+
: Array.isArray(rawClient)
|
|
98
|
+
? rawClient.map((c) => String(c || "").toLowerCase()).includes(currentClient)
|
|
99
|
+
: String(rawClient || "").toLowerCase().includes(currentClient);
|
|
100
|
+
return matchedClient;
|
|
81
101
|
});
|
|
82
102
|
},
|
|
83
103
|
filteredList: function () {
|
|
@@ -95,7 +115,12 @@ export default {
|
|
|
95
115
|
homeMatched: function () {
|
|
96
116
|
const query = (this.searchQuery || "").toLowerCase().trim();
|
|
97
117
|
if (!query) return true;
|
|
98
|
-
return "首页".includes(query);
|
|
118
|
+
return this.$jx3boxT("jx3boxUi.header.home", "首页").includes(query);
|
|
119
|
+
},
|
|
120
|
+
allMatched: function () {
|
|
121
|
+
const query = (this.searchQuery || "").toLowerCase().trim();
|
|
122
|
+
if (!query) return true;
|
|
123
|
+
return this.$jx3boxT("jx3boxUi.header.all", "全部").includes(query);
|
|
99
124
|
},
|
|
100
125
|
},
|
|
101
126
|
methods: {
|
|
@@ -135,18 +160,26 @@ export default {
|
|
|
135
160
|
},
|
|
136
161
|
loadMenu() {
|
|
137
162
|
try {
|
|
138
|
-
const
|
|
139
|
-
if (
|
|
140
|
-
this.data =
|
|
163
|
+
const data = JSON.parse(sessionStorage.getItem("box"));
|
|
164
|
+
if (data) {
|
|
165
|
+
this.data = data;
|
|
141
166
|
} else {
|
|
142
|
-
|
|
143
|
-
|
|
167
|
+
axios.get(__imgPath + "logo/app.json").then((res) => {
|
|
168
|
+
const _data = flatten(Object.values(res.data || {}));
|
|
169
|
+
this.data = _data.map((item) => ({
|
|
170
|
+
img: item.key + ".svg",
|
|
171
|
+
uuid: item.key,
|
|
172
|
+
abbr: item.label,
|
|
173
|
+
href: item.link,
|
|
174
|
+
client: item.client || ["std", "origin"],
|
|
175
|
+
}));
|
|
176
|
+
|
|
177
|
+
if (!this.data.length) this.data = box;
|
|
144
178
|
sessionStorage.setItem("box", JSON.stringify(this.data));
|
|
145
179
|
});
|
|
146
180
|
}
|
|
147
181
|
} catch (e) {
|
|
148
182
|
this.data = box;
|
|
149
|
-
console.log("loadBox2 error", e);
|
|
150
183
|
}
|
|
151
184
|
},
|
|
152
185
|
onEsc(e) {
|
|
@@ -166,12 +199,12 @@ export default {
|
|
|
166
199
|
this.status = !!status;
|
|
167
200
|
}
|
|
168
201
|
};
|
|
169
|
-
Bus
|
|
202
|
+
Bus.on("toggleBox", this.__toggleHandler);
|
|
170
203
|
window.addEventListener("keydown", this.onEsc);
|
|
171
204
|
},
|
|
172
205
|
beforeUnmount() {
|
|
173
206
|
if (this.__toggleHandler) {
|
|
174
|
-
Bus
|
|
207
|
+
Bus.off("toggleBox", this.__toggleHandler);
|
|
175
208
|
this.__toggleHandler = null;
|
|
176
209
|
}
|
|
177
210
|
window.removeEventListener("keydown", this.onEsc);
|
package/src/header/lang.vue
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div class="c-header-panel c-lang-switcher" id="c-header-lang-switcher">
|
|
3
3
|
<span class="u-translator" href="/dashboard/boxcoin">
|
|
4
|
-
<!-- <langIcon class="u-icon" /> -->
|
|
5
4
|
<img
|
|
6
5
|
class="u-icon"
|
|
7
6
|
svg-inline
|
|
@@ -86,7 +85,7 @@ export default {
|
|
|
86
85
|
if (!normalized) return;
|
|
87
86
|
|
|
88
87
|
const ok = setJx3boxUiLocale(normalized);
|
|
89
|
-
if (
|
|
88
|
+
if (ok) location.reload();
|
|
90
89
|
},
|
|
91
90
|
},
|
|
92
91
|
};
|
package/src/header/logo.vue
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<script>
|
|
15
15
|
// import { useLayoutStore } from "@/store/layout";
|
|
16
16
|
import i18nMixin from "../../i18n/mixin";
|
|
17
|
-
import Bus from "
|
|
17
|
+
import Bus from "../../utils/bus";
|
|
18
18
|
|
|
19
19
|
export default {
|
|
20
20
|
name: "c-header-logo",
|
|
@@ -34,7 +34,7 @@ export default {
|
|
|
34
34
|
// 盒子
|
|
35
35
|
toggleBox: function (e) {
|
|
36
36
|
e.stopPropagation();
|
|
37
|
-
Bus
|
|
37
|
+
Bus.emit("toggleBox");
|
|
38
38
|
},
|
|
39
39
|
},
|
|
40
40
|
mounted: function () {},
|
package/src/header/userInfo.vue
CHANGED
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
|
|
87
87
|
<div class="u-other">
|
|
88
88
|
<a href="/dashboard/role" class="u-item"
|
|
89
|
-
><el-icon><
|
|
89
|
+
><el-icon><User /></el-icon>{{ $jx3boxT("jx3boxUi.header.roleManage", "角色管理") }}
|
|
90
90
|
</a>
|
|
91
91
|
<a href="/dashboard/fav" class="u-item"
|
|
92
92
|
><el-icon><Star /></el-icon>{{ $jx3boxT("jx3boxUi.header.favorites", "收藏订阅") }}
|
|
@@ -95,7 +95,7 @@
|
|
|
95
95
|
><el-icon><Memo /></el-icon>{{ $jx3boxT("jx3boxUi.header.orderCenter", "订单中心") }}
|
|
96
96
|
</a>
|
|
97
97
|
<a href="/dashboard/config" class="u-item"
|
|
98
|
-
><el-icon><
|
|
98
|
+
><el-icon><Help /></el-icon>{{ $jx3boxT("jx3boxUi.header.dashboard", "个人中心") }}
|
|
99
99
|
</a>
|
|
100
100
|
<hr />
|
|
101
101
|
<a href="/dashboard/profile" class="u-item"
|
|
@@ -125,7 +125,7 @@ import { showDate } from "@jx3box/jx3box-common/js/moment";
|
|
|
125
125
|
import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
|
|
126
126
|
import { copyText } from "./utils";
|
|
127
127
|
import { getMenu } from "../../service/header";
|
|
128
|
-
import Bus from "
|
|
128
|
+
import Bus from "../../utils/bus";
|
|
129
129
|
import alternate from "./alternate.vue";
|
|
130
130
|
import i18nMixin from "../../i18n/mixin";
|
|
131
131
|
|
|
@@ -272,7 +272,7 @@ export default {
|
|
|
272
272
|
}
|
|
273
273
|
},
|
|
274
274
|
changeAlternate: function () {
|
|
275
|
-
Bus
|
|
275
|
+
Bus.emit("showAlternate");
|
|
276
276
|
},
|
|
277
277
|
},
|
|
278
278
|
};
|
package/src/header/bus.js
DELETED
|
File without changes
|
|
File without changes
|