Introduce component wrapper for svg icons

This commit is contained in:
Liyas Thomas
2020-08-17 16:07:36 +05:30
parent 54e06d26bc
commit 3924370b3e
39 changed files with 284 additions and 52 deletions

View File

@@ -7,7 +7,7 @@
<h3 class="title">{{ $t("new_environment") }}</h3>
<div>
<button class="icon" @click="hideModal">
<i class="material-icons">close</i>
<closeIcon class="material-icons" />
</button>
</div>
</div>
@@ -44,8 +44,12 @@
<script>
import { fb } from "~/helpers/fb"
import closeIcon from "~/static/icons/close-24px.svg?inline"
export default {
components: {
closeIcon,
},
props: {
show: Boolean,
},

View File

@@ -7,7 +7,7 @@
<h3 class="title">{{ $t("edit_environment") }}</h3>
<div>
<button class="icon" @click="hideModal">
<i class="material-icons">close</i>
<closeIcon class="material-icons" />
</button>
</div>
</div>
@@ -75,7 +75,7 @@
v-tooltip.bottom="$t('delete')"
id="variable"
>
<i class="material-icons">delete</i>
<deleteIcon class="material-icons" />
</button>
</li>
</div>
@@ -107,8 +107,14 @@
<script>
import { fb } from "~/helpers/fb"
import closeIcon from "~/static/icons/close-24px.svg?inline"
import deleteIcon from "~/static/icons/delete-24px.svg?inline"
export default {
components: {
closeIcon,
deleteIcon,
},
props: {
show: Boolean,
editingEnvironment: Object,

View File

@@ -23,7 +23,7 @@
</div>
<div>
<button class="icon" @click="removeEnvironment" v-close-popover>
<i class="material-icons">delete</i>
<deleteIcon class="material-icons" />
<span>{{ $t("delete") }}</span>
</button>
</div>
@@ -47,8 +47,10 @@ ul li {
<script>
import { fb } from "~/helpers/fb"
import deleteIcon from "~/static/icons/delete-24px.svg?inline"
export default {
components: { deleteIcon },
props: {
environment: Object,
environmentIndex: Number,
@@ -64,7 +66,7 @@ export default {
removeEnvironment() {
if (!confirm(this.$t("are_you_sure_remove_environment"))) return
this.$store.commit("postwoman/removeEnvironment", this.environmentIndex)
this.$toast.error(this.$t("deleted"), {
this.$toast.error(this.$t("deleted"), {
icon: "delete",
})
this.syncEnvironments()

View File

@@ -7,7 +7,7 @@
<h3 class="title">{{ $t("import_export") }} {{ $t("environments") }}</h3>
<div>
<button class="icon" @click="hideModal">
<i class="material-icons">close</i>
<closeIcon class="material-icons" />
</button>
</div>
</div>
@@ -77,8 +77,12 @@
<script>
import { fb } from "~/helpers/fb"
import closeIcon from "~/static/icons/close-24px.svg?inline"
export default {
components: {
closeIcon,
},
data() {
return {
fb,