mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
linting
This commit is contained in:
parent
0a26c2cea5
commit
8273b52898
6 changed files with 22 additions and 21 deletions
|
@ -7,7 +7,7 @@
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"serve": "vue-cli-service serve",
|
"serve": "vue-cli-service serve",
|
||||||
"build": "vue-cli-service build",
|
"build": "vue-cli-service build",
|
||||||
"lint": "vue-cli-service lint",
|
"lint": "vue-cli-service lint --no-fix",
|
||||||
"i18n": "vue-cli-service i18n:report --src './src/**/*.?(js|vue)' --locales './src/i18n/locales/*.json'",
|
"i18n": "vue-cli-service i18n:report --src './src/**/*.?(js|vue)' --locales './src/i18n/locales/*.json'",
|
||||||
"i18n:en": "vue-cli-service i18n:report --src './src/**/*.?(js|vue)' --locales './src/i18n/locales/en.json'"
|
"i18n:en": "vue-cli-service i18n:report --src './src/**/*.?(js|vue)' --locales './src/i18n/locales/en.json'"
|
||||||
},
|
},
|
||||||
|
|
|
@ -54,7 +54,7 @@ export async function handleError (response, method) {
|
||||||
store.dispatch('DISCONNECT')
|
store.dispatch('DISCONNECT')
|
||||||
} else if (error.code === 400) {
|
} else if (error.code === 400) {
|
||||||
if (typeof message !== 'string' && 'log_ref' in message) {
|
if (typeof message !== 'string' && 'log_ref' in message) {
|
||||||
router.push({ name: 'tool-log', params: { name: message.log_ref } })
|
router.push({ name: 'tool-log', params: { name: message.log_ref } })
|
||||||
}
|
}
|
||||||
// Hide the waiting screen
|
// Hide the waiting screen
|
||||||
store.dispatch('SERVER_RESPONDED', true)
|
store.dispatch('SERVER_RESPONDED', true)
|
||||||
|
@ -62,7 +62,5 @@ export async function handleError (response, method) {
|
||||||
store.dispatch('DISPATCH_ERROR', error)
|
store.dispatch('DISPATCH_ERROR', error)
|
||||||
}
|
}
|
||||||
|
|
||||||
// error.print()
|
|
||||||
|
|
||||||
throw error
|
throw error
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<template lang="html">
|
<template>
|
||||||
<div class="selectize-base">
|
<div class="selectize-base">
|
||||||
<b-input-group>
|
<b-input-group>
|
||||||
<b-input-group-prepend is-text>
|
<b-input-group-prepend is-text>
|
||||||
|
|
|
@ -132,16 +132,16 @@
|
||||||
v-for="i in 15" :key="i"
|
v-for="i in 15" :key="i"
|
||||||
no-body style="min-height: 10rem;"
|
no-body style="min-height: 10rem;"
|
||||||
>
|
>
|
||||||
<div class="d-flex w-100 mt-auto">
|
<div class="d-flex w-100 mt-auto">
|
||||||
<b-skeleton width="30px" height="30px" class="mr-2 ml-auto" />
|
<b-skeleton width="30px" height="30px" class="mr-2 ml-auto" />
|
||||||
<b-skeleton :width="randint(30, 70) + '%'" height="30px" class="mr-auto" />
|
<b-skeleton :width="randint(30, 70) + '%'" height="30px" class="mr-auto" />
|
||||||
</div>
|
</div>
|
||||||
<b-skeleton
|
<b-skeleton
|
||||||
v-if="randint(0, 1)"
|
v-if="randint(0, 1)"
|
||||||
:width="randint(30, 85) + '%'" height="24px" class="mx-auto"
|
:width="randint(30, 85) + '%'" height="24px" class="mx-auto"
|
||||||
/>
|
/>
|
||||||
<b-skeleton :width="randint(30, 85) + '%'" height="24px" class="mx-auto mb-auto" />
|
<b-skeleton :width="randint(30, 85) + '%'" height="24px" class="mx-auto mb-auto" />
|
||||||
</b-card>
|
</b-card>
|
||||||
</b-card-group>
|
</b-card-group>
|
||||||
</template>
|
</template>
|
||||||
</view-search>
|
</view-search>
|
||||||
|
@ -150,7 +150,6 @@
|
||||||
<script>
|
<script>
|
||||||
import { validationMixin } from 'vuelidate'
|
import { validationMixin } from 'vuelidate'
|
||||||
|
|
||||||
import api from '@/api'
|
|
||||||
import { required, githubLink } from '@/helpers/validators'
|
import { required, githubLink } from '@/helpers/validators'
|
||||||
import { randint } from '@/helpers/commons'
|
import { randint } from '@/helpers/commons'
|
||||||
|
|
||||||
|
|
|
@ -52,10 +52,14 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
formatBackupList (data) {
|
formatBackupList (data) {
|
||||||
const archives = Object.entries(data.archives)
|
const archives = Object.entries(data.archives)
|
||||||
this.archives = archives.length === 0 ? null : archives.map(([name, infos]) => {
|
if (archives.length) {
|
||||||
infos.name = name
|
this.archives = archives.map(([name, infos]) => {
|
||||||
return infos
|
infos.name = name
|
||||||
}).reverse()
|
return infos
|
||||||
|
}).reverse()
|
||||||
|
} else {
|
||||||
|
this.archives = null
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
|
@ -161,7 +161,7 @@ export default {
|
||||||
report.errors = 0
|
report.errors = 0
|
||||||
report.ignoreds = 0
|
report.ignoreds = 0
|
||||||
|
|
||||||
for (var item of report.items) {
|
for (const item of report.items) {
|
||||||
this.formatReportItem(report, item)
|
this.formatReportItem(report, item)
|
||||||
}
|
}
|
||||||
report.noIssues = report.warnings + report.errors === 0
|
report.noIssues = report.warnings + report.errors === 0
|
||||||
|
|
Loading…
Add table
Reference in a new issue