Skip to content

Commit 48d76a6

Browse files
fix: correct all warnings in devtools
1 parent 78093d3 commit 48d76a6

20 files changed

+85
-49
lines changed

.env

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ VUE_APP_TITLE="Dev - Ionic Vue Boilerplate"
22
VUE_APP_PORT="8080"
33
VUE_APP_API_URL="http://localhost:8000"
44
VUE_APP_CURRENT_SITE_ADDRESS="http://localhost:${VUE_APP_PORT}"
5-
VUE_APP_IMAGES_ADDRESS="https://qa.api.boilerplate.com/medias"
5+
VUE_APP_IMAGES_ADDRESS="http://localhost:8080"
66
VUE_APP_WHATS_TELEPHONE="+559999999999"
77
VUE_APP_CONTACT_EMAIL="[email protected]"

public/assets/icon/logo.png

36.3 KB
Loading

src/components/Divider.vue

+1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import {
1212
} from '@ionic/vue';
1313
1414
export default {
15+
name: 'Divider',
1516
components: {
1617
IonCol,
1718
IonItem,

src/components/ErrorMessage.vue

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import { IonText } from '@ionic/vue';
99
1010
export default {
11+
name: 'ErrorMessage',
1112
components: {
1213
IonText,
1314
},

src/components/Image.vue

+7-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
<template>
22
<ion-img
33
:src="
4-
!imageFailsToLoad && !!src
5-
? `${getImagesAddress}${src}`
6-
: defaultImage
4+
!imageFailsToLoad && !!src ? `${getImagesAddress}/${src}` : defaultImage
75
"
86
@ionError="imageFailsToLoad = true"
97
/>
108
</template>
119

1210
<script>
11+
import { IonImg } from '@ionic/vue';
12+
1313
import { ref } from '@vue/reactivity';
1414
import { mapGetters } from 'vuex';
1515
@@ -19,7 +19,7 @@ export default {
1919
/** The image path or url */
2020
src: {
2121
type: String,
22-
required: true,
22+
required: false,
2323
},
2424
},
2525
computed: {
@@ -33,5 +33,8 @@ export default {
3333
defaultImage: 'assets/vectors/blank.svg',
3434
};
3535
},
36+
components: {
37+
IonImg,
38+
},
3639
};
3740
</script>

src/components/Menu.vue

+2-4
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,10 @@
3333
class="fs-16"
3434
></ion-icon>
3535
</ion-item>
36-
<span v-else-if="menuItem.type === 2 && (i !== appPages.length - 1)">
36+
<span v-else-if="menuItem.type === 2 && (index !== appPages.length - 1)">
3737
<hr />
3838
</span>
39-
<span v-else-if="menuItem.type === 'category' && (i !== appPages.length - 1)">
39+
<span v-else-if="menuItem.type === 'category' && (index !== appPages.length - 1)">
4040
<ion-item>
4141
<h1 class="">
4242
<b>{{ menuItem.title }}</b>
@@ -73,7 +73,6 @@ import {
7373
IonHeader,
7474
IonToolbar,
7575
IonTitle,
76-
IonImg,
7776
} from '@ionic/vue';
7877
7978
import { ref } from 'vue';
@@ -88,7 +87,6 @@ export default {
8887
components: {
8988
IonContent,
9089
IonIcon,
91-
IonImg,
9290
IonItem,
9391
IonLabel,
9492
IonList,

src/components/NoContent.vue

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import { IonImg, IonText } from '@ionic/vue';
1111
1212
export default {
13+
name: 'NoContent',
1314
components: {
1415
IonImg, IonText,
1516
},

src/components/base/BaseLayout.vue

+2
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ import {
4242
IonBackButton,
4343
IonButtons,
4444
IonMenuButton,
45+
IonText,
4546
} from '@ionic/vue';
4647
import { useRouter } from 'vue-router';
4748
@@ -70,6 +71,7 @@ export default {
7071
},
7172
},
7273
components: {
74+
IonText,
7375
IonPage,
7476
IonHeader,
7577
IonToolbar,

src/components/inputs/File.vue

+27-22
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,23 @@
11
<template>
2-
<Button
3-
:size="size"
4-
:text="iconOnly ? '' : label"
5-
:icon="icon"
6-
:iconOnly="iconOnly"
7-
:isLoading="loading"
8-
@click="openCamera ? getFilesByCamera() : getFiles()"
9-
/>
10-
<ion-input
11-
hidden
12-
class="d-none"
13-
type="file"
14-
ref="fileInput"
15-
:multiple="multiple"
16-
:accept="`${accept};capture=camera`"
17-
@change="filesChange"
18-
/>
2+
<div>
3+
<Button
4+
:size="size"
5+
:text="iconOnly ? '' : label"
6+
:icon="icon"
7+
:iconOnly="iconOnly"
8+
:isLoading="loading"
9+
@click="openCamera ? getFilesByCamera() : getFiles()"
10+
/>
11+
<ion-input
12+
hidden
13+
class="d-none"
14+
type="file"
15+
ref="fileInput"
16+
:multiple="multiple"
17+
:accept="`${accept};capture=camera`"
18+
@change="filesChange"
19+
/>
20+
</div>
1921
</template>
2022

2123
<script>
@@ -75,7 +77,8 @@ export default {
7577
},
7678
methods: {
7779
getFiles() {
78-
const fileInput = this.$refs.fileInput.$el.getElementsByTagName('input')[0];
80+
const fileInput =
81+
this.$refs.fileInput.$el.getElementsByTagName('input')[0];
7982
fileInput.click();
8083
},
8184
async getFilesByCamera() {
@@ -89,13 +92,15 @@ export default {
8992
},
9093
dataUriToBlob(dataURI) {
9194
const splitDataURI = dataURI.split(',');
92-
const byteString = splitDataURI[0].indexOf('base64') >= 0
93-
? atob(splitDataURI[1])
94-
: decodeURI(splitDataURI[1]);
95+
const byteString =
96+
splitDataURI[0].indexOf('base64') >= 0
97+
? atob(splitDataURI[1])
98+
: decodeURI(splitDataURI[1]);
9599
const mimeString = splitDataURI[0].split(':')[1].split(';')[0];
96100
97101
const ia = new Uint8Array(byteString.length);
98-
for (let i = 0; i < byteString.length; i++) ia[i] = byteString.charCodeAt(i);
102+
for (let i = 0; i < byteString.length; i++)
103+
ia[i] = byteString.charCodeAt(i);
99104
100105
return new Blob([ia], { type: mimeString });
101106
},

src/components/inputs/SelectExample.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
v-model="Fields.value"
1111
@ionChange="
1212
() => {
13-
$emit('update:value', Fields.value);
13+
$emit('update:modelValue', Fields.value);
1414
Errors.value = null;
1515
}
1616
"
@@ -49,7 +49,7 @@ import Button from '../Button.vue';
4949
5050
export default {
5151
name: 'SelectExample',
52-
emits: ['update:value'],
52+
emits: ['update:modelValue'],
5353
components: {
5454
IonLabel,
5555
IonSelect,
@@ -66,7 +66,7 @@ export default {
6666
type: String,
6767
default: 'Cancel',
6868
},
69-
value: {
69+
modelValue: {
7070
required: true,
7171
},
7272
disabled: {
@@ -139,7 +139,7 @@ export default {
139139
},
140140
cleanSelect() {
141141
this.Fields.value = null;
142-
this.$emit('update:value', this.Fields.value);
142+
this.$emit('update:modelValue', this.Fields.value);
143143
this.Errors.value = null;
144144
},
145145
},

src/components/whatsapp/SendMessage.vue

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { mapGetters } from 'vuex';
2020
import Button from '../Button.vue';
2121
2222
export default {
23+
name: 'SendMessage',
2324
components: {
2425
Button,
2526
},

src/pages/Contact.vue

+12-6
Original file line numberDiff line numberDiff line change
@@ -70,26 +70,32 @@
7070
</template>
7171

7272
<script>
73-
import { IonIcon } from "@ionic/vue";
73+
import {
74+
IonIcon, IonText, IonCol, IonRow,
75+
} from '@ionic/vue';
7476
import {
7577
call,
7678
mail,
7779
logoFacebook,
7880
logoInstagram,
7981
logoYoutube,
80-
} from "ionicons/icons";
81-
import { ref } from "vue";
82-
import { mapGetters } from "vuex";
82+
} from 'ionicons/icons';
83+
import { ref } from 'vue';
84+
import { mapGetters } from 'vuex';
8385
84-
import WhatsappButton from "../components/whatsapp/SendMessage.vue";
86+
import WhatsappButton from '../components/whatsapp/SendMessage.vue';
8587
8688
export default {
89+
name: 'Contact',
8790
components: {
91+
IonText,
92+
IonCol,
93+
IonRow,
8894
WhatsappButton,
8995
IonIcon,
9096
},
9197
computed: {
92-
...mapGetters("general", ["getWhatsappTelephone", "getContactEmail"]),
98+
...mapGetters('general', ['getWhatsappTelephone', 'getContactEmail']),
9399
},
94100
setup() {
95101
const Icon = ref({

src/pages/Error404.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
<script>
2020
import {
21-
IonImg, IonText,
21+
IonImg, IonText, IonItem,
2222
} from '@ionic/vue';
2323
2424
import BaseLayout from '../components/base/BaseLayout.vue';
@@ -29,6 +29,7 @@ export default {
2929
BaseLayout,
3030
IonImg,
3131
IonText,
32+
IonItem,
3233
},
3334
setup() {
3435
return {

src/pages/Login.vue

+5-3
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
:ignore-history="true"
66
>
77
<ion-row>
8-
<!-- <ion-col size="12">
9-
<ion-img
8+
<ion-col size="12">
9+
<Image
1010
class="mx-auto w-75 mb-4"
1111
src="assets/icon/logo.png"
1212
/>
13-
</ion-col> -->
13+
</ion-col>
1414
<ion-col size="12">
1515
<ion-item class="d-flex align-items-end">
1616
<ion-icon slot="start" class="mr-2" :icon="Icon.mail"></ion-icon>
@@ -90,6 +90,7 @@ import { useRouter } from 'vue-router';
9090
import { ref } from 'vue';
9191
9292
import Button from '../components/Button.vue';
93+
import Image from '../components/Image.vue';
9394
import useToast from '../composition/useToast';
9495
import login from '../composition/login';
9596
@@ -104,6 +105,7 @@ export default {
104105
IonLabel,
105106
IonIcon,
106107
IonText,
108+
Image,
107109
},
108110
setup() {
109111
const { openToast } = useToast();

src/pages/NotAuthorized.vue

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,12 @@
2020
</template>
2121

2222
<script>
23-
import { IonImg, IonText } from '@ionic/vue';
23+
import { IonImg, IonText, IonItem } from '@ionic/vue';
2424
2525
export default {
2626
name: 'NotAuthorized',
2727
components: {
28+
IonItem,
2829
IonImg,
2930
IonText,
3031
},

src/pages/RecoverPassword.vue

+1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ import Button from '../components/Button.vue';
4444
import NoContent from '../components/NoContent.vue';
4545
4646
export default {
47+
name: 'RecoverPassword',
4748
components: {
4849
Button,
4950
NoContent,

src/pages/admin/Dashboard.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
<script>
88
export default {
9-
name: 'ClientHome',
9+
name: 'AdminDashboard',
1010
components: {
1111
},
1212
};

src/pages/home/Index.vue

+13-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
<Divider>Inputs</Divider>
3434
<File class="mb-2" />
3535
<File open-camera label="Open camera and gallery" class="mb-2" />
36-
<SelectExample multiple />
36+
<SelectExample multiple v-model="fields.selectExample" />
3737
</ion-col>
3838
<ion-col size="12">
3939
<Divider>Composables</Divider>
@@ -54,6 +54,10 @@
5454
</template>
5555
5656
<script>
57+
import {
58+
IonGrid, IonRow, IonCol, IonText,
59+
} from '@ionic/vue';
60+
5761
import Buttons from './examples/Buttons.vue';
5862
import Whatsapp from './examples/Whatsapp.vue';
5963
@@ -66,10 +70,15 @@ import File from '../../components/inputs/File.vue';
6670
import SelectExample from '../../components/inputs/SelectExample.vue';
6771
import Button from '../../components/Button.vue';
6872
import useToast from '../../composition/useToast';
73+
import { ref } from '@vue/runtime-core';
6974
7075
export default {
7176
name: 'Home',
7277
components: {
78+
IonGrid,
79+
IonRow,
80+
IonCol,
81+
IonText,
7382
Buttons,
7483
Divider,
7584
ErrorMessage,
@@ -84,8 +93,11 @@ export default {
8493
setup() {
8594
const { openToast } = useToast();
8695
96+
const fields = ref({ selectExample: '' });
97+
8798
return {
8899
openToast,
100+
fields,
89101
};
90102
},
91103
};

0 commit comments

Comments
 (0)