Performance fixes
This commit is contained in:
parent
ad41d90a45
commit
07abe66af1
|
@ -44,6 +44,7 @@ export const install: InitModule = ({ store, router }) => {
|
||||||
content: error.response?.data,
|
content: error.response?.data,
|
||||||
class: 'error'
|
class: 'error'
|
||||||
})
|
})
|
||||||
|
break
|
||||||
|
|
||||||
case 403:
|
case 403:
|
||||||
error.backendErrors.push('Permission denied')
|
error.backendErrors.push('Permission denied')
|
||||||
|
|
|
@ -31,17 +31,8 @@ export function parseAPIErrors (responseData: APIErrorResponse, parentField?: st
|
||||||
return errors
|
return errors
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getCookie (name: string) {
|
|
||||||
return document.cookie
|
|
||||||
.split('; ')
|
|
||||||
.find(row => row.startsWith(name))
|
|
||||||
?.split('=')[1]
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getDomain (url: string) {
|
export function getDomain (url: string) {
|
||||||
const parser = document.createElement('a')
|
return new URL(url).hostname
|
||||||
parser.href = url
|
|
||||||
return parser.hostname
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function arrayMove (arr: unknown[], oldIndex: number, newIndex: number) {
|
export function arrayMove (arr: unknown[], oldIndex: number, newIndex: number) {
|
||||||
|
|
Loading…
Reference in New Issue