Lint
This commit is contained in:
@@ -120,7 +120,7 @@ export default {
|
||||
return this.$store.state.postwoman.settings.THEME_ACE_EDITOR || DEFAULT_THEME
|
||||
},
|
||||
|
||||
provideLinting: debounce(function(code) {
|
||||
provideLinting: debounce(function (code) {
|
||||
if (this.lang === "json") {
|
||||
try {
|
||||
jsonParse(code)
|
||||
|
||||
@@ -194,14 +194,14 @@ export default {
|
||||
|
||||
return (
|
||||
this.source
|
||||
.filter(entry => {
|
||||
.filter((entry) => {
|
||||
return (
|
||||
entry.toLowerCase().startsWith(input.toLowerCase()) &&
|
||||
input.toLowerCase() !== entry.toLowerCase()
|
||||
)
|
||||
})
|
||||
// Cut off the part that's already been typed.
|
||||
.map(entry => entry.substring(this.selectionStart))
|
||||
.map((entry) => entry.substring(this.selectionStart))
|
||||
// We only want the top 6 suggestions.
|
||||
.slice(0, 6)
|
||||
)
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
padding: 16px;
|
||||
transition: all 0.2s ease;
|
||||
background-color: var(--bg-color);
|
||||
border-radius: 16px;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0px 16px 70px rgba(0, 0, 0, 0.5);
|
||||
max-height: calc(100vh - 128px);
|
||||
max-width: 720px;
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div class="tabs-wrapper">
|
||||
<div class="tabs">
|
||||
<ul>
|
||||
<li v-for="tab in tabs" :class="{ 'is-active': tab.isActive }">
|
||||
<li v-for="(tab, index) in tabs" :class="{ 'is-active': tab.isActive }" :key="index">
|
||||
<a :href="tab.href" @click="selectTab(tab)">
|
||||
<i v-if="tab.icon" class="material-icons">
|
||||
{{ tab.icon }}
|
||||
@@ -45,7 +45,7 @@
|
||||
justify-content: center;
|
||||
padding: 8px 16px;
|
||||
color: var(--fg-light-color);
|
||||
border-radius: 4px;
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
|
||||
.material-icons {
|
||||
@@ -87,7 +87,7 @@ export default {
|
||||
|
||||
methods: {
|
||||
selectTab({ id }) {
|
||||
this.tabs.forEach(tab => {
|
||||
this.tabs.forEach((tab) => {
|
||||
tab.isActive = tab.id == id
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user