This commit is contained in:
Axolotle 2021-01-09 13:02:26 +01:00
parent 0a26c2cea5
commit 8273b52898
6 changed files with 22 additions and 21 deletions

View file

@ -7,7 +7,7 @@
"scripts": {
"serve": "vue-cli-service serve",
"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:en": "vue-cli-service i18n:report --src './src/**/*.?(js|vue)' --locales './src/i18n/locales/en.json'"
},

View file

@ -54,7 +54,7 @@ export async function handleError (response, method) {
store.dispatch('DISCONNECT')
} else if (error.code === 400) {
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
store.dispatch('SERVER_RESPONDED', true)
@ -62,7 +62,5 @@ export async function handleError (response, method) {
store.dispatch('DISPATCH_ERROR', error)
}
// error.print()
throw error
}

View file

@ -1,4 +1,4 @@
<template lang="html">
<template>
<div class="selectize-base">
<b-input-group>
<b-input-group-prepend is-text>

View file

@ -132,16 +132,16 @@
v-for="i in 15" :key="i"
no-body style="min-height: 10rem;"
>
<div class="d-flex w-100 mt-auto">
<b-skeleton width="30px" height="30px" class="mr-2 ml-auto" />
<b-skeleton :width="randint(30, 70) + '%'" height="30px" class="mr-auto" />
</div>
<b-skeleton
v-if="randint(0, 1)"
:width="randint(30, 85) + '%'" height="24px" class="mx-auto"
/>
<b-skeleton :width="randint(30, 85) + '%'" height="24px" class="mx-auto mb-auto" />
</b-card>
<div class="d-flex w-100 mt-auto">
<b-skeleton width="30px" height="30px" class="mr-2 ml-auto" />
<b-skeleton :width="randint(30, 70) + '%'" height="30px" class="mr-auto" />
</div>
<b-skeleton
v-if="randint(0, 1)"
:width="randint(30, 85) + '%'" height="24px" class="mx-auto"
/>
<b-skeleton :width="randint(30, 85) + '%'" height="24px" class="mx-auto mb-auto" />
</b-card>
</b-card-group>
</template>
</view-search>
@ -150,7 +150,6 @@
<script>
import { validationMixin } from 'vuelidate'
import api from '@/api'
import { required, githubLink } from '@/helpers/validators'
import { randint } from '@/helpers/commons'

View file

@ -52,10 +52,14 @@ export default {
methods: {
formatBackupList (data) {
const archives = Object.entries(data.archives)
this.archives = archives.length === 0 ? null : archives.map(([name, infos]) => {
infos.name = name
return infos
}).reverse()
if (archives.length) {
this.archives = archives.map(([name, infos]) => {
infos.name = name
return infos
}).reverse()
} else {
this.archives = null
}
}
},

View file

@ -161,7 +161,7 @@ export default {
report.errors = 0
report.ignoreds = 0
for (var item of report.items) {
for (const item of report.items) {
this.formatReportItem(report, item)
}
report.noIssues = report.warnings + report.errors === 0