mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
fix '\n' replace with replaceAll
This commit is contained in:
parent
6ae673d4e1
commit
6c1b5359cf
3 changed files with 3 additions and 3 deletions
|
@ -8,7 +8,7 @@ import i18n from '@/i18n'
|
||||||
|
|
||||||
class APIError extends Error {
|
class APIError extends Error {
|
||||||
constructor (request, { url, status, statusText }, { error }) {
|
constructor (request, { url, status, statusText }, { error }) {
|
||||||
super(error ? error.replace('\n', '<br>') : i18n.t('error_server_unexpected'))
|
super(error ? error.replaceAll('\n', '<br>') : i18n.t('error_server_unexpected'))
|
||||||
const urlObj = new URL(url)
|
const urlObj = new URL(url)
|
||||||
this.name = 'APIError'
|
this.name = 'APIError'
|
||||||
this.code = status
|
this.code = status
|
||||||
|
|
|
@ -199,7 +199,7 @@ export default {
|
||||||
'DISPATCH_MESSAGE' ({ state, commit, dispatch }, { request, messages }) {
|
'DISPATCH_MESSAGE' ({ state, commit, dispatch }, { request, messages }) {
|
||||||
for (const type in messages) {
|
for (const type in messages) {
|
||||||
const message = {
|
const message = {
|
||||||
text: messages[type].replace('\n', '<br>'),
|
text: messages[type].replaceAll('\n', '<br>'),
|
||||||
color: type === 'error' ? 'danger' : type
|
color: type === 'error' ? 'danger' : type
|
||||||
}
|
}
|
||||||
let progressBar = message.text.match(/^\[#*\+*\.*\] > /)
|
let progressBar = message.text.match(/^\[#*\+*\.*\] > /)
|
||||||
|
|
|
@ -104,7 +104,7 @@ export default {
|
||||||
this.done = done.length ? done.reverse() : null
|
this.done = done.length ? done.reverse() : null
|
||||||
pending.forEach(migration => {
|
pending.forEach(migration => {
|
||||||
if (migration.disclaimer) {
|
if (migration.disclaimer) {
|
||||||
migration.disclaimer = migration.disclaimer.replace('\n', '<br>')
|
migration.disclaimer = migration.disclaimer.replaceAll('\n', '<br>')
|
||||||
this.$set(this.checked, migration.id, null)
|
this.$set(this.checked, migration.id, null)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue