Introduce component wrapper for svg icons
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
:aria-label="$t('delete')"
|
||||
v-close-popover
|
||||
>
|
||||
<i class="material-icons">delete</i>
|
||||
<deleteIcon class="material-icons" />
|
||||
<span>{{ $t("delete") }}</span>
|
||||
</button>
|
||||
</div>
|
||||
@@ -238,7 +238,7 @@
|
||||
@click="disableHistoryClearing"
|
||||
v-tooltip="$t('no')"
|
||||
>
|
||||
<i class="material-icons">close</i>
|
||||
<closeIcon class="material-icons" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -308,11 +308,17 @@ ol {
|
||||
<script>
|
||||
import { findStatusGroup } from "~/pages/index"
|
||||
import { fb } from "~/helpers/fb"
|
||||
import closeIcon from "~/static/icons/close-24px.svg?inline"
|
||||
import deleteIcon from "~/static/icons/delete-24px.svg?inline"
|
||||
|
||||
const updateOnLocalStorage = (propertyName, property) =>
|
||||
window.localStorage.setItem(propertyName, JSON.stringify(property))
|
||||
|
||||
export default {
|
||||
components: {
|
||||
closeIcon,
|
||||
deleteIcon,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
history:
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
<h3 class="title">{{ $t("extensions") }}</h3>
|
||||
<div>
|
||||
<button class="icon" @click="showExtensions = false">
|
||||
<i class="material-icons">close</i>
|
||||
<closeIcon class="material-icons" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -182,7 +182,7 @@
|
||||
<h3 class="title">{{ $t("shortcuts") }}</h3>
|
||||
<div>
|
||||
<button class="icon" @click="showShortcuts = false">
|
||||
<i class="material-icons">close</i>
|
||||
<closeIcon class="material-icons" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -217,7 +217,7 @@
|
||||
<h3 class="title">{{ $t("support_us") }}</h3>
|
||||
<div>
|
||||
<button class="icon" @click="showSupport = false">
|
||||
<i class="material-icons">close</i>
|
||||
<closeIcon class="material-icons" />
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -269,8 +269,12 @@ import {
|
||||
import { getPlatformSpecialKey } from "~/helpers/platformutils"
|
||||
import firebase from "firebase/app"
|
||||
import { fb } from "~/helpers/fb"
|
||||
import closeIcon from "~/static/icons/close-24px.svg?inline"
|
||||
|
||||
export default {
|
||||
components: {
|
||||
closeIcon,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
// Once the PWA code is initialized, this holds a method
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#request" v-tooltip.right="$t('request')">
|
||||
<i class="material-icons">cloud_upload</i>
|
||||
<cloudUploadIcon class="material-icons" />
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
@@ -85,7 +85,7 @@
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#request" v-tooltip.right="$t('request')">
|
||||
<i class="material-icons">cloud_upload</i>
|
||||
<cloudUploadIcon class="material-icons" />
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
@@ -111,7 +111,7 @@
|
||||
</li>
|
||||
<li>
|
||||
<a href="#query" v-tooltip.right="$t('query')">
|
||||
<i class="material-icons">cloud_upload</i>
|
||||
<cloudUploadIcon class="material-icons" />
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
@@ -127,7 +127,7 @@
|
||||
<ul>
|
||||
<li>
|
||||
<a href="#import" v-tooltip.right="$t('import')">
|
||||
<i class="material-icons">folder</i>
|
||||
<folderIcon class="material-icons" />
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
@@ -306,7 +306,14 @@ nav.secondary-nav {
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import cloudUploadIcon from "~/static/icons/cloud_upload-24px.svg?inline"
|
||||
import folderIcon from "~/static/icons/folder-24px.svg?inline"
|
||||
|
||||
export default {
|
||||
components: {
|
||||
cloudUploadIcon,
|
||||
folderIcon,
|
||||
},
|
||||
methods: {
|
||||
linkActive(path) {
|
||||
return {
|
||||
@@ -315,14 +322,12 @@ export default {
|
||||
}
|
||||
},
|
||||
},
|
||||
|
||||
mounted() {
|
||||
window.addEventListener("scroll", (event) => {
|
||||
let mainNavLinks = document.querySelectorAll("nav ul li a")
|
||||
let fromTop = window.scrollY
|
||||
mainNavLinks.forEach(({ hash, classList }) => {
|
||||
let section = document.querySelector(hash)
|
||||
|
||||
if (
|
||||
section &&
|
||||
section.offsetTop <= fromTop &&
|
||||
@@ -335,11 +340,10 @@ export default {
|
||||
})
|
||||
})
|
||||
},
|
||||
|
||||
watch: {
|
||||
$route() {
|
||||
// this.$toast.clear();
|
||||
},
|
||||
},
|
||||
// watch: {
|
||||
// $route() {
|
||||
// // this.$toast.clear();
|
||||
// },
|
||||
// },
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user