@kirby-tools/licensing 0.6.9 → 0.6.10

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/dist/constants.js CHANGED
@@ -9,42 +9,36 @@ const ERROR_KEY_MAP = {
9
9
  const INTEGRITY_ERROR = "The activation buttons appear to be hidden. Please purchase a license.";
10
10
  const I18N_MESSAGES = {
11
11
  en: {
12
- "errors.validation.missingFields": "Email address and order ID are required",
13
12
  "activate": "Activate",
14
13
  "buy": "Buy a license",
15
14
  "upgrade": "Upgrade",
16
15
  "notification.success": "Plugin activated!"
17
16
  },
18
17
  de: {
19
- "errors.validation.missingFields": "E-Mail-Adresse und Bestellnummer sind notwendig",
20
18
  "activate": "Aktivieren",
21
19
  "buy": "Lizenz kaufen",
22
20
  "upgrade": "Upgrade",
23
21
  "notification.success": "Plugin aktiviert!"
24
22
  },
25
23
  fr: {
26
- "errors.validation.missingFields": "Adresse e-mail et numéro de commande requis",
27
24
  "activate": "Activer",
28
25
  "buy": "Acheter une licence",
29
26
  "upgrade": "Upgrade",
30
27
  "notification.success": "Plugin activé !"
31
28
  },
32
29
  nl: {
33
- "errors.validation.missingFields": "E-mailadres en bestelnummer zijn verplicht",
34
30
  "activate": "Activeren",
35
31
  "buy": "Koop een licentie",
36
32
  "upgrade": "Upgrade",
37
33
  "notification.success": "Plugin geactiveerd!"
38
34
  },
39
35
  es: {
40
- "errors.validation.missingFields": "La dirección de correo electrónico y el número de pedido son obligatorios",
41
36
  "activate": "Activar",
42
37
  "buy": "Comprar licencia",
43
38
  "upgrade": "Actualizar",
44
39
  "notification.success": "¡Plugin activado!"
45
40
  },
46
41
  it: {
47
- "errors.validation.missingFields": "Indirizzo email e numero d'ordine sono obbligatori",
48
42
  "activate": "Attiva",
49
43
  "buy": "Acquista licenza",
50
44
  "upgrade": "Aggiorna",
package/dist/license.js CHANGED
@@ -17,11 +17,13 @@ function useLicense(licenseOptions) {
17
17
  },
18
18
  email: {
19
19
  label: panel.t("kirby-tools.license.activate.email"),
20
- type: "email"
20
+ type: "email",
21
+ required: true
21
22
  },
22
23
  orderId: {
23
24
  label: panel.t("kirby-tools.license.activate.orderId"),
24
25
  type: "text",
26
+ required: true,
25
27
  help: panel.t("kirby-tools.license.activate.orderId.help")
26
28
  }
27
29
  },
@@ -68,10 +70,7 @@ function useLicense(licenseOptions) {
68
70
  async function activateLicense(event, licenseOptions) {
69
71
  const panel = usePanel();
70
72
  const { email, orderId } = event;
71
- if (!email || !orderId) {
72
- panel.notification.error(t("errors.validation.missingFields"));
73
- return false;
74
- }
73
+ if (!email || !orderId) return false;
75
74
  try {
76
75
  if ((await panel.api.post(`${licenseOptions.apiNamespace}/activate`, {
77
76
  email,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kirby-tools/licensing",
3
3
  "type": "module",
4
- "version": "0.6.9",
4
+ "version": "0.6.10",
5
5
  "packageManager": "pnpm@10.28.0",
6
6
  "description": "License system for Kirby Tools plugins within the Kirby Panel",
7
7
  "author": "Johann Schopplich <hello@johannschopplich.com>",