perf: template literals

This commit is contained in:
liyasthomas
2021-09-18 16:09:58 +05:30
parent 4236d1179c
commit e1e763575d
64 changed files with 425 additions and 333 deletions

View File

@@ -15,7 +15,7 @@
type="search"
autocomplete="off"
class="bg-transparent flex w-full p-4 py-2"
:placeholder="$t('action.search')"
:placeholder="`${$t('action.search')}`"
/>
<div class="flex">
<ButtonSecondary
@@ -76,7 +76,7 @@
</div>
<SmartConfirmModal
:show="confirmRemove"
:title="$t('confirm.remove_history')"
:title="`${$t('confirm.remove_history')}`"
@hide-modal="confirmRemove = false"
@resolve="clearHistory"
/>
@@ -131,7 +131,7 @@ export default defineComponent({
return Object.keys(entry).some((key) => {
let value = entry[key as keyof typeof entry]
if (value) {
value = typeof value !== "string" ? value.toString() : value
value = `${value}`
return value.toLowerCase().includes(filterText)
}
return false
@@ -144,7 +144,7 @@ export default defineComponent({
clearHistory() {
if (this.page === "rest") clearRESTHistory()
else clearGraphqlHistory()
this.$toast.success(this.$t("state.history_deleted").toString(), {
this.$toast.success(`${this.$t("state.history_deleted")}`, {
icon: "delete",
})
},
@@ -154,7 +154,7 @@ export default defineComponent({
deleteHistory(entry: any) {
if (this.page === "rest") deleteRESTHistoryEntry(entry)
else deleteGraphqlHistoryEntry(entry)
this.$toast.success(this.$t("state.deleted").toString(), {
this.$toast.success(`${this.$t("state.deleted")}`, {
icon: "delete",
})
},