diff --git a/frontend/main.js b/frontend/main.js index 7fb51d9..1fddfc5 100644 --- a/frontend/main.js +++ b/frontend/main.js @@ -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, diff --git a/frontend/mixins/shared.js b/frontend/mixins/shared.js index 1147e72..957a6c1 100644 --- a/frontend/mixins/shared.js +++ b/frontend/mixins/shared.js @@ -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, diff --git a/frontend/views/Browser.vue b/frontend/views/Browser.vue index be29bc9..f3f98f9 100644 --- a/frontend/views/Browser.vue +++ b/frontend/views/Browser.vue @@ -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'), diff --git a/frontend/views/Users.vue b/frontend/views/Users.vue index 8a2274f..ef4ca6d 100644 --- a/frontend/views/Users.vue +++ b/frontend/views/Users.vue @@ -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', }) diff --git a/frontend/views/partials/Editor.vue b/frontend/views/partials/Editor.vue index 90a8833..f969755 100644 --- a/frontend/views/partials/Editor.vue +++ b/frontend/views/partials/Editor.vue @@ -58,7 +58,7 @@ export default { content: this.content, }) .then(() => { - this.$toast.open({ + this.$buefy.toast.open({ message: this.lang('Updated'), type: 'is-success', }) diff --git a/frontend/views/partials/Profile.vue b/frontend/views/partials/Profile.vue index 788f224..90a76d1 100644 --- a/frontend/views/partials/Profile.vue +++ b/frontend/views/partials/Profile.vue @@ -47,7 +47,7 @@ export default { newpassword: this.newpassword, }) .then(() => { - this.$toast.open({ + this.$buefy.toast.open({ message: this.lang('Updated'), type: 'is-success', }) diff --git a/frontend/views/partials/Upload.vue b/frontend/views/partials/Upload.vue index dbd5bb5..5b54724 100644 --- a/frontend/views/partials/Upload.vue +++ b/frontend/views/partials/Upload.vue @@ -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'), diff --git a/frontend/views/partials/UserEdit.vue b/frontend/views/partials/UserEdit.vue index b4b3350..dcd53d1 100644 --- a/frontend/views/partials/UserEdit.vue +++ b/frontend/views/partials/UserEdit.vue @@ -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', })