@kirby-tools/licensing 0.1.6 → 0.1.8
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.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +4 -2
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -56,6 +56,7 @@ function useLicense({
|
|
|
56
56
|
return true;
|
|
57
57
|
};
|
|
58
58
|
const openLicenseModal = () => {
|
|
59
|
+
let isRegistered = false;
|
|
59
60
|
return new Promise((resolve) => {
|
|
60
61
|
panel.dialog.open({
|
|
61
62
|
component: "k-form-dialog",
|
|
@@ -82,8 +83,9 @@ function useLicense({
|
|
|
82
83
|
}
|
|
83
84
|
},
|
|
84
85
|
on: {
|
|
86
|
+
// Close event will always be triggered, even on submit
|
|
85
87
|
close: () => {
|
|
86
|
-
resolve({});
|
|
88
|
+
resolve({ isRegistered });
|
|
87
89
|
},
|
|
88
90
|
submit: async (event) => {
|
|
89
91
|
const { email, orderId } = event;
|
|
@@ -97,9 +99,9 @@ function useLicense({
|
|
|
97
99
|
panel.notification.error(error.message);
|
|
98
100
|
return;
|
|
99
101
|
}
|
|
102
|
+
isRegistered = true;
|
|
100
103
|
panel.dialog.close();
|
|
101
104
|
panel.notification.success(t("activated"), { label });
|
|
102
|
-
resolve({ isRegistered: true });
|
|
103
105
|
}
|
|
104
106
|
}
|
|
105
107
|
});
|
package/package.json
CHANGED