@jx3box/jx3box-common-ui 5.5.5 → 5.5.9

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.
@@ -1,290 +1,12 @@
1
1
  [
2
- {
3
- "key": "index",
4
- "link": "/index",
5
- "label": "首页",
6
- "client": "all",
7
- "status": true,
8
- "parentKey": ""
9
- },
10
- {
11
- "key": "macro",
12
- "link": "/macro",
13
- "label": "宏库",
14
- "client": "all",
15
- "status": true,
16
- "parentKey": ""
17
- },
18
- {
19
- "key": "macroeditor",
20
- "link": "/app/macroeditor",
21
- "label": "宏编辑器",
22
- "client": "all",
23
- "status": true,
24
- "parentKey": "macro"
25
- },
26
- {
27
- "key": "macro_index",
28
- "link": "/macro",
29
- "label": "全门派宏",
30
- "client": "all",
31
- "status": true,
32
- "parentKey": "macro"
33
- },
34
- {
35
- "key": "jx3dat",
36
- "link": "/jx3dat",
37
- "label": "插件",
38
- "client": "all",
39
- "status": true,
40
- "parentKey": ""
41
- },
42
- {
43
- "key": "jx3dat_index",
44
- "link": "/jx3dat",
45
- "label": "插件数据",
46
- "client": "all",
47
- "status": true,
48
- "parentKey": "jx3dat"
49
- },
50
- {
51
- "key": "dbm",
52
- "link": "/dbm",
53
- "label": "在线构建",
54
- "client": "all",
55
- "status": false,
56
- "parentKey": "jx3dat"
57
- },
58
- {
59
- "key": "fb",
60
- "link": "/fb",
61
- "label": "副本",
62
- "client": "all",
63
- "status": true,
64
- "parentKey": ""
65
- },
66
- {
67
- "key": "fb_post",
68
- "link": "/fb",
69
- "label": "副本攻略",
70
- "client": "all",
71
- "status": true,
72
- "parentKey": "fb"
73
- },
74
- {
75
- "key": "fb_drop",
76
- "link": "/fb/#/drop",
77
- "label": "副本掉落",
78
- "client": "all",
79
- "status": true,
80
- "parentKey": "fb"
81
- },
82
- {
83
- "key": "fb_gem",
84
- "link": "/fb/#/gem",
85
- "label": "瑰石查询",
86
- "client": "all",
87
- "status": true,
88
- "parentKey": "fb"
89
- },
90
- {
91
- "key": "team",
92
- "link": "/team",
93
- "label": "团队平台",
94
- "client": "all",
95
- "status": true,
96
- "parentKey": "fb"
97
- },
98
- {
99
- "key": "rank",
100
- "link": "/rank",
101
- "label": "秘境百强",
102
- "client": "all",
103
- "status": true,
104
- "parentKey": "fb"
105
- },
106
- {
107
- "key": "bps",
108
- "link": "/bps",
109
- "label": "职业",
110
- "client": "all",
111
- "status": true,
112
- "parentKey": ""
113
- },
114
- {
115
- "key": "bps_post",
116
- "link": "/bps",
117
- "label": "门派攻略",
118
- "client": "all",
119
- "status": true,
120
- "parentKey": "bps"
121
- },
122
- {
123
- "key": "pz",
124
- "link": "/pz",
125
- "label": "在线配装",
126
- "client": "all",
127
- "status": true,
128
- "parentKey": "bps"
129
- },
130
- {
131
- "key": "database",
132
- "link": "/app/database",
133
- "label": "数据大全",
134
- "client": "all",
135
- "status": true,
136
- "parentKey": "bps"
137
- },
138
- {
139
- "key": "battle",
140
- "link": "/battle",
141
- "label": "战斗分析",
142
- "client": "all",
143
- "status": true,
144
- "parentKey": "bps"
145
- },
146
- {
147
- "key": "dps",
148
- "link": "/app/dps",
149
- "label": "伤害模拟",
150
- "client": "all",
151
- "status": true,
152
- "parentKey": "bps"
153
- },
154
- {
155
- "key": "wiki",
156
- "link": "/cj",
157
- "label": "百科",
158
- "client": "all",
159
- "status": true,
160
- "parentKey": ""
161
- },
162
- {
163
- "key": "cj",
164
- "link": "/cj",
165
- "label": "成就百科",
166
- "client": "all",
167
- "status": true,
168
- "parentKey": "wiki"
169
- },
170
- {
171
- "key": "item",
172
- "link": "/item",
173
- "label": "物品百科",
174
- "client": "all",
175
- "status": true,
176
- "parentKey": "wiki"
177
- },
178
- {
179
- "key": "quest",
180
- "link": "/quest",
181
- "label": "任务百科",
182
- "client": "all",
183
- "status": true,
184
- "parentKey": "wiki"
185
- },
186
- {
187
- "key": "knowledge",
188
- "link": "/knowledge",
189
- "label": "通识百科",
190
- "client": "all",
191
- "status": true,
192
- "parentKey": "wiki"
193
- },
194
- {
195
- "key": "pet",
196
- "link": "/knowledge/#/pet",
197
- "label": "宠物百科",
198
- "client": "all",
199
- "status": true,
200
- "parentKey": "wiki"
201
- },
202
- {
203
- "key": "tool",
204
- "link": "/tool",
205
- "label": "工具",
206
- "client": "all",
207
- "status": true,
208
- "parentKey": ""
209
- },
210
- {
211
- "key": "app_index",
212
- "link": "/app",
213
- "label": "魔盒应用",
214
- "client": "all",
215
- "status": true,
216
- "parentKey": "tool"
217
- },
218
- {
219
- "key": "helper",
220
- "link": "/tool",
221
- "label": "更多工具",
222
- "client": "all",
223
- "status": true,
224
- "parentKey": "tool"
225
- },
226
- {
227
- "key": "share",
228
- "link": "/share",
229
- "label": "休闲",
230
- "client": "all",
231
- "status": true,
232
- "parentKey": ""
233
- },
234
- {
235
- "key": "face",
236
- "link": "/share",
237
- "label": "捏脸分享",
238
- "client": "all",
239
- "status": true,
240
- "parentKey": "share"
241
- },
242
- {
243
- "key": "house",
244
- "link": "https://jx3.xoyo.com/zt/2020/09/24/blueprint/#/",
245
- "label": "家园蓝图",
246
- "client": "std",
247
- "status": true,
248
- "parentKey": "share"
249
- },
250
- {
251
- "key": "bbs",
252
- "link": "/bbs",
253
- "label": "茶馆",
254
- "client": "all",
255
- "status": true,
256
- "parentKey": ""
257
- },
258
- {
259
- "key": "joke",
260
- "link": "/bbs/#/joke",
261
- "label": "剑三骚话",
262
- "client": "all",
263
- "status": true,
264
- "parentKey": "bbs"
265
- },
266
- {
267
- "key": "emotion",
268
- "link": "/bbs/#/emotion",
269
- "label": "剑三表情",
270
- "client": "all",
271
- "status": false,
272
- "parentKey": "bbs"
273
- },
274
- {
275
- "key": "namespace",
276
- "link": "/bbs/#/namespace",
277
- "label": "剑三铭牌",
278
- "client": "all",
279
- "status": true,
280
- "parentKey": "bbs"
281
- },
282
- {
283
- "key": "forum",
284
- "link": "/bbs/#/forum",
285
- "label": "讨论交流",
286
- "client": "all",
287
- "status": true,
288
- "parentKey": "bbs"
289
- }
290
- ]
2
+ { "key": "index", "link": "/index/", "label": "首页", "client": "all", "status": true, "parentKey": "" },
3
+ { "key": "macro", "link": "/macro/", "label": "宏库", "client": "all", "status": true, "parentKey": "" },
4
+ { "key": "jx3dat", "link": "/jx3dat/", "label": "插件", "client": "all", "status": true, "parentKey": "" },
5
+ { "key": "fb", "link": "/fb/", "label": "副本", "client": "all", "status": true, "parentKey": "" },
6
+ { "key": "bps", "link": "/bps/", "label": "职业", "client": "all", "status": true, "parentKey": "" },
7
+ { "key": "wiki", "link": "/cj/", "label": "百科", "client": "all", "status": true, "parentKey": "" },
8
+ { "key": "pvx", "link": "/share/", "label": "休闲", "client": "all", "status": true, "parentKey": "" },
9
+ { "key": "pvp", "link": "/pvp/", "label": "竞技", "client": "all", "status": true, "parentKey": "" },
10
+ { "key": "tool", "link": "/tool/", "label": "工具", "client": "all", "status": true, "parentKey": "" },
11
+ { "key": "bbs", "link": "/bbs/", "label": "茶馆", "client": "all", "status": true, "parentKey": "" }
12
+ ]
@@ -19,11 +19,6 @@
19
19
  "link": "/team/role/manage",
