@kirby-tools/licensing 0.7.2 → 0.8.0
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/license.js +6 -6
- package/package.json +7 -7
package/dist/license.js
CHANGED
|
@@ -18,11 +18,11 @@ function useLicense(licenseOptions) {
|
|
|
18
18
|
type: "email",
|
|
19
19
|
required: true
|
|
20
20
|
},
|
|
21
|
-
|
|
22
|
-
label: panel.t("kirby-tools.license.activate.
|
|
21
|
+
licenseKey: {
|
|
22
|
+
label: panel.t("kirby-tools.license.activate.licenseKey"),
|
|
23
23
|
type: "text",
|
|
24
24
|
required: true,
|
|
25
|
-
help: panel.t("kirby-tools.license.activate.
|
|
25
|
+
help: panel.t("kirby-tools.license.activate.licenseKey.help")
|
|
26
26
|
}
|
|
27
27
|
},
|
|
28
28
|
submitButton: {
|
|
@@ -66,12 +66,12 @@ function useLicense(licenseOptions) {
|
|
|
66
66
|
}
|
|
67
67
|
async function activateLicense(event, licenseOptions) {
|
|
68
68
|
const panel = usePanel();
|
|
69
|
-
const { email,
|
|
70
|
-
if (!email || !
|
|
69
|
+
const { email, licenseKey } = event;
|
|
70
|
+
if (!email || !licenseKey) return false;
|
|
71
71
|
try {
|
|
72
72
|
if ((await panel.api.post(`${licenseOptions.apiNamespace}/activate`, {
|
|
73
73
|
email,
|
|
74
|
-
|
|
74
|
+
licenseKey
|
|
75
75
|
}))?.status !== "ok") throw new Error("Failed to activate license key");
|
|
76
76
|
return true;
|
|
77
77
|
} catch (error) {
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kirby-tools/licensing",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.
|
|
5
|
-
"packageManager": "pnpm@10.
|
|
4
|
+
"version": "0.8.0",
|
|
5
|
+
"packageManager": "pnpm@10.33.0",
|
|
6
6
|
"description": "License system for Kirby Tools plugins within the Kirby Panel",
|
|
7
7
|
"author": "Johann Schopplich <hello@johannschopplich.com>",
|
|
8
8
|
"license": "AGPL-3.0-or-later",
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
"vue": "^2.7.16"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
|
-
"@antfu/eslint-config": "^7.7.
|
|
47
|
-
"@types/node": "^25.
|
|
48
|
-
"bumpp": "^
|
|
49
|
-
"eslint": "^10.0
|
|
46
|
+
"@antfu/eslint-config": "^7.7.3",
|
|
47
|
+
"@types/node": "^25.5.0",
|
|
48
|
+
"bumpp": "^11.0.1",
|
|
49
|
+
"eslint": "^10.1.0",
|
|
50
50
|
"kirbyuse": "^1.3.0",
|
|
51
|
-
"tsdown": "^0.21.
|
|
51
|
+
"tsdown": "^0.21.7",
|
|
52
52
|
"typescript": "^5.9.3"
|
|
53
53
|
}
|
|
54
54
|
}
|