Update buefy dialog, notification, toast

This commit is contained in:
alkl58
2024-11-06 16:51:20 +01:00
committed by Milos Stojanovic
parent f757fcdec2
commit d9273d569a
8 changed files with 22 additions and 22 deletions

View File

@@ -48,7 +48,7 @@ new Vue({
this.$router.push('/').catch(() => {})
})
.catch(() => {
this.$notification.open({
this.$buefy.notification.open({
message: this.lang('Something went wrong'),
type: 'is-danger',
queue: false,
@@ -57,7 +57,7 @@ new Vue({
})
})
.catch(() => {
this.$notification.open({
this.$buefy.notification.open({
message: this.lang('Something went wrong'),
type: 'is-danger',
queue: false,

View File

@@ -118,14 +118,14 @@ const funcs = {
.then((user) => {
if (user.username !== store.state.user.username) {
this.$store.commit('destroyUser', user)
this.$toast.open({
this.$buefy.toast.open({
message: this.lang('Please log in'),
type: 'is-danger',
})
}
})
.catch(() => {
this.$toast.open({
this.$buefy.toast.open({
message: this.lang('Please log in'),
type: 'is-danger',
})
@@ -135,14 +135,14 @@ const funcs = {
this.checkUser()
if (typeof error == 'string') {
this.$toast.open({
this.$buefy.toast.open({
message: this.lang(error),
type: 'is-danger',
duration: 5000,
})
return
} else if (error && error.response && error.response.data && error.response.data.data) {
this.$toast.open({
this.$buefy.toast.open({
message: this.lang(error.response.data.data),
type: 'is-danger',
duration: 5000,
@@ -150,7 +150,7 @@ const funcs = {
return
}
this.$toast.open({
this.$buefy.toast.open({
message: this.lang('Unknown error'),
type: 'is-danger',
duration: 5000,

View File

@@ -392,7 +392,7 @@ export default {
})
.then(ret => {
this.isLoading = false
this.$dialog.alert({
this.$buefy.dialog.alert({
message: this.lang('Your file is ready'),
confirmText: this.lang('Download'),
onConfirm: () => {
@@ -439,7 +439,7 @@ export default {
return item.type == 'file' && item.name.split('.').pop() == 'zip'
},
unzip(event, item) {
this.$dialog.confirm({
this.$buefy.dialog.confirm({
message: this.lang('Are you sure you want to do this?'),
type: 'is-danger',
cancelText: this.lang('Cancel'),
@@ -463,7 +463,7 @@ export default {
})
},
zip(event, item) {
this.$dialog.prompt({
this.$buefy.dialog.prompt({
message: this.lang('Name'),
cancelText: this.lang('Cancel'),
confirmText: this.lang('Create'),
@@ -527,7 +527,7 @@ export default {
})
},
rename(event, item) {
this.$dialog.prompt({
this.$buefy.dialog.prompt({
message: this.lang('New name'),
cancelText: this.lang('Cancel'),
confirmText: this.lang('Rename'),
@@ -556,7 +556,7 @@ export default {
})
},
create(type) {
this.$dialog.prompt({
this.$buefy.dialog.prompt({
cancelText: this.lang('Cancel'),
confirmText: this.lang('Create'),
inputAttrs: {
@@ -585,7 +585,7 @@ export default {
})
},
remove(event, item) {
this.$dialog.confirm({
this.$buefy.dialog.confirm({
message: this.lang('Are you sure you want to do this?'),
type: 'is-danger',
cancelText: this.lang('Cancel'),

View File

@@ -81,7 +81,7 @@ export default {
},
methods: {
remove(user) {
this.$dialog.confirm({
this.$buefy.dialog.confirm({
message: this.lang('Are you sure you want to do this?'),
type: 'is-danger',
cancelText: this.lang('Cancel'),
@@ -92,7 +92,7 @@ export default {
})
.then(() => {
this.users = _.reject(this.users, u => u.username == user.username)
this.$toast.open({
this.$buefy.toast.open({
message: this.lang('Deleted'),
type: 'is-success',
})

View File

@@ -58,7 +58,7 @@ export default {
content: this.content,
})
.then(() => {
this.$toast.open({
this.$buefy.toast.open({
message: this.lang('Updated'),
type: 'is-success',
})

View File

@@ -47,7 +47,7 @@ export default {
newpassword: this.newpassword,
})
.then(() => {
this.$toast.open({
this.$buefy.toast.open({
message: this.lang('Updated'),
type: 'is-success',
})

View File

@@ -93,7 +93,7 @@ export default {
chunkSize: this.$store.state.config.upload_chunk_size,
maxFileSize: this.$store.state.config.upload_max_size,
maxFileSizeErrorCallback: (file) => {
this.$notification.open({
this.$buefy.notification.open({
message: this.lang('File size error', file.name, this.formatBytes(this.$store.state.config.upload_max_size)),
type: 'is-danger',
queue: false,
@@ -103,7 +103,7 @@ export default {
})
if (!this.resumable.support) {
this.$dialog.alert({
this.$buefy.dialog.alert({
type: 'is-danger',
message: this.lang('Browser not supported.'),
})
@@ -148,7 +148,7 @@ export default {
methods: {
closeWindow() {
if (this.activeUploads) {
this.$dialog.confirm({
this.$buefy.dialog.confirm({
message: this.lang('Are you sure you want to stop all uploads?'),
type: 'is-danger',
cancelText: this.lang('Cancel'),

View File

@@ -172,7 +172,7 @@ export default {
confirmSave() {
if (this.formFields.role == 'guest' && this.getPermissionsArray().length) {
this.$dialog.confirm({
this.$buefy.dialog.confirm({
message: this.lang('Are you sure you want to allow access to everyone?'),
type: 'is-danger',
cancelText: this.lang('Cancel'),
@@ -199,7 +199,7 @@ export default {
permissions: this.getPermissionsArray(),
})
.then(res => {
this.$toast.open({
this.$buefy.toast.open({
message: this.lang('Updated'),
type: 'is-success',
})