@kirby-tools/licensing 0.6.8 → 0.6.9
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/index.d.ts +2 -2
- package/dist/license.d.ts +1 -4
- package/dist/license.js +6 -7
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { License, LicenseKey, LicenseStatus } from "./types.js";
|
|
2
|
-
import {
|
|
2
|
+
import { LicenseOptions, useLicense } from "./license.js";
|
|
3
3
|
import { isLocalHost } from "./utils.js";
|
|
4
|
-
export { type License, type LicenseKey,
|
|
4
|
+
export { type License, type LicenseKey, LicenseOptions, type LicenseStatus, isLocalHost, useLicense };
|
package/dist/license.d.ts
CHANGED
|
@@ -6,9 +6,6 @@ interface LicenseOptions {
|
|
|
6
6
|
label: string;
|
|
7
7
|
apiNamespace: string;
|
|
8
8
|
}
|
|
9
|
-
interface LicenseModalResult {
|
|
10
|
-
isLicenseActive: boolean;
|
|
11
|
-
}
|
|
12
9
|
declare function useLicense(licenseOptions: LicenseOptions): {
|
|
13
10
|
isLocalhost: boolean;
|
|
14
11
|
assertActivationIntegrity: ({
|
|
@@ -21,4 +18,4 @@ declare function useLicense(licenseOptions: LicenseOptions): {
|
|
|
21
18
|
openLicenseModal: () => Promise<void>;
|
|
22
19
|
};
|
|
23
20
|
//#endregion
|
|
24
|
-
export {
|
|
21
|
+
export { LicenseOptions, useLicense };
|
package/dist/license.js
CHANGED
|
@@ -8,21 +8,15 @@ function useLicense(licenseOptions) {
|
|
|
8
8
|
const { openFieldsDialog } = useDialog();
|
|
9
9
|
const isLocalhost = isLocalHost();
|
|
10
10
|
const openLicenseModal = async () => {
|
|
11
|
-
const { label } = licenseOptions;
|
|
12
11
|
let isSubmitting = false;
|
|
13
12
|
await openFieldsDialog({
|
|
14
|
-
submitButton: {
|
|
15
|
-
icon: "check",
|
|
16
|
-
theme: "love",
|
|
17
|
-
text: t("activate", { label })
|
|
18
|
-
},
|
|
19
13
|
fields: {
|
|
20
14
|
info: {
|
|
21
15
|
type: "info",
|
|
22
16
|
text: panel.t("kirby-tools.license.activate.info")
|
|
23
17
|
},
|
|
24
18
|
email: {
|
|
25
|
-
label: panel.t("email"),
|
|
19
|
+
label: panel.t("kirby-tools.license.activate.email"),
|
|
26
20
|
type: "email"
|
|
27
21
|
},
|
|
28
22
|
orderId: {
|
|
@@ -31,6 +25,11 @@ function useLicense(licenseOptions) {
|
|
|
31
25
|
help: panel.t("kirby-tools.license.activate.orderId.help")
|
|
32
26
|
}
|
|
33
27
|
},
|
|
28
|
+
submitButton: {
|
|
29
|
+
icon: "check",
|
|
30
|
+
theme: "love",
|
|
31
|
+
text: panel.t("kirby-tools.license.activate.submit")
|
|
32
|
+
},
|
|
34
33
|
onSubmit: async (value) => {
|
|
35
34
|
if (isSubmitting) return false;
|
|
36
35
|
isSubmitting = true;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kirby-tools/licensing",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.6.
|
|
4
|
+
"version": "0.6.9",
|
|
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>",
|