20
20
  "onlyAdmin":false
21
21
  },
22
- {
23
- "label": "全局设置",
24
- "link": "/config",
25
- "onlyAdmin":true
26
- },
27
22
  {
28
23
  "label": "后台管理",
29
24
  "link": "https://os.jx3box.com/admin",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-common-ui",
3
- "version": "5.5.5",
3
+ "version": "5.5.9",
4
4
  "description": "JX3BOX UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -31,7 +31,7 @@
31
31
  ],
32
32
  "dependencies": {
33
33
  "@jx3box/jx3box-comment-ui": "^1.6.6",
34
- "@jx3box/jx3box-common": "^6.8.2",
34
+ "@jx3box/jx3box-common": "^7.0.5",
35
35
  "@jx3box/jx3box-data": "^1.8.3",
36
36
  "@jx3box/jx3box-editor": "^1.2.0",
37
37
  "axios": "^0.19.2",
@@ -1,12 +1,11 @@
1
- import axios from "axios";
2
- import { __helperUrl } from "@jx3box/jx3box-common/data/jx3box.json";
1
+ import { $helper } from "@jx3box/jx3box-common/js/https.js";
3
2
 
4
3
  function getBreadcrumb(name) {
5
- return axios.get(__helperUrl + `api/breadcrumb/${name}`);
4
+ return $helper().get(`/api/breadcrumb/${name}`);
6
5
  }
7
6
 
8
7
  function getBreadcrumbs(params) {
9
- return axios.get(__helperUrl + `api/breadcrumbs`, {
8
+ return $helper().get(`/api/breadcrumbs`, {
10
9
  params: params,
11
10
  });
12
11
  }
package/service/header.js CHANGED
@@ -1,14 +1,13 @@
1
1
  import axios from "axios";
2
- import { $helper,$cms } from "@jx3box/jx3box-common/js/https.js";
2
+ import { $helper, $cms } from "@jx3box/jx3box-common/js/https.js";
3
3
  import { __dataPath } from "@jx3box/jx3box-common/data/jx3box.json";
4
4
 
5
5
  function getMsg() {
6
6
  return $helper({ mute: true }).get("/api/messages/unread_total");
7
7
  }
8
8
 
9
- function getNav(client = 'std') {
10
- let file =
11
- client == "origin" ? "header_nav_origin.json" : "header_nav.json";
9
+ function getNav(client = "std") {
10
+ let file = client == "origin" ? "header_nav_origin.json" : "header_nav.json";
12
11
  return axios.get(__dataPath + `data/box/${file}`);
13
12
  }
14
13
 
@@ -16,13 +15,13 @@ function getPanel() {
16
15
  return axios.get(__dataPath + "data/box/header_panel.json");
17
16
  }
18
17
 
19
- function getBox(client = 'std') {
20
- let filename = client == 'origin' ? 'box_origin.json' : 'box.json'
18
+ function getBox(client = "std") {
19
+ let filename = client == "origin" ? "box_origin.json" : "box.json";
21
20
  return axios.get(__dataPath + "data/box/" + filename);
22
21
  }
23
22
 
24
- function getMenu(key){
25
- return $cms().get(`/api/cms/config/menu/${key}`)
23
+ function getMenu(key) {
24
+ return $cms().get(`/api/cms/config/menu/${key}`);
26
25
  }
27
26
 
28
- export { getMsg, getNav, getPanel, getBox,getMenu };
27
+ export { getMsg, getNav, getPanel, getBox, getMenu };
package/service/helper.js CHANGED
@@ -1,7 +1,7 @@
1
- import {$helper} from '@jx3box/jx3box-common/js/https'
1
+ import { $helper } from "@jx3box/jx3box-common/js/https";
2
2
 
3
- function getCollection(id){
4
- return $helper().get(`/api/post/collection/${id}`)
3
+ function getCollection(id) {
4
+ return $helper().get(`/api/post/collection/${id}`);
5
5
  }
6
6
 
7
- export {getCollection}
7
+ export { getCollection };
package/service/thx.js CHANGED
@@ -1,4 +1,4 @@
1
- import { $pay,$cms } from "@jx3box/jx3box-common/js/https";
1
+ import { $pay, $cms } from "@jx3box/jx3box-common/js/https";
2
2
 
3
3
  function getPostBoxcoinRecords(postType, postId, params) {
4
4
  return $pay().get(`/api/inspire/article/${postType}/${postId}/history`, {
@@ -22,12 +22,12 @@ function getPostBoxcoinConfig(postType) {
22
22
  return $pay().get(`/api/inspire/article/${postType}/boxcoin/limit`);
23
23
  }
24
24
 
25
- function getBoxcoinStatus(){
26
- return $cms().get(`/api/cms/config`,{
27
- params : {
28
- key : 'boxcoin'
29
- }
30
- })
25
+ function getBoxcoinStatus() {
26
+ return $cms().get(`/api/cms/config`, {
27
+ params: {
28
+ key: "boxcoin",
29
+ },
30
+ });
31
31
  }
32
32
 
33
- export { getPostBoxcoinRecords, grantBoxcoin, rewardBoxcoin, recoveryBoxcoin, getPostBoxcoinConfig,getBoxcoinStatus };
33
+ export { getPostBoxcoinRecords, grantBoxcoin, rewardBoxcoin, recoveryBoxcoin, getPostBoxcoinConfig, getBoxcoinStatus };
package/src/Author.vue CHANGED
@@ -8,7 +8,7 @@
8
8
  :size="68"
9
9
  :frame="data.user_avatar_frame"
10
10
  />
11
- <a class="u-name" :href="id | authorLink">
11
+ <a class="u-name" :href="authorLink(id)">
12
12
  <span>{{ data.display_name }}</span>
13
13
  </a>
14
14
  <el-tooltip
@@ -39,7 +39,7 @@
39
39
  <a
40
40
  v-if="data.weibo_name"
41
41
  class="u-weibo"
42
- :href="data.weibo_id | weiboLink"
42
+ :href="weiboLink(data.weibo_id)"
43
43
  target="_blank"
44
44
  >
45
45
  <img svg-inline src="../assets/img/author/weibo.svg" />
@@ -48,7 +48,7 @@
48
48
  <a
49
49
  v-if="data.github_name"
50
50
  class="u-github"
51
- :href="data.github_name | githubLink"
51
+ :href="githubLink(data.github_name)"
52
52
  target="_blank"
53
53
  >
54
54
  <img svg-inline src="../assets/img/author/github.svg" />
@@ -78,7 +78,7 @@
78
78
  </div>
79
79
  <div class="u-medals" v-if="medals && medals.length">
80
80
  <span class="u-medal" v-for="(item, i) in medals" :key="i">
81
- <img :src="item.medal | showMedalIcon" :title="item | showMedalDesc" />
81
+ <img :src="showMedalIcon(item.medal)" :title="showMedalDesc(item)" />
82
82
  </span>
83
83
  </div>
84
84
  </div>
@@ -87,8 +87,8 @@
87
87
  <i class="el-icon-school"></i>
88
88
  <span>所属团队</span>
89
89
  </div>
90
- <a class="u-team" v-for="(item,i) in teams" :key="i" :href="item.team_id | teamLink" target="_blank">
91
- <img class="u-teamlogo" :src="item.team_logo | showTeamLogo" />
90
+ <a class="u-team" v-for="(item,i) in teams" :key="i" :href="teamLink(item.team_id)" target="_blank">
91
+ <img class="u-teamlogo" :src="showTeamLogo(item.team_logo)" />
92
92
  <span class="u-teamname">{{item.team_name}}@{{item.team_server}}</span>
93
93
  </a>
94
94
  </div>
@@ -178,27 +178,6 @@ export default {
178
178
  return this.isPRO ? "专业版会员" : "高级版会员";
179
179
  },
180
180
  },
181
- filters: {
182
- showMedalIcon: function (val) {
183
- return __imgPath + "image/medals/user/" + val + ".gif";
184
- },
185
- showMedalDesc : function (item){
186
- return item.medal_desc || medal_map[item.medal]
187
- },
188
- authorLink,
189
- weiboLink: function (val) {
190
- return "https://weibo.com/" + val;
191
- },
192
- githubLink: function (val) {
193
- return "https://github.com/" + val;
194
- },
195
- teamLink: function (id) {
196
- return getLink("org", id);
197
- },
198
- showTeamLogo: function (val) {
199
- return getThumbnail(val, 32);
200
- },
201
- },
202
181
  methods: {
203
182
  loadData: function () {
204
183
  return getUserInfo(this.id)
@@ -245,6 +224,27 @@ export default {
245
224
  this.isVIP = res.data.data.isPRE;
246
225
  });
247
226
  },
227
+
228
+ // filters
229
+ showMedalIcon: function (val) {
230
+ return __imgPath + "image/medals/user/" + val + ".gif";
231
+ },
232
+ showMedalDesc : function (item){
233
+ return item.medal_desc || medal_map[item.medal]
234
+ },
235
+ authorLink,
236
+ weiboLink: function (val) {
237
+ return "https://weibo.com/" + val;
238
+ },
239
+ githubLink: function (val) {
240
+ return "https://github.com/" + val;
241
+ },
242
+ teamLink: function (id) {
243
+ return getLink("org", id);
244
+ },
245
+ showTeamLogo: function (val) {
246
+ return getThumbnail(val, 32);
247
+ },
248
248
  },
249
249
  watch: {
250
250
  uid: function () {
package/src/Box.vue CHANGED
@@ -13,8 +13,8 @@
13
13
  </a>
14
14
  </li>
15
15
  <li v-for="(item,i) in list" :key="i" :class="{'u-app-start':item.lf}">
16
- <a class="u-item" :href="item.href" :target="item.href | getTarget">
17
- <img class="u-pic" :src="item.img | getBoxIcon" />
16
+ <a class="u-item" :href="item.href" :target="getTarget(item.href)">
17
+ <img class="u-pic" :src="getBoxIcon(item.img)" />
18
18
  <!-- <img class="u-pic-hover" svg-inline :src="item.hover | getBoxIcon" /> -->
19
19
  <span class="u-txt">{{item.abbr}}</span>
20
20
  </a>
@@ -67,7 +67,17 @@ export default {
67
67
  },
68
68
  matchedClient : function (client){
69
69
  return client == 'all' ? true : client == this.client
70
- }
70
+ },
71
+ getBoxIcon: function (val) {
72
+ return __imgPath + "image/box/" + val;
73
+ },
74
+ getTarget: function (val) {
75
+ if (window.innerWidth < 768 || val?.startsWith("/")) {
76
+ return "_self";
77
+ } else {
78
+ return "_blank";
79
+ }
80
+ },
71
81
  },
72
82
  created: function () {
73
83
  if (this.overlayEnable) {
@@ -95,18 +105,6 @@ export default {
95
105
  Bus.$emit("toggleBox", false);
96
106
  });
97
107
  },
98
- filters: {
99
- getBoxIcon: function (val) {
100
- return __imgPath + "image/box/" + val;
101
- },
102
- getTarget: function (val) {
103
- if (window.innerWidth < 768 || val?.startsWith("/")) {
104
- return "_self";
105
- } else {
106
- return "_blank";
107
- }
108
- },
109
- },
110
108
  components: {
111
109
  "header-search": search,
112
110
  },
@@ -25,7 +25,7 @@
25
25
  <slot name="op-append"></slot>
26
26
  <a
27
27
  v-if="publishEnable"
28
- :href="slug | publishLink"
28
+ :href="publishLink(slug)"
29
29
  class="u-publish el-button el-button--primary el-button--medium u-op-public"
30
30
  >
31
31
  <i class="el-icon-edit-outline"></i>
@@ -88,14 +88,12 @@ export default {
88
88
  };
89
89
  },
90
90
  computed: {},
91
- filters: {
92
- publishLink,
93
- },
94
91
  methods: {
95
92
  toggleLeftSide: function () {
96
93
  let status = !this.isOpen;
97
94
  Bus.$emit("toggleLeftSide", status);
98
95
  },
96
+ publishLink,
99
97
  },
100
98
  mounted: function () {
101
99
  Bus.$on("toggleLeftSide", (data) => {
@@ -25,7 +25,7 @@
25
25
  target="_blank"
26
26
  >
27
27
  <img
28
- :src="c.user_avatar | resolveAvatarPath"
28
+ :src="resolveAvatarPath(c.user_avatar)"
29
29
  :alt="c.display_name"
30
30
  />
31
31
  </a>
@@ -71,12 +71,10 @@ export default {
71
71
  return this.html_url + "/issues";
72
72
  },
73
73
  },
74
- filters: {
74
+ methods: {
75
75
  resolveAvatarPath: function(val) {
76
76
  return val ? val.replace(__ossRoot, __ossMirror) : "";
77
77
  },
78
- },
79
- methods: {
80
78
  getBasicInfo: function() {
81
79
  getRepoInfo(this.REPO).then((res) => {
82
80
  let data = res.data;
@@ -1,5 +1,5 @@
1
1
  <template>
2
- <a class="c-avatar" :href="uid | authorLink">
2
+ <a class="c-avatar" :href="authorLink(uid)">
3
3
  <img :src="showAvatar(avatar)" class="c-avatar-pic" :class="{ isCircle }" />
4
4
  <i class="c-avatar-frame" v-if="frameName" :class="style">
5
5
  <img :src="frameUrl" />
@@ -68,8 +68,6 @@ export default {
68
68
  showAvatar: function (val) {
69
69
  return showAvatar(val, this.size);
70
70
  },
71
- },
72
- filters: {
73
71
  authorLink,
74
72
  },
75
73
  created: function () {
@@ -13,7 +13,7 @@
13
13
  <el-input v-model.number="uid" placeholder="请输入UID(数字)"></el-input>
14
14
  </div>
15
15
  <div class="u-preview">
16
- <img class="u-avatar" :src="userdata.user_avatar | showAvatar" />
16
+ <img class="u-avatar" :src="showAvatar(userdata.user_avatar)" />
17
17
  <span class="u-name">{{ userdata.display_name || "-" }}</span>
18
18
  </div>
19
19
  <span slot="footer" class="dialog-footer">
@@ -66,11 +66,6 @@ export default {
66
66
  this.$emit("switchUserPop", newval);
67
67
  },
68
68
  },
69
- filters: {
70
- showAvatar: function (val) {
71
- return showAvatar(val, "l");
72
- },
73
- },
74
69
  computed: {},
75
70
  methods: {
76
71
  confirm: function () {
@@ -83,6 +78,9 @@ export default {
83
78
  });
84
79
  }
85
80
  },
81
+ showAvatar: function (val) {
82
+ return showAvatar(val, "l");
83
+ },
86
84
  },
87
85
  mounted: function () {},
88
86
  components: {},