@edgedev/create-edge-site 1.0.8 → 1.0.10

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.
@@ -1,4 +1,6 @@
1
1
  <script>
2
+ import { useField } from 'vee-validate'
3
+
2
4
  export default {
3
5
  inheritAttrs: false,
4
6
  }
@@ -20,6 +22,9 @@ const props = defineProps({
20
22
  default: 'text',
21
23
  },
22
24
  })
25
+
26
+ const model = ref('')
27
+ const { handleChange } = useField(props.name)
23
28
  </script>
24
29
 
25
30
  defineOptions({ inheritAttrs: false })
@@ -32,6 +37,12 @@ defineOptions({ inheritAttrs: false })
32
37
  mask="(000) 000-0000"
33
38
  v-bind="{ ...field, ...$attrs }"
34
39
  />
40
+ <input
41
+ v-else-if="props.type === 'file'"
42
+ type="file"
43
+ v-bind="{ ...field, ...$attrs }"
44
+ @change="handleChange($event)"
45
+ />
35
46
  <input
36
47
  v-else
37
48
  v-bind="{ ...field, ...$attrs }"
@@ -59,7 +59,19 @@ const onSubmit = async (values, { resetForm }) => {
59
59
  const formData = new FormData()
60
60
 
61
61
  for (const key in values) {
62
- formData.append(key, values[key])
62
+ const value = values[key]
63
+
64
+ if (value instanceof File) {
65
+ formData.append(key, value)
66
+ }
67
+ else if (Array.isArray(value) && value.every(v => v instanceof File)) {
68
+ value.forEach((file, i) => {
69
+ formData.append(`${key}[${i}]`, file)
70
+ })
71
+ }
72
+ else {
73
+ formData.append(key, value)
74
+ }
63
75
  }
64
76
 
65
77
  if (state.turnstileToken) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@edgedev/create-edge-site",
3
- "version": "1.0.8",
3
+ "version": "1.0.10",
4
4
  "description": "Create Edge Starter Site",
5
5
  "bin": {
6
6
  "create-edge-site": "./bin/cli.js"
@@ -0,0 +1,33 @@
1
+ <script setup>
2
+ onMounted(() => {
3
+ console.log('Hello world.')
4
+ })
5
+ </script>
6
+
7
+ <template>
8
+ <Head>
9
+ <Title>Edge Website - An awesome Edge website</Title>
10
+ <Meta name="description" content="This is an Edge website template" />
11
+ <Link rel="canonical" href="https://edgemarketingdesign.com/" />
12
+ </Head>
13
+
14
+ <titleSection
15
+ page="404"
16
+ headline="404 - Page Not Found"
17
+ />
18
+ <div class="min-h-[calc(100vh_-_586px)] w-full items-center justify-center flex flex-col">
19
+ <h1 class="text-6xl font-bold mb-4">
20
+ 404
21
+ </h1>
22
+ <p class="text-xl mb-2">
23
+ Page Not Found
24
+ </p>
25
+ <p class="text-md text-gray-400 mb-6">
26
+ Looks like this page took an early return and never came back.<br />
27
+ Maybe it hit a <code class="bg-gray-800 px-1 py-0.5 rounded">null pointer</code>... or just rage-quit the DOM.
28
+ </p>
29
+ <a href="/" class="px-6 py-2 mt-2 transition-colors bg-lblue text-dblue hover:bg-opacity-80">
30
+ Go Home & Debug Later
31
+ </a>
32
+ </div>
33
+ </template>