@blogmcp/community 0.5.1 → 0.5.2

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.
@@ -124,7 +124,10 @@ const cs = {
124
124
  "private.activation.submit": "Aktivovat soukromé zprávy",
125
125
  "private.activation.declined": "Bez souhlasu se zpracováním údajů o zdraví soukromé zprávy zapnout nejdou, proto zůstávají vypnuté. Tuto volbu si neukládáme, aktivovat je můžete kdykoli.",
126
126
  "private.activation.done": "Soukromé zprávy jsou aktivní.",
127
- "private.activation.withdraw": "Odvolat souhlas a ukončit aktivaci",
127
+ "private.activation.withdrawContract": "Odstoupit od smlouvy",
128
+ "private.activation.withdrawContractConfirm": "Potvrdit odstoupení od smlouvy",
129
+ "private.activation.endPrivate": "Ukončit soukromé zprávy",
130
+ "private.activation.endPrivateConfirm": "Potvrdit ukončení soukromých zpráv",
128
131
  "private.activation.withdrawConfirm": "Soukromé zprávy se vypnou a obsah, který na souhlasu stojí, se po lhůtě smaže. Do té doby to můžete vrátit novou aktivací.",
129
132
  "private.activation.withdrawn": "Souhlas je odvolaný.",
130
133
  "private.activation.addressFirst": "Před aktivací si nastavte adresu pro schvalování zařízení.",
@@ -287,7 +290,7 @@ const cs = {
287
290
  "private.dm.composer.display": "Na obrazovku ji dává tento web, který ji podle smlouvy nesmí číst, ukládat ani měřit.",
288
291
  "private.dm.composer.sameEntity": "Na obrazovku ji dává tento web. Web i blogmcp provozuje stejná osoba a píše i kód webu, takže by ji technicky mohla číst; zakazuje jí to zákon.",
289
292
  "private.dm.composer.reports": "Když ji kdokoli z vás nahlásí, uvidí ji i s nejvýš 10 předchozími zprávami ten, kdo hlášení vyřizuje.",
290
- "private.dm.composer.orders": "Na příkaz soudu nebo policie ji provozovatel musí vydat.",
293
+ "private.dm.composer.orders": "Na příkaz soudu nebo se souhlasem soudce ji provozovatel musí vydat.",
291
294
  "private.dm.composer.delegated": "Web, přes který se přihlašujete, se za vás umí přihlásit jako nové zařízení a nové zprávy by viděl. Každé takové přihlášení vám ohlásíme e-mailem.",
292
295
  "private.dm.composer.notE2e": "Zprávy nejsou šifrované koncově.",
293
296
  "private.dm.search.label": "Hledat v konverzaci",
@@ -435,7 +438,10 @@ const en = {
435
438
  "private.activation.submit": "Activate private messages",
436
439
  "private.activation.declined": "Private messages cannot be turned on without the consent to processing health data, so they stay off. This choice is not stored; you can activate them at any time.",
437
440
  "private.activation.done": "Private messages are active.",
438
- "private.activation.withdraw": "Withdraw consent and end the activation",
441
+ "private.activation.withdrawContract": "Withdraw from the contract",
442
+ "private.activation.withdrawContractConfirm": "Confirm withdrawal from the contract",
443
+ "private.activation.endPrivate": "End private messages",
444
+ "private.activation.endPrivateConfirm": "Confirm ending private messages",
439
445
  "private.activation.withdrawConfirm": "Private messages switch off and the content that relies on the consent is erased after a waiting period. Until then you can undo this by activating again.",
440
446
  "private.activation.withdrawn": "Your consent is withdrawn.",
441
447
  "private.activation.addressFirst": "Set your device approval address before you activate.",
@@ -518,7 +524,7 @@ const en = {
518
524
  "private.promise.display.tenant": "The {site} website puts them on your screen, and its contract forbids it to read, store or measure them.",
519
525
  "private.promise.same_entity": "Private messages are run by blogmcp. Today the website and blogmcp are run by the same person ({entity}, company ID {ico}), who also writes the website's code that displays your messages. They could technically read them; the law forbids it. Otherwise the content is opened outside your screen only for a reported message or on an authority's order, and every such opening is logged automatically.",
520
526
  "private.promise.reports": "The website's team has no tool for them, except for handling reported messages. If either of you reports a message, whoever handles reports for the operator of private messages sees it with at most 10 preceding messages. That may be an authorised moderator of the {site} website. Whoever reports sees their name before sending.",
521
- "private.promise.orders": "Data the operator must hand over on a court or police order are an exception too.",
527
+ "private.promise.orders": "Data the operator must hand over on a court's order or with a judge's consent are an exception too.",
522
528
  "private.promise.not_e2e": "They are not end-to-end encrypted.",
523
529
  "private.promise.delegated": "The website you sign in through can technically sign in as you as a new device. It would not see older messages there without your approval, but it would see new ones, and it could write in your name. That is why blogmcp announces every new sign-in to you by e-mail.",
524
530
  "private.error.memberReadOnly": "Your account can only read for now, so you cannot use private messages on this site.",
@@ -606,7 +612,7 @@ const en = {
606
612
  "private.dm.composer.display": "This website puts it on the screen, and its contract forbids it to read, store or measure it.",
607
613
  "private.dm.composer.sameEntity": "This website puts it on the screen. The website and blogmcp are run by the same person, who also writes the website's code, so they could technically read it; the law forbids it.",
608
614
  "private.dm.composer.reports": "If either of you reports it, whoever handles the report sees it with at most 10 preceding messages.",
609
- "private.dm.composer.orders": "The operator must hand it over on a court or police order.",
615
+ "private.dm.composer.orders": "The operator must hand it over on a court's order or with a judge's consent.",
610
616
  "private.dm.composer.delegated": "The website you sign in through can sign in as you on a new device and would see new messages. We tell you of every such sign-in by e-mail.",
611
617
  "private.dm.composer.notE2e": "Messages are not end-to-end encrypted.",
612
618
  "private.dm.search.label": "Search the conversation",
@@ -2266,39 +2272,41 @@ const _hoisted_5$j = {
2266
2272
  class: "bcm-p-note"
2267
2273
  };
2268
2274
  const _hoisted_6$h = { class: "bcm-p-actions" };
2269
- const _hoisted_7$h = ["disabled"];
2270
- const _hoisted_8$e = {
2275
+ const _hoisted_7$h = ["data-end"];
2276
+ const _hoisted_8$e = ["disabled"];
2277
+ const _hoisted_9$c = {
2271
2278
  key: 0,
2272
2279
  "data-activation-state": "refused"
2273
2280
  };
2274
- const _hoisted_9$c = {
2281
+ const _hoisted_10$9 = {
2275
2282
  key: 1,
2276
2283
  "data-activation-state": "needed"
2277
2284
  };
2278
- const _hoisted_10$9 = {
2285
+ const _hoisted_11$8 = {
2279
2286
  key: 2,
2280
2287
  class: "bcm-p-note"
2281
2288
  };
2282
- const _hoisted_11$8 = {
2289
+ const _hoisted_12$8 = {
2283
2290
  key: 3,
2284
2291
  class: "bcm-p-note"
2285
2292
  };
2286
- const _hoisted_12$8 = {
2293
+ const _hoisted_13$6 = {
2287
2294
  key: 5,
2288
2295
  class: "bcm-p-announced"
2289
2296
  };
2290
- const _hoisted_13$6 = { class: "bcm-p-note" };
2291
- const _hoisted_14$5 = { class: "bcm-p-check" };
2297
+ const _hoisted_14$5 = { class: "bcm-p-note" };
2292
2298
  const _hoisted_15$5 = { class: "bcm-p-check" };
2293
2299
  const _hoisted_16$5 = { class: "bcm-p-check" };
2294
- const _hoisted_17$3 = {
2300
+ const _hoisted_17$3 = { class: "bcm-p-check" };
2301
+ const _hoisted_18$3 = {
2295
2302
  key: 8,
2296
2303
  class: "bcm-p-note",
2297
2304
  "data-art9-declined": ""
2298
2305
  };
2299
- const _hoisted_18$3 = { class: "bcm-p-actions" };
2300
- const _hoisted_19$3 = ["disabled"];
2306
+ const _hoisted_19$3 = { class: "bcm-p-actions" };
2301
2307
  const _hoisted_20$3 = ["disabled"];
2308
+ const _hoisted_21$3 = ["disabled"];
2309
+ const WITHDRAWAL_DAYS = 14;
2302
2310
  const _sfc_main$m = /* @__PURE__ */ defineComponent({
2303
2311
  __name: "ScreenActivation",
2304
2312
  props: {
@@ -2315,6 +2323,10 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2315
2323
  const art9Tenant = ref(false);
2316
2324
  const confirming = ref(false);
2317
2325
  const acceptedAt = computed(() => tx.value.when(a.value?.activation.activatedAt ?? null));
2326
+ const endIsWithdrawal = computed(() => {
2327
+ const at = a.value?.activation.activatedAt;
2328
+ return at ? Date.now() < Date.parse(at) + WITHDRAWAL_DAYS * 864e5 : false;
2329
+ });
2318
2330
  const display = computed(() => a.value?.display ?? null);
2319
2331
  const addressReady = computed(() => s.value.state?.address.state === "verified");
2320
2332
  const deviceReady = computed(() => s.value.state?.device.state !== "pending");
@@ -2353,8 +2365,9 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2353
2365
  type: "button",
2354
2366
  class: "bcm-p-btn",
2355
2367
  "data-action": "withdraw",
2368
+ "data-end": endIsWithdrawal.value ? "withdrawal" : "termination",
2356
2369
  onClick: _cache[0] || (_cache[0] = ($event) => confirming.value = true)
2357
- }, toDisplayString(tx.value.pt("private.activation.withdraw")), 1)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2370
+ }, toDisplayString(tx.value.pt(endIsWithdrawal.value ? "private.activation.withdrawContract" : "private.activation.endPrivate")), 9, _hoisted_7$h)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2358
2371
  createElementVNode("button", {
2359
2372
  type: "button",
2360
2373
  class: "bcm-p-btn bcm-p-danger",
@@ -2364,7 +2377,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2364
2377
  confirming.value = false;
2365
2378
  __props.controller.withdraw();
2366
2379
  })
2367
- }, toDisplayString(tx.value.pt("private.confirm")), 9, _hoisted_7$h),
2380
+ }, toDisplayString(tx.value.pt(endIsWithdrawal.value ? "private.activation.withdrawContractConfirm" : "private.activation.endPrivateConfirm")), 9, _hoisted_8$e),
2368
2381
  createElementVNode("button", {
2369
2382
  type: "button",
2370
2383
  class: "bcm-p-btn",
@@ -2373,8 +2386,8 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2373
2386
  ], 64))
2374
2387
  ])
2375
2388
  ], 64)) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
