valaxy 0.14.47 → 0.14.48
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/client/components/ValaxyDecrypt.vue +13 -1
- package/dist/{chunk-LQJO75J4.cjs → chunk-D7ZI53W7.cjs} +36 -33
- package/dist/{chunk-WIAHNHTY.mjs → chunk-HNEQ3I3P.mjs} +38 -35
- package/dist/{config-c7e66265.d.ts → config-95624823.d.ts} +37 -1
- package/dist/node/cli.cjs +1 -1
- package/dist/node/cli.mjs +1 -1
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +2 -1
- package/dist/node/index.d.ts +2 -1
- package/dist/node/index.mjs +1 -1
- package/dist/types/index.d.cts +2 -1
- package/dist/types/index.d.ts +2 -1
- package/package.json +5 -5
- package/types/config.ts +28 -0
- package/types/index.ts +3 -0
- package/types/node.ts +9 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
2
|
import { useDecrypt, useFrontmatter } from 'valaxy'
|
|
3
3
|
import type { Ref } from 'vue'
|
|
4
|
-
import { defineComponent, h, inject, ref } from 'vue'
|
|
4
|
+
import { defineComponent, h, inject, onMounted, ref } from 'vue'
|
|
5
5
|
|
|
6
6
|
const props = defineProps<{
|
|
7
7
|
encryptedContent: string
|
|
@@ -59,6 +59,12 @@ const ValaxyDeprecatedContent = defineComponent({
|
|
|
59
59
|
})
|
|
60
60
|
},
|
|
61
61
|
})
|
|
62
|
+
|
|
63
|
+
const hasWarning = ref(false)
|
|
64
|
+
onMounted(() => {
|
|
65
|
+
if (location.protocol !== 'https:')
|
|
66
|
+
hasWarning.value = true
|
|
67
|
+
})
|
|
62
68
|
</script>
|
|
63
69
|
|
|
64
70
|
<template>
|
|
@@ -84,6 +90,12 @@ const ValaxyDeprecatedContent = defineComponent({
|
|
|
84
90
|
text-gray hover:text-black
|
|
85
91
|
@click="decryptContent"
|
|
86
92
|
/>
|
|
93
|
+
|
|
94
|
+
<div v-if="hasWarning" class="-bottom-6" absolute text-xs op="50">
|
|
95
|
+
<a href="https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API" target="_blank">
|
|
96
|
+
<span>Web Crypto API</span>
|
|
97
|
+
</a> Only works in HTTPS
|
|
98
|
+
</div>
|
|
87
99
|
</div>
|
|
88
100
|
</div>
|
|
89
101
|
<div v-else>
|