@kirby-tools/licensing 0.6.2 → 0.6.3

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.
@@ -40,12 +40,7 @@ onMounted(() => {
40
40
  })
41
41
 
42
42
  async function handleRegistration() {
43
- const { isLicenseActive } = await openLicenseModal()
44
-
45
- if (isLicenseActive) {
46
- // Force a reload to refresh the plugin's cached context
47
- window.location.reload()
48
- }
43
+ await openLicenseModal()
49
44
  }
50
45
  </script>
51
46
 
@@ -32,12 +32,7 @@ const { openLicenseModal } = useLicense({
32
32
  const currentLicenseStatus = ref(props.licenseStatus)
33
33
 
34
34
  async function handleRegistration() {
35
- const { isLicenseActive } = await openLicenseModal()
36
-
37
- if (isLicenseActive) {
38
- // Force a reload to refresh the plugin's cached context
39
- window.location.reload()
40
- }
35
+ await openLicenseModal()
41
36
  }
42
37
  </script>
43
38
 
package/dist/license.js CHANGED
@@ -34,6 +34,8 @@ function useLicense(licenseOptions) {
34
34
  const isLicenseActive = await activateLicense(value, licenseOptions);
35
35
  if (!isLicenseActive) return false;
36
36
  panel.notification.success(t("activated"));
37
+ await new Promise((resolve) => setTimeout(resolve, 250));
38
+ window.location.reload();
37
39
  return { isLicenseActive };
38
40
  }
39
41
  }))?.isLicenseActive ?? false };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kirby-tools/licensing",
3
3
  "type": "module",
4
- "version": "0.6.2",
4
+ "version": "0.6.3",
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>",