Migrate interface module to store
This commit is contained in:
parent
872569ae8e
commit
b1dcea0199
33 changed files with 244 additions and 77 deletions
|
|
@ -20,6 +20,7 @@ import {
|
|||
faPlus,
|
||||
faCircleNotch
|
||||
} from '@fortawesome/free-solid-svg-icons'
|
||||
import { useInterfaceStore } from '../../../stores/interface'
|
||||
|
||||
library.add(
|
||||
faTimes,
|
||||
|
|
@ -166,7 +167,7 @@ const ProfileTab = {
|
|||
if (file.size > this.$store.state.instance[slot + 'limit']) {
|
||||
const filesize = fileSizeFormatService.fileSizeFormat(file.size)
|
||||
const allowedsize = fileSizeFormatService.fileSizeFormat(this.$store.state.instance[slot + 'limit'])
|
||||
this.$store.dispatch('pushGlobalNotice', {
|
||||
useInterfaceStore().pushGlobalNotice({
|
||||
messageKey: 'upload.error.message',
|
||||
messageArgs: [
|
||||
this.$t('upload.error.file_too_big', {
|
||||
|
|
@ -257,7 +258,7 @@ const ProfileTab = {
|
|||
.finally(() => { this.backgroundUploading = false })
|
||||
},
|
||||
displayUploadError (error) {
|
||||
this.$store.dispatch('pushGlobalNotice', {
|
||||
useInterfaceStore().pushGlobalNotice({
|
||||
messageKey: 'upload.error.message',
|
||||
messageArgs: [error.message],
|
||||
level: 'error'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue