@jx3box/jx3box-ui 2.1.14 → 2.1.15
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/i18n/messages/en-US.js
CHANGED
|
@@ -222,6 +222,8 @@ export default {
|
|
|
222
222
|
boxcoinAdmin: {
|
|
223
223
|
tooltip: "Appraise",
|
|
224
224
|
dialogTitle: "Appraisal Score",
|
|
225
|
+
yearStatus: "Yearly Quota",
|
|
226
|
+
yearSummary: "Used {used} Remaining {left} Total {total}",
|
|
225
227
|
monthStatus: "This Month",
|
|
226
228
|
monthSummary: "Used {used} Remaining {left} Total {total}",
|
|
227
229
|
appraise: "Appraise",
|
|
@@ -231,9 +233,12 @@ export default {
|
|
|
231
233
|
remark: "Message",
|
|
232
234
|
remarkPlaceholder: "Enter a message (required)",
|
|
233
235
|
insertCurrentRelease: "Insert current version",
|
|
236
|
+
anonymity: "Use anonymous appraisal",
|
|
237
|
+
anonymousRemark: "Routine work inspection",
|
|
234
238
|
defaultRemark: "Thanks for your hard work!",
|
|
235
239
|
success: "Success",
|
|
236
240
|
fetchFailed: "Failed to fetch",
|
|
241
|
+
yearLimitExceeded: "Operation failed. Yearly quota exceeded ({totalLimit} BoxCoin).",
|
|
237
242
|
},
|
|
238
243
|
boxcoinUser: {
|
|
239
244
|
tooltip: "Reward",
|
package/i18n/messages/zh-CN.js
CHANGED
|
@@ -262,6 +262,8 @@ export default {
|
|
|
262
262
|
boxcoinAdmin: {
|
|
263
263
|
tooltip: "品鉴",
|
|
264
264
|
dialogTitle: "品鉴评分",
|
|
265
|
+
yearStatus: "全年额度",
|
|
266
|
+
yearSummary: "已用{used} 剩余{left} 总计{total}",
|
|
265
267
|
monthStatus: "本月状态",
|
|
266
268
|
monthSummary: "已用{used} 剩余{left} 总计{total}",
|
|
267
269
|
appraise: "品鉴",
|
|
@@ -271,9 +273,12 @@ export default {
|
|
|
271
273
|
remark: "寄语",
|
|
272
274
|
remarkPlaceholder: "请输入寄语(必填)",
|
|
273
275
|
insertCurrentRelease: "插入当前版本",
|
|
276
|
+
anonymity: "使用匿名品鉴",
|
|
277
|
+
anonymousRemark: "例行工作巡查",
|
|
274
278
|
defaultRemark: "辛苦,感谢!",
|
|
275
279
|
success: "操作成功",
|
|
276
280
|
fetchFailed: "获取失败",
|
|
281
|
+
yearLimitExceeded: "操作失败,已超出全年额度限制({totalLimit}盒币)",
|
|
277
282
|
},
|
|
278
283
|
boxcoinUser: {
|
|
279
284
|
tooltip: "投币",
|
package/i18n/messages/zh-TW.js
CHANGED
|
@@ -222,6 +222,8 @@ export default {
|
|
|
222
222
|
boxcoinAdmin: {
|
|
223
223
|
tooltip: "品鑑",
|
|
224
224
|
dialogTitle: "品鑑評分",
|
|
225
|
+
yearStatus: "全年額度",
|
|
226
|
+
yearSummary: "已用{used} 剩餘{left} 總計{total}",
|
|
225
227
|
monthStatus: "本月狀態",
|
|
226
228
|
monthSummary: "已用{used} 剩餘{left} 總計{total}",
|
|
227
229
|
appraise: "品鑑",
|
|
@@ -231,9 +233,12 @@ export default {
|
|
|
231
233
|
remark: "寄語",
|
|
232
234
|
remarkPlaceholder: "請輸入寄語(必填)",
|
|
233
235
|
insertCurrentRelease: "插入當前版本",
|
|
236
|
+
anonymity: "使用匿名品鑑",
|
|
237
|
+
anonymousRemark: "例行工作巡查",
|
|
234
238
|
defaultRemark: "辛苦,感謝!",
|
|
235
239
|
success: "操作成功",
|
|
236
240
|
fetchFailed: "獲取失敗",
|
|
241
|
+
yearLimitExceeded: "操作失敗,已超出全年額度限制({totalLimit}盒幣)",
|
|
237
242
|
},
|
|
238
243
|
boxcoinUser: {
|
|
239
244
|
tooltip: "投幣",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jx3box/jx3box-ui",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.15",
|
|
4
4
|
"description": "JX3BOX Vue3 UI",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
34
|
"@element-plus/icons-vue": "^2.3.2",
|
|
35
|
-
"@jx3box/jx3box-common": "^9.2.
|
|
36
|
-
"@jx3box/jx3box-data": "^3.9.
|
|
37
|
-
"@jx3box/jx3box-editor": "^3.1.
|
|
38
|
-
"@jx3box/jx3box-emotion": "^1.3.
|
|
39
|
-
"@jx3box/jx3box-macro": "^1.0.
|
|
40
|
-
"@jx3box/jx3box-talent": "^1.3.
|
|
35
|
+
"@jx3box/jx3box-common": "^9.2.2",
|
|
36
|
+
"@jx3box/jx3box-data": "^3.9.5",
|
|
37
|
+
"@jx3box/jx3box-editor": "^3.1.4",
|
|
38
|
+
"@jx3box/jx3box-emotion": "^1.3.1",
|
|
39
|
+
"@jx3box/jx3box-macro": "^1.0.4",
|
|
40
|
+
"@jx3box/jx3box-talent": "^1.3.14",
|
|
41
41
|
"@tinymce/tinymce-vue": "^5.1.1",
|
|
42
42
|
"@vueuse/core": "^9.13.0",
|
|
43
43
|
"@vueuse/head": "^0.7.6",
|
|
@@ -17,6 +17,16 @@
|
|
|
17
17
|
append-to-body
|
|
18
18
|
>
|
|
19
19
|
<div class="w-boxcoin-admin-content">
|
|
20
|
+
<div class="u-left u-total-left">
|
|
21
|
+
<em class="u-label">{{ $jx3boxT("jx3boxUi.boxcoinAdmin.yearStatus", "全年额度") }}</em>
|
|
22
|
+
{{
|
|
23
|
+
$jx3boxT("jx3boxUi.boxcoinAdmin.yearSummary", "已用{used} 剩余{left} 总计{total}", {
|
|
24
|
+
used: this.postTypeUsed,
|
|
25
|
+
left: this.postTypeLeft,
|
|
26
|
+
total: this.totalLimit,
|
|
27
|
+
})
|
|
28
|
+
}}
|
|
29
|
+
</div>
|
|
20
30
|
<div class="u-left">
|
|
21
31
|
<em class="u-label">{{ $jx3boxT("jx3boxUi.boxcoinAdmin.monthStatus", "本月状态") }}</em>
|
|
22
32
|
{{
|
|
@@ -27,7 +37,7 @@
|
|
|
27
37
|
})
|
|
28
38
|
}}
|
|
29
39
|
<el-progress
|
|
30
|
-
:percentage="100 - (this.used * 100) / this.total"
|
|
40
|
+
:percentage="this.total ? 100 - (this.used * 100) / this.total : 0"
|
|
31
41
|
:stroke-width="15"
|
|
32
42
|
:text-inside="true"
|
|
33
43
|
></el-progress>
|
|
@@ -59,6 +69,7 @@
|
|
|
59
69
|
:minlength="2"
|
|
60
70
|
:maxlength="30"
|
|
61
71
|
show-word-limit
|
|
72
|
+
:disabled="!!is_anonymity"
|
|
62
73
|
></el-input>
|
|
63
74
|
<el-button :disabled="fetchingCurrentRelease" @click="insertCurrentRelease"
|
|
64
75
|
>{{ $jx3boxT("jx3boxUi.boxcoinAdmin.insertCurrentRelease", "插入当前版本") }}</el-button
|
|
@@ -67,7 +78,17 @@
|
|
|
67
78
|
</div>
|
|
68
79
|
</div>
|
|
69
80
|
<template #footer>
|
|
70
|
-
<span class="dialog-footer">
|
|
81
|
+
<span class="dialog-footer w-boxcoin-admin-footer">
|
|
82
|
+
<el-checkbox
|
|
83
|
+
v-model="is_anonymity"
|
|
84
|
+
border
|
|
85
|
+
class="u-anonymity"
|
|
86
|
+
:true-label="1"
|
|
87
|
+
:false-label="0"
|
|
88
|
+
@change="onAnonymityChange"
|
|
89
|
+
>
|
|
90
|
+
{{ $jx3boxT("jx3boxUi.boxcoinAdmin.anonymity", "使用匿名品鉴") }}
|
|
91
|
+
</el-checkbox>
|
|
71
92
|
<el-button @click="visible = false">{{ $jx3boxT("jx3boxUi.common.cancel", "取消") }}</el-button>
|
|
72
93
|
<el-button type="primary" @click="submit" :disabled="!ready || submitting">{{
|
|
73
94
|
$jx3boxT("jx3boxUi.common.confirm", "确定")
|
|
@@ -129,6 +150,18 @@ export default {
|
|
|
129
150
|
type: String,
|
|
130
151
|
default: "",
|
|
131
152
|
},
|
|
153
|
+
category: {
|
|
154
|
+
type: String,
|
|
155
|
+
default: "",
|
|
156
|
+
},
|
|
157
|
+
totalLimit: {
|
|
158
|
+
type: Number,
|
|
159
|
+
default: 0,
|
|
160
|
+
},
|
|
161
|
+
postTypeUsed: {
|
|
162
|
+
type: Number,
|
|
163
|
+
default: 0,
|
|
164
|
+
},
|
|
132
165
|
},
|
|
133
166
|
components: {
|
|
134
167
|
Contributors,
|
|
@@ -142,6 +175,7 @@ export default {
|
|
|
142
175
|
left: this.own,
|
|
143
176
|
chosen: "", // 被选中的人
|
|
144
177
|
amount: "",
|
|
178
|
+
is_anonymity: 1,
|
|
145
179
|
|
|
146
180
|
submitting: false,
|
|
147
181
|
fetchingCurrentRelease: false,
|
|
@@ -172,11 +206,21 @@ export default {
|
|
|
172
206
|
return location.href.includes("origin") ? "origin" : "std";
|
|
173
207
|
},
|
|
174
208
|
fitPoints: function () {
|
|
175
|
-
|
|
209
|
+
const points = this.points.filter((item) => item <= this.left);
|
|
210
|
+
if (this.isSignAuthor) {
|
|
211
|
+
return points.filter((item) => item <= 1000);
|
|
212
|
+
}
|
|
213
|
+
return points;
|
|
214
|
+
},
|
|
215
|
+
isSignAuthor: function () {
|
|
216
|
+
return User.getInfo().group == 32;
|
|
176
217
|
},
|
|
177
218
|
iconPath() {
|
|
178
219
|
return JX3BOX.__cdn + "design/vector/icon/taste.svg";
|
|
179
220
|
},
|
|
221
|
+
postTypeLeft() {
|
|
222
|
+
return this.totalLimit - this.postTypeUsed;
|
|
223
|
+
},
|
|
180
224
|
},
|
|
181
225
|
watch: {
|
|
182
226
|
own: function (val) {
|
|
@@ -194,9 +238,29 @@ export default {
|
|
|
194
238
|
submit: function () {
|
|
195
239
|
this.submitting = true;
|
|
196
240
|
const count = this.count === "custom" ? this.amount : this.count;
|
|
241
|
+
let client = this.client || this.hostClient;
|
|
242
|
+
if (!["std", "origin", "all"].includes(client)) {
|
|
243
|
+
client = "std";
|
|
244
|
+
}
|
|
245
|
+
if ((this.totalLimit > 0 && this.postTypeUsed + Number(count) > this.totalLimit) || this.totalLimit === 0) {
|
|
246
|
+
this.$message({
|
|
247
|
+
message: this.$jx3boxT(
|
|
248
|
+
"jx3boxUi.boxcoinAdmin.yearLimitExceeded",
|
|
249
|
+
"操作失败,已超出全年额度限制({totalLimit}盒币)",
|
|
250
|
+
{
|
|
251
|
+
totalLimit: this.totalLimit,
|
|
252
|
+
}
|
|
253
|
+
),
|
|
254
|
+
type: "error",
|
|
255
|
+
});
|
|
256
|
+
this.submitting = false;
|
|
257
|
+
return;
|
|
258
|
+
}
|
|
197
259
|
grantBoxcoin(this.postType, this.postId, this.chosen || this.userId, count, {
|
|
198
260
|
remark: this.remark,
|
|
199
|
-
client
|
|
261
|
+
client,
|
|
262
|
+
redirect: this.category ? `/${this.category}/${this.postId}` : undefined,
|
|
263
|
+
is_anonymity: this.is_anonymity,
|
|
200
264
|
})
|
|
201
265
|
.then((res) => {
|
|
202
266
|
this.$message({
|
|
@@ -207,7 +271,7 @@ export default {
|
|
|
207
271
|
})
|
|
208
272
|
.then((data) => {
|
|
209
273
|
// 1.扣除额度
|
|
210
|
-
this.left -=
|
|
274
|
+
this.left -= Number(count);
|
|
211
275
|
// 2.将修改emit出去
|
|
212
276
|
this.$emit("updateRecord", data);
|
|
213
277
|
})
|
|
@@ -232,9 +296,27 @@ export default {
|
|
|
232
296
|
this.fetchingCurrentRelease = false;
|
|
233
297
|
});
|
|
234
298
|
},
|
|
299
|
+
onAnonymityChange() {
|
|
300
|
+
if (this.is_anonymity) {
|
|
301
|
+
this.remark = this.$jx3boxT("jx3boxUi.boxcoinAdmin.anonymousRemark", "例行工作巡查");
|
|
302
|
+
}
|
|
303
|
+
},
|
|
235
304
|
init: function () {},
|
|
236
305
|
},
|
|
237
|
-
created: function () {
|
|
306
|
+
created: function () {
|
|
307
|
+
this.remark = this.is_anonymity
|
|
308
|
+
? this.$jx3boxT("jx3boxUi.boxcoinAdmin.anonymousRemark", "例行工作巡查")
|
|
309
|
+
: this.remark;
|
|
310
|
+
},
|
|
238
311
|
mounted: function () {},
|
|
239
312
|
};
|
|
240
313
|
</script>
|
|
314
|
+
|
|
315
|
+
<style lang="less">
|
|
316
|
+
.w-boxcoin-admin-footer {
|
|
317
|
+
.u-anonymity {
|
|
318
|
+
float: left;
|
|
319
|
+
margin-left: 10px;
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
</style>
|
package/src/interact/Like.vue
CHANGED
|
@@ -42,6 +42,7 @@ export default {
|
|
|
42
42
|
},
|
|
43
43
|
methods: {
|
|
44
44
|
init: function () {
|
|
45
|
+
if (!this.ready) return;
|
|
45
46
|
this.loadStat();
|
|
46
47
|
},
|
|
47
48
|
loadStat: function () {
|
|
@@ -60,7 +61,13 @@ export default {
|
|
|
60
61
|
},
|
|
61
62
|
},
|
|
62
63
|
watch: {
|
|
63
|
-
postId:
|
|
64
|
+
postId: {
|
|
65
|
+
immediate: true,
|
|
66
|
+
handler: function () {
|
|
67
|
+
this.init();
|
|
68
|
+
},
|
|
69
|
+
},
|
|
70
|
+
postType: function () {
|
|
64
71
|
this.init();
|
|
65
72
|
},
|
|
66
73
|
},
|