@jx3box/jx3box-ui 2.4.5 → 2.4.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jx3box/jx3box-ui",
3
- "version": "2.4.5",
3
+ "version": "2.4.7",
4
4
  "description": "JX3BOX Vue3 UI",
5
5
  "main": "index.js",
6
6
  "scripts": {
@@ -70,8 +70,7 @@
70
70
 
71
71
  <script>
72
72
  import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
73
- import * as utilModule from "@jx3box/jx3box-common/js/utils";
74
- const { authorLink } = utilModule;
73
+ import { authorLink } from "@jx3box/jx3box-common/js/utils";
75
74
  import User from "@jx3box/jx3box-common/js/user";
76
75
  import { getUserInfo } from "../../service/author";
77
76
  import Avatar from "./Avatar.vue";
@@ -33,8 +33,7 @@
33
33
  </template>
34
34
 
35
35
  <script>
36
- import * as utilModule from "@jx3box/jx3box-common/js/utils";
37
- const { tvLink } = utilModule;
36
+ import { tvLink } from "@jx3box/jx3box-common/js/utils";
38
37
  import i18nMixin from "../../i18n/mixin";
39
38
 
40
39
  export default {
@@ -22,8 +22,7 @@
22
22
  </template>
23
23
 
24
24
  <script>
25
- import * as utilModule from "@jx3box/jx3box-common/js/utils";
26
- const { getMedalLink } = utilModule;
25
+ import { getMedalLink } from "@jx3box/jx3box-common/js/utils";
27
26
  import { getUserMedals } from "../../service/author";
28
27
  import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
29
28
  import i18nMixin from "../../i18n/mixin";
@@ -52,8 +52,7 @@
52
52
  </template>
53
53
 
54
54
  <script>
55
- import * as utilModule from "@jx3box/jx3box-common/js/utils";
56
- const { showAvatar } = utilModule;
55
+ import { showAvatar } from "@jx3box/jx3box-common/js/utils";
57
56
  import { getUserInfoByUidOrName } from "../../service/author";
58
57
  import i18nMixin from "../../i18n/mixin";
59
58
  export default {
@@ -129,8 +129,7 @@
129
129
 
130
130
  <script>
131
131
  import Bus from "../../utils/bus";
132
- import * as utilModule from "@jx3box/jx3box-common/js/utils";
133
- const { getRewrite } = utilModule;
132
+ import { getRewrite } from "@jx3box/jx3box-common/js/utils";
134
133
  import JX3BOX from "@jx3box/jx3box-common/data/jx3box.json";
135
134
  import { getSetting, postSetting, refreshPostCache } from "../../service/admin";
136
135
  import User from "@jx3box/jx3box-common/js/user";
@@ -152,8 +152,7 @@
152
152
 
153
153
  <script>
154
154
  import Uploader from "./Upload.vue";
155
- import * as utilModule from "@jx3box/jx3box-common/js/utils";
156
- const { resolveImagePath } = utilModule;
155
+ import { resolveImagePath } from "@jx3box/jx3box-common/js/utils";
157
156
  import { formatContent } from "../../utils/emotion";
158
157
  import Emotion from "@jx3box/jx3box-emotion/src/Emotion2.vue";
159
158
  import i18nMixin from "../../i18n/mixin";
@@ -65,7 +65,7 @@ export default {
65
65
  href: "",
66
66
  icon: require('../../assets/img/common/wechat.svg'),
67
67
  qrcode: require('../../assets/img/common/mp.jpg'),
68
- label: "剑三魔盒",
68
+ label: "剑网3魔盒",
69
69
  },
70
70
  {
71
71
  name: "B站",
@@ -18,8 +18,7 @@
18
18
  </template>
19
19
 
20
20
  <script>
21
- import * as utilModule from "@jx3box/jx3box-common/js/utils";
22
- const { showAvatar } = utilModule;
21
+ import { showAvatar } from "@jx3box/jx3box-common/js/utils";
23
22
  export default {
24
23
  name: "ContributorsComp",
25
24
  props: {
@@ -20,8 +20,7 @@
20
20
  </template>
21
21
 
22
22
  <script>
23
- import * as utilModule from "@jx3box/jx3box-common/js/utils";
24
- const { getLink } = utilModule;
23
+ import { getLink } from "@jx3box/jx3box-common/js/utils";
25
24
  import { getCollection } from "../../service/cms";
26
25
  import i18nMixin from "../../i18n/mixin";
27
26
  export default {
@@ -10,8 +10,8 @@ import {
10
10
  installVueRouterAnalytics,
11
11
  } from "@jx3box/jx3box-common/js/analytics.js";
12
12
 
13
- const DEFAULT_CONFIG_ENDPOINT = "/api/cms/system/traffic/config";
14
- const DEFAULT_BATCH_ENDPOINT = "/api/cms/system/traffic/visits/batch";
13
+ const DEFAULT_CONFIG_ENDPOINT = "https://cms.jx3box.com/api/cms/system/traffic/config";
14
+ const DEFAULT_BATCH_ENDPOINT = "https://cms.jx3box.com/api/cms/system/traffic/visits/batch";
15
15
  const DEFAULT_QUEUE_STORAGE_KEY = "jx3box:analytics:traffic:queue:v1";
16
16
  const DEFAULT_BLOCK_STORAGE_KEY = "jx3box:analytics:traffic:block:v1";
17
17
  const EMBEDDED_SURFACES = new Set(["app", "miniprogram", "pc_game", "mobile_game"]);
@@ -271,7 +271,7 @@ test("headless opt-in emits the official Traffic fixture once and honors per-id
271
271
  ids: [fixture.canonical_event.page_view_id, fixture.canonical_event.event_id],
272
272
  async fetch(url, options) {
273
273
  requests.push({ url, options: options || {} });
274
- if (String(url).startsWith("/api/cms/system/traffic/config")) {
274
+ if (String(url).startsWith("https://cms.jx3box.com/api/cms/system/traffic/config")) {
275
275
  return createResponse(200, {
276
276
  code: 0,
277
277
  data: {
@@ -348,7 +348,7 @@ test("headless opt-in emits the official Traffic fixture once and honors per-id
348
348
  await waitForRouter();
349
349
 
350
350
  assert.equal(requests.length, 1, "navigation should request config but defer Traffic until finalization");
351
- assert.match(requests[0].url, /^\/api\/cms\/system\/traffic\/config\?/);
351
+ assert.match(requests[0].url, /^https:\/\/cms\.jx3box\.com\/api\/cms\/system\/traffic\/config\?/);
352
352
  assert.equal(requests[0].url.includes("must-stay-local"), false);
353
353
  assert.equal(requests[0].url.includes("section=home"), false);
354
354
  assert.equal(traffic.getState().analytics.queue.pending, 1);
@@ -422,7 +422,7 @@ test("embedded hosts use the backend recipient domain in both Config and envelop
422
422
  const runtime = createRuntime({
423
423
  async fetch(url, options) {
424
424
  requests.push({ url, options: options || {} });
425
- if (String(url).startsWith("/api/cms/system/traffic/config")) {
425
+ if (String(url).startsWith("https://cms.jx3box.com/api/cms/system/traffic/config")) {
426
426
  return createResponse(200, {
427
427
  code: 0,
428
428
  data: {
@@ -485,7 +485,7 @@ test("an explicit unknown permission pauses in memory until the host unblocks",
485
485
  localStorage,
486
486
  async fetch(url, options) {
487
487
  requests.push({ url, options: options || {} });
488
- if (String(url).startsWith("/api/cms/system/traffic/config")) {
488
+ if (String(url).startsWith("https://cms.jx3box.com/api/cms/system/traffic/config")) {
489
489
  return createResponse(200, {
490
490
  code: 0,
491
491
  data: {
@@ -545,7 +545,7 @@ test("an explicit unknown permission pauses in memory until the host unblocks",
545
545
  "unknown state is not a persistent device block"
546
546
  );
547
547
  await traffic.flush({ reason: "permission_unknown" });
548
- assert.equal(requests.filter((request) => request.url === "/api/cms/system/traffic/visits/batch").length, 0);
548
+ assert.equal(requests.filter((request) => request.url === "https://cms.jx3box.com/api/cms/system/traffic/visits/batch").length, 0);
549
549
 
550
550
  assert.deepEqual(traffic.unblock(), { known: true, allow: true });
551
551
  assert.equal(traffic.getState().analytics.queue.blocked, false);
@@ -822,7 +822,7 @@ test("a trusted server ACK block is persisted before the queue is cleared", asyn
822
822
  const runtime = createRuntime({
823
823
  localStorage,
824
824
  async fetch(url, options) {
825
- if (String(url).startsWith("/api/cms/system/traffic/config")) {
825
+ if (String(url).startsWith("https://cms.jx3box.com/api/cms/system/traffic/config")) {
826
826
  return createResponse(200, {
827
827
  code: 0,
828
828
  data: {
@@ -889,7 +889,7 @@ test("the Traffic-only Journal never consumes or rewrites a shared Tracking Jour
889
889
  runtime: createRuntime({
890
890
  localStorage,
891
891
  async fetch(url, options) {
892
- if (String(url).startsWith("/api/cms/system/traffic/config")) {
892
+ if (String(url).startsWith("https://cms.jx3box.com/api/cms/system/traffic/config")) {
893
893
  return createResponse(200, {
894
894
  code: 0,
895
895
  data: {