2376
- a.value.activation.state === "refused" ? (openBlock(), createElementBlock("p", _hoisted_8$e, toDisplayString(tx.value.pt("private.activation.refused")), 1)) : (openBlock(), createElementBlock("p", _hoisted_9$c, toDisplayString(tx.value.pt("private.activation.intro")), 1)),
2377
- !addressReady.value ? (openBlock(), createElementBlock("p", _hoisted_10$9, toDisplayString(tx.value.pt("private.activation.addressFirst")), 1)) : !deviceReady.value ? (openBlock(), createElementBlock("p", _hoisted_11$8, toDisplayString(tx.value.pt("private.activation.approvedOnly")), 1)) : createCommentVNode("", true),
2389
+ a.value.activation.state === "refused" ? (openBlock(), createElementBlock("p", _hoisted_9$c, toDisplayString(tx.value.pt("private.activation.refused")), 1)) : (openBlock(), createElementBlock("p", _hoisted_10$9, toDisplayString(tx.value.pt("private.activation.intro")), 1)),
2390
+ !addressReady.value ? (openBlock(), createElementBlock("p", _hoisted_11$8, toDisplayString(tx.value.pt("private.activation.addressFirst")), 1)) : !deviceReady.value ? (openBlock(), createElementBlock("p", _hoisted_12$8, toDisplayString(tx.value.pt("private.activation.approvedOnly")), 1)) : createCommentVNode("", true),
2378
2391
  s.value.promise ? (openBlock(), createBlock(_sfc_main$n, {
2379
2392
  key: 4,
2380
2393
  keys: s.value.promise.keys,
@@ -2390,12 +2403,12 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2390
2403
  "accepted-at": acceptedAt.value
2391
2404
  }, null, 8, ["text", "lang", "display", "accepted-at"]);
2392
2405
  }), 128)),
2393
- a.value.announced.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_12$8, [
2406
+ a.value.announced.length > 0 ? (openBlock(), createElementBlock("div", _hoisted_13$6, [
2394
2407
  (openBlock(true), createElementBlock(Fragment, null, renderList(a.value.announced, (t) => {
2395
2408
  return openBlock(), createElementBlock(Fragment, {
2396
2409
  key: t.id
2397
2410
  }, [
2398
- createElementVNode("p", _hoisted_13$6, toDisplayString(tx.value.pt("private.activation.announced", { date: tx.value.when(t.effectiveAt, false) })), 1),
2411
+ createElementVNode("p", _hoisted_14$5, toDisplayString(tx.value.pt("private.activation.announced", { date: tx.value.when(t.effectiveAt, false) })), 1),
2399
2412
  createVNode(_sfc_main$o, {
2400
2413
  text: t,
2401
2414
  lang: __props.lang,
@@ -2405,7 +2418,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2405
2418
  ], 64);
2406
2419
  }), 128))
2407
2420
  ])) : createCommentVNode("", true),
2408
- createElementVNode("label", _hoisted_14$5, [
2421
+ createElementVNode("label", _hoisted_15$5, [
2409
2422
  withDirectives(createElementVNode("input", {
2410
2423
  "onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => acceptTerms.value = $event),
2411
2424
  type: "checkbox",
@@ -2422,7 +2435,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2422
2435
  display: display.value,
2423
2436
  "accepted-at": acceptedAt.value
2424
2437
  }, null, 8, ["text", "lang", "display", "accepted-at"]),
2425
- createElementVNode("label", _hoisted_15$5, [
2438
+ createElementVNode("label", _hoisted_16$5, [
2426
2439
  withDirectives(createElementVNode("input", {
2427
2440
  "onUpdate:modelValue": _cache[4] || (_cache[4] = ($event) => art9Tenant.value = $event),
2428
2441
  type: "checkbox",
@@ -2440,7 +2453,7 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2440
2453
  display: display.value,
2441
2454
  "accepted-at": acceptedAt.value
2442
2455
  }, null, 8, ["text", "lang", "display", "accepted-at"]),
2443
- createElementVNode("label", _hoisted_16$5, [
2456
+ createElementVNode("label", _hoisted_17$3, [
2444
2457
  withDirectives(createElementVNode("input", {
2445
2458
  "onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => art9.value = $event),
2446
2459
  type: "checkbox",
@@ -2451,22 +2464,22 @@ const _sfc_main$m = /* @__PURE__ */ defineComponent({
2451
2464
  createTextVNode(toDisplayString(tx.value.pt("private.activation.art9")), 1)
2452
2465
  ])
2453
2466
  ], 64)) : createCommentVNode("", true),
2454
- s.value.art9Declined ? (openBlock(), createElementBlock("p", _hoisted_17$3, toDisplayString(tx.value.pt("private.activation.declined")), 1)) : createCommentVNode("", true),
2455
- createElementVNode("div", _hoisted_18$3, [
2467
+ s.value.art9Declined ? (openBlock(), createElementBlock("p", _hoisted_18$3, toDisplayString(tx.value.pt("private.activation.declined")), 1)) : createCommentVNode("", true),
2468
+ createElementVNode("div", _hoisted_19$3, [
2456
2469
  createElementVNode("button", {
2457
2470
  type: "button",
2458
2471
  class: "bcm-p-btn bcm-p-primary",
2459
2472
  disabled: !canSubmit.value,
2460
2473
  "data-action": "activate",
2461
2474
  onClick: _cache[6] || (_cache[6] = ($event) => __props.controller.activate({ acceptTerms: acceptTerms.value, art9: "accept", art9Tenant: art9Tenant.value }))
2462
- }, toDisplayString(tx.value.pt("private.activation.submit")), 9, _hoisted_19$3),
2475
+ }, toDisplayString(tx.value.pt("private.activation.submit")), 9, _hoisted_20$3),
2463
2476
  createElementVNode("button", {
2464
2477
  type: "button",
2465
2478
  class: "bcm-p-btn",
2466
2479
  disabled: !canRefuse.value,
2467
2480
  "data-action": "refuse",
2468
2481
  onClick: _cache[7] || (_cache[7] = ($event) => __props.controller.activate({ acceptTerms: acceptTerms.value, art9: "refuse", art9Tenant: false }))
2469
- }, toDisplayString(tx.value.pt("private.activation.art9Refuse")), 9, _hoisted_20$3)
2482
+ }, toDisplayString(tx.value.pt("private.activation.art9Refuse")), 9, _hoisted_21$3)
2470
2483
  ])
2471
2484
  ], 64))
2472
2485
  ])) : createCommentVNode("", true);
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { ab, B, S, ac, D, t, r, F, u, s, q, M, N, p, P, V, T, W, R, Q, a0, Z, a5, $, U, a6, a7, O, a9, a8, X, a2, a1, _, Y, f, d, a, n, k, j, o, m, g, c, b, e, h, l, i, z, v, K, G, H, L, J, A, x, w, y, C, I, E, aa, a3, a4 } from "./chunks/mount-SKmc4NgD.js";
2
- const VERSION = "0.5.1";
2
+ const VERSION = "0.5.2";
3
3
  export {
4
4
  ab as AVATAR_PRESETS,
5
5
  B as BADGE_ELEMENT_TAG,
@@ -6,9 +6,10 @@
6
6
  * receives what the member is about to write — the other participant; the website's code, which puts it on the screen
7
7
  * under tenant rendering (and, where the website and blogmcp are the same legal person, `same_entity`, the line that
8
8
  * says this person writes that code and is barred by the law, not by a contract it would sign with itself); whoever
9
- * handles a report, with the at most 10 preceding messages the matrix gives them; the court or police order, which is in
10
- * every row, so the list never reads as complete without it; the delegated addendum where the website can sign in as the
11
- * member (under both renderings); and that the messages are not end-to-end encrypted. test/private/dm/composer.spec.ts
9
+ * handles a report, with the at most 10 preceding messages the matrix gives them; a court's order or a judge's
10
+ * consent (texts 20, 21, 23 and 24), which is in every row, so the list never reads as complete without it; the
11
+ * delegated addendum where the website can sign in as the member (under both renderings); and that the messages are
12
+ * not end-to-end encrypted. test/private/dm/composer.spec.ts
12
13
  * checks every space × identity × rendering × same-entity × host combination against the promise's own keys, and the
13
14
  * tone test covers its words with the rest of the conversations' catalogue.
14
15
  *
@@ -1,5 +1,5 @@
1
- import { A, h, C, F, D, L, N, M, E, B, X, n, o, H, T, U, V, t, k, j, P, s, J, I, K, z, G, x, l, e, a, d, b, y, S, w, O, i, q, Z, Q, m, c, R, u, f, v, p, g, r, W, Y } from "../chunks/private-mount-BgfUSd3g.js";
2
- const VERSION = "0.5.1";
1
+ import { A, h, C, F, D, L, N, M, E, B, X, n, o, H, T, U, V, t, k, j, P, s, J, I, K, z, G, x, l, e, a, d, b, y, S, w, O, i, q, Z, Q, m, c, R, u, f, v, p, g, r, W, Y } from "../chunks/private-mount-B7EjskRH.js";
2
+ const VERSION = "0.5.2";
3
3
  export {
4
4
  A as ACCOUNT_STATE_EVENTS,
5
5
  h as APPROVAL_LIMIT_CODES,
@@ -21,14 +21,14 @@ function useMounted(kind, props, load, inPlace = []) {
21
21
  return { host, element: createElement("div", { ref: host, "data-blogmcp-community": kind }) };
22
22
  }
23
23
  function KbChatDock(props) {
24
- const { host, element } = useMounted("chat-dock", props, async () => (await import("../chunks/private-mount-BgfUSd3g.js").then((n) => n._)).mountChatDock, ["hiddenByHost"]);
24
+ const { host, element } = useMounted("chat-dock", props, async () => (await import("../chunks/private-mount-B7EjskRH.js").then((n) => n._)).mountChatDock, ["hiddenByHost"]);
25
25
  useEffect(() => {
26
26
  host.current?.firstElementChild?.toggleAttribute(HIDDEN_BY_HOST, props.hiddenByHost === true);
27
27
  }, [host, props.hiddenByHost]);
28
28
  return element;
29
29
  }
30
30
  function KbPrivateView(props) {
31
- return useMounted("private-view", props, async () => (await import("../chunks/private-mount-BgfUSd3g.js").then((n) => n._)).mountPrivateView).element;
31
+ return useMounted("private-view", props, async () => (await import("../chunks/private-mount-B7EjskRH.js").then((n) => n._)).mountPrivateView).element;
32
32
  }
33
33
  export {
34
34
  KbChatDock,
@@ -50,7 +50,7 @@ const KbChatDock = defineComponent({
50
50
  props: { ...commonProps, hiddenByHost: Boolean },
51
51
  setup(props) {
52
52
  const opts = () => defined({ ...props, hiddenByHost: void 0 });
53
- const host = useMount("chat-dock", opts, async () => (await import("../chunks/private-mount-BgfUSd3g.js").then((n) => n._)).mountChatDock, (el) => el?.toggleAttribute(HIDDEN_BY_HOST, props.hiddenByHost));
53
+ const host = useMount("chat-dock", opts, async () => (await import("../chunks/private-mount-B7EjskRH.js").then((n) => n._)).mountChatDock, (el) => el?.toggleAttribute(HIDDEN_BY_HOST, props.hiddenByHost));
54
54
  watch(
55
55
  () => props.hiddenByHost,
56
56
  (hidden) => host.value?.firstElementChild?.toggleAttribute(HIDDEN_BY_HOST, hidden)
@@ -62,7 +62,7 @@ const KbPrivateView = defineComponent({
62
62
  name: "KbPrivateView",
63
63
  props: { ...commonProps, screen: String },
64
64
  setup(props) {
65
- const host = useMount("private-view", () => defined({ ...props }), async () => (await import("../chunks/private-mount-BgfUSd3g.js").then((n) => n._)).mountPrivateView);
65
+ const host = useMount("private-view", () => defined({ ...props }), async () => (await import("../chunks/private-mount-B7EjskRH.js").then((n) => n._)).mountPrivateView);
66
66
  return () => h("div", { ref: host, "data-blogmcp-community": "private-view" });
67
67
  }
68
68
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@blogmcp/community",
3
- "version": "0.5.1",
3
+ "version": "0.5.2",
4
4
  "description": "Community elements for your own site: the discussion under an article, the DSA notice form and the reader's „My community” panel. Custom elements + Vue/React wrappers + a script build, over @blogmcp/sdk/community.",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -59,8 +59,8 @@
59
59
  "postpack": "node ../../scripts/pack-dist-types.mjs postpack"
60
60
  },
61
61
  "dependencies": {
62
- "@blogmcp/sanitize": "^0.14.1",
63
- "@blogmcp/sdk": "^0.14.1",
62
+ "@blogmcp/sanitize": "^0.14.2",
63
+ "@blogmcp/sdk": "^0.14.2",
64
64
  "vue": "^3.5.0"
65
65
  },
66
66
  "peerDependencies": {
@@ -6,9 +6,10 @@
6
6
  * receives what the member is about to write — the other participant; the website's code, which puts it on the screen
7
7
  * under tenant rendering (and, where the website and blogmcp are the same legal person, `same_entity`, the line that
8
8
  * says this person writes that code and is barred by the law, not by a contract it would sign with itself); whoever
9
- * handles a report, with the at most 10 preceding messages the matrix gives them; the court or police order, which is in
10
- * every row, so the list never reads as complete without it; the delegated addendum where the website can sign in as the
11
- * member (under both renderings); and that the messages are not end-to-end encrypted. test/private/dm/composer.spec.ts
9
+ * handles a report, with the at most 10 preceding messages the matrix gives them; a court's order or a judge's
10
+ * consent (texts 20, 21, 23 and 24), which is in every row, so the list never reads as complete without it; the
11
+ * delegated addendum where the website can sign in as the member (under both renderings); and that the messages are
12
+ * not end-to-end encrypted. test/private/dm/composer.spec.ts
12
13
  * checks every space × identity × rendering × same-entity × host combination against the promise's own keys, and the
13
14
  * tone test covers its words with the rest of the conversations' catalogue.
14
15
  *
@@ -62,7 +62,10 @@
62
62
  "private.activation.submit": "Aktivovat soukromé zprávy",
63
63
  "private.activation.declined": "Bez souhlasu se zpracováním údajů o zdraví soukromé zprávy zapnout nejdou, proto zůstávají vypnuté. Tuto volbu si neukládáme, aktivovat je můžete kdykoli.",
64
64
  "private.activation.done": "Soukromé zprávy jsou aktivní.",
65
- "private.activation.withdraw": "Odvolat souhlas a ukončit aktivaci",
65
+ "private.activation.withdrawContract": "Odstoupit od smlouvy",
66
+ "private.activation.withdrawContractConfirm": "Potvrdit odstoupení od smlouvy",
67
+ "private.activation.endPrivate": "Ukončit soukromé zprávy",
68
+ "private.activation.endPrivateConfirm": "Potvrdit ukončení soukromých zpráv",
66
69
  "private.activation.withdrawConfirm": "Soukromé zprávy se vypnou a obsah, který na souhlasu stojí, se po lhůtě smaže. Do té doby to můžete vrátit novou aktivací.",
67
70
  "private.activation.withdrawn": "Souhlas je odvolaný.",
68
71
  "private.activation.addressFirst": "Před aktivací si nastavte adresu pro schvalování zařízení.",
@@ -225,7 +228,7 @@
225
228
  "private.dm.composer.display": "Na obrazovku ji dává tento web, který ji podle smlouvy nesmí číst, ukládat ani měřit.",
226
229
  "private.dm.composer.sameEntity": "Na obrazovku ji dává tento web. Web i blogmcp provozuje stejná osoba a píše i kód webu, takže by ji technicky mohla číst; zakazuje jí to zákon.",
227
230
  "private.dm.composer.reports": "Když ji kdokoli z vás nahlásí, uvidí ji i s nejvýš 10 předchozími zprávami ten, kdo hlášení vyřizuje.",
228
- "private.dm.composer.orders": "Na příkaz soudu nebo policie ji provozovatel musí vydat.",
231
+ "private.dm.composer.orders": "Na příkaz soudu nebo se souhlasem soudce ji provozovatel musí vydat.",
229
232
  "private.dm.composer.delegated": "Web, přes který se přihlašujete, se za vás umí přihlásit jako nové zařízení a nové zprávy by viděl. Každé takové přihlášení vám ohlásíme e-mailem.",
230
233
  "private.dm.composer.notE2e": "Zprávy nejsou šifrované koncově.",
231
234
  "private.dm.search.label": "Hledat v konverzaci",
@@ -62,7 +62,10 @@
62
62
  "private.activation.submit": "Activate private messages",
63
63
  "private.activation.declined": "Private messages cannot be turned on without the consent to processing health data, so they stay off. This choice is not stored; you can activate them at any time.",
64
64
  "private.activation.done": "Private messages are active.",
65
- "private.activation.withdraw": "Withdraw consent and end the activation",
65
+ "private.activation.withdrawContract": "Withdraw from the contract",
66
+ "private.activation.withdrawContractConfirm": "Confirm withdrawal from the contract",
67
+ "private.activation.endPrivate": "End private messages",
68
+ "private.activation.endPrivateConfirm": "Confirm ending private messages",
66
69
  "private.activation.withdrawConfirm": "Private messages switch off and the content that relies on the consent is erased after a waiting period. Until then you can undo this by activating again.",
67
70
  "private.activation.withdrawn": "Your consent is withdrawn.",
68
71
  "private.activation.addressFirst": "Set your device approval address before you activate.",
@@ -145,7 +148,7 @@
145
148
  "private.promise.display.tenant": "The {site} website puts them on your screen, and its contract forbids it to read, store or measure them.",
146
149
  "private.promise.same_entity": "Private messages are run by blogmcp. Today the website and blogmcp are run by the same person ({entity}, company ID {ico}), who also writes the website's code that displays your messages. They could technically read them; the law forbids it. Otherwise the content is opened outside your screen only for a reported message or on an authority's order, and every such opening is logged automatically.",
147
150
  "private.promise.reports": "The website's team has no tool for them, except for handling reported messages. If either of you reports a message, whoever handles reports for the operator of private messages sees it with at most 10 preceding messages. That may be an authorised moderator of the {site} website. Whoever reports sees their name before sending.",
148
- "private.promise.orders": "Data the operator must hand over on a court or police order are an exception too.",
151
+ "private.promise.orders": "Data the operator must hand over on a court's order or with a judge's consent are an exception too.",
149
152
  "private.promise.not_e2e": "They are not end-to-end encrypted.",
150
153
  "private.promise.delegated": "The website you sign in through can technically sign in as you as a new device. It would not see older messages there without your approval, but it would see new ones, and it could write in your name. That is why blogmcp announces every new sign-in to you by e-mail.",
151
154
  "private.error.memberReadOnly": "Your account can only read for now, so you cannot use private messages on this site.",
@@ -233,7 +236,7 @@
233
236
  "private.dm.composer.display": "This website puts it on the screen, and its contract forbids it to read, store or measure it.",
234
237
  "private.dm.composer.sameEntity": "This website puts it on the screen. The website and blogmcp are run by the same person, who also writes the website's code, so they could technically read it; the law forbids it.",
235
238
  "private.dm.composer.reports": "If either of you reports it, whoever handles the report sees it with at most 10 preceding messages.",
236
- "private.dm.composer.orders": "The operator must hand it over on a court or police order.",
239
+ "private.dm.composer.orders": "The operator must hand it over on a court's order or with a judge's consent.",
237
240
  "private.dm.composer.delegated": "The website you sign in through can sign in as you on a new device and would see new messages. We tell you of every such sign-in by e-mail.",
238
241
  "private.dm.composer.notE2e": "Messages are not end-to-end encrypted.",
239
242
  "private.dm.search.label": "Search the conversation",
@@ -22,6 +22,16 @@ const art9 = ref(false)
22
22
  const art9Tenant = ref(false)
23
23
  const confirming = ref(false)
24
24
  const acceptedAt = computed(() => tx.value.when(a.value?.activation.activatedAt ?? null))
25
+ /**
26
+ * Inside the 14 days of § 1829 odst. 1 OZ after the activation the end is a withdrawal from the contract, after them
27
+ * an ending; kb-api decides the same way (activation.ts contractEndKindAt). The labels are the ones text 20 promises and
28
+ * § 1830a OZ (from 1. 1. 2027) prescribes: „Odstoupit od smlouvy“, confirmed by „Potvrdit odstoupení od smlouvy“.
29
+ */
30
+ const WITHDRAWAL_DAYS = 14
31
+ const endIsWithdrawal = computed(() => {
32
+ const at = a.value?.activation.activatedAt
33
+ return at ? Date.now() < Date.parse(at) + WITHDRAWAL_DAYS * 86_400_000 : false
34
+ })
25
35
  const display = computed(() => a.value?.display ?? null)
26
36
  const addressReady = computed(() => s.value.state?.address.state === 'verified')
27
37
  const deviceReady = computed(() => s.value.state?.device.state !== 'pending')
@@ -43,9 +53,9 @@ const canRefuse = computed(() => !s.value.busy)
43
53
  </div>
44
54
  <p v-if="confirming" class="bcm-p-note">{{ tx.pt('private.activation.withdrawConfirm') }}</p>
45
55
  <div class="bcm-p-actions">
46
- <button v-if="!confirming" type="button" class="bcm-p-btn" data-action="withdraw" @click="confirming = true">{{ tx.pt('private.activation.withdraw') }}</button>
56
+ <button v-if="!confirming" type="button" class="bcm-p-btn" data-action="withdraw" :data-end="endIsWithdrawal ? 'withdrawal' : 'termination'" @click="confirming = true">{{ tx.pt(endIsWithdrawal ? 'private.activation.withdrawContract' : 'private.activation.endPrivate') }}</button>
47
57
  <template v-else>
48
- <button type="button" class="bcm-p-btn bcm-p-danger" :disabled="s.busy" data-action="withdraw-confirm" @click="confirming = false; controller.withdraw()">{{ tx.pt('private.confirm') }}</button>
58
+ <button type="button" class="bcm-p-btn bcm-p-danger" :disabled="s.busy" data-action="withdraw-confirm" @click="confirming = false; controller.withdraw()">{{ tx.pt(endIsWithdrawal ? 'private.activation.withdrawContractConfirm' : 'private.activation.endPrivateConfirm') }}</button>
49
59
  <button type="button" class="bcm-p-btn" @click="confirming = false">{{ tx.pt('private.cancel') }}</button>
50
60
  </template>
51
61
  </div>