diff --git a/public/css/app.css b/public/css/app.css index 8d3c2dfe795..0c0b68544a6 100644 --- a/public/css/app.css +++ b/public/css/app.css @@ -65184,6 +65184,10 @@ body{ right: 1rem; } + :is([dir="ltr"] .sm\:ltr\:left-4){ + left: 1rem; + } + :is([dir="ltr"] .sm\:ltr\:pl-10){ padding-left: 2.5rem; } @@ -65192,6 +65196,10 @@ body{ left: 1rem; } + :is([dir="rtl"] .sm\:rtl\:right-4){ + right: 1rem; + } + :is([dir="rtl"] .sm\:rtl\:space-x-reverse) > :not([hidden]) ~ :not([hidden]){ --tw-space-x-reverse: 1; } diff --git a/resources/assets/js/components/NotificationPlugin/Notification.vue b/resources/assets/js/components/NotificationPlugin/Notification.vue index aff6ef9af85..583ddc04000 100644 --- a/resources/assets/js/components/NotificationPlugin/Notification.vue +++ b/resources/assets/js/components/NotificationPlugin/Notification.vue @@ -1,204 +1,257 @@ + \ No newline at end of file + }; + diff --git a/resources/assets/js/components/NotificationPlugin/Notifications.vue b/resources/assets/js/components/NotificationPlugin/Notifications.vue index 2689cc923fc..0b0dfdfa7e1 100644 --- a/resources/assets/js/components/NotificationPlugin/Notifications.vue +++ b/resources/assets/js/components/NotificationPlugin/Notifications.vue @@ -1,55 +1,63 @@ + diff --git a/resources/assets/js/components/NotificationPlugin/index.js b/resources/assets/js/components/NotificationPlugin/index.js index e871fb6ac8c..634a93ce4ca 100644 --- a/resources/assets/js/components/NotificationPlugin/index.js +++ b/resources/assets/js/components/NotificationPlugin/index.js @@ -1,66 +1,81 @@ import Notifications from './Notifications.vue'; const NotificationStore = { - state: [], // here the notifications will be added - settings: { - overlap: false, - verticalAlign: 'top', - horizontalAlign: 'right', - type: 'info', - timeout: 5000, - closeOnClick: true, - showClose: true - }, - setOptions(options) { - this.settings = Object.assign(this.settings, options); - }, - removeNotification(timestamp) { - const indexToDelete = this.state.findIndex(n => n.timestamp === timestamp); - if (indexToDelete !== -1) { - this.state.splice(indexToDelete, 1); - } - }, - addNotification(notification) { - if (typeof notification === 'string' || notification instanceof String) { - notification = { message: notification }; - } - notification.timestamp = new Date(); - notification.timestamp.setMilliseconds( - notification.timestamp.getMilliseconds() + this.state.length - ); - notification = Object.assign({}, this.settings, notification); - this.state.push(notification); - }, - notify(notification) { - if (Array.isArray(notification)) { - notification.forEach(notificationInstance => { - this.addNotification(notificationInstance); - }); - } else { - this.addNotification(notification); + state: [], // here the notifications will be added + + settings: { + overlap: false, + verticalAlign: 'top', + horizontalAlign: 'right', + type: 'info', + timeout: 5000, + closeOnClick: true, + showClose: true + }, + + setOptions(options) { + this.settings = Object.assign(this.settings, options); + }, + + removeNotification(timestamp) { + const indexToDelete = this.state.findIndex(n => n.timestamp === timestamp); + + if (indexToDelete !== -1) { + this.state.splice(indexToDelete, 1); + } + }, + + addNotification(notification) { + if (typeof notification === 'string' || notification instanceof String) { + notification = { + message: notification + }; + } + + notification.timestamp = new Date(); + + notification.timestamp.setMilliseconds( + notification.timestamp.getMilliseconds() + this.state.length + ); + + notification = Object.assign({}, this.settings, notification); + + this.state.push(notification); + }, + + notify(notification) { + if (Array.isArray(notification)) { + notification.forEach(notificationInstance => { + this.addNotification(notificationInstance); + }); + } else { + this.addNotification(notification); + } } - } }; const NotificationsPlugin = { - install(Vue, options) { - let app = new Vue({ - data: { - notificationStore: NotificationStore - }, - methods: { - notify(notification) { - this.notificationStore.notify(notification); + install(Vue, options) { + let app = new Vue({ + data: { + notificationStore: NotificationStore + }, + + methods: { + notify(notification) { + this.notificationStore.notify(notification); + } + } + }); + + Vue.prototype.$notify = app.notify; + Vue.prototype.$notifications = app.notificationStore; + Vue.component('Notifications', Notifications); + + if (options) { + NotificationStore.setOptions(options); } - } - }); - Vue.prototype.$notify = app.notify; - Vue.prototype.$notifications = app.notificationStore; - Vue.component('Notifications', Notifications); - if (options) { - NotificationStore.setOptions(options); } - } }; export default NotificationsPlugin; diff --git a/resources/assets/js/mixins/global.js b/resources/assets/js/mixins/global.js index 202b55db0c2..5b3965e63a6 100644 --- a/resources/assets/js/mixins/global.js +++ b/resources/assets/js/mixins/global.js @@ -271,6 +271,8 @@ export default { } this.$notify({ + verticalAlign: 'bottom', + horizontalAlign: 'left', message: notify.message, timeout: timeout, icon: 'error_outline', @@ -1120,6 +1122,8 @@ export default { document.execCommand('copy'); this.$notify({ + verticalAlign: 'bottom', + horizontalAlign: 'left', message: this.share.success_message, timeout: 5000, icon: 'error_outline', diff --git a/resources/assets/js/mixins/wizardAction.js b/resources/assets/js/mixins/wizardAction.js index d5098f37c2d..47d18f3eac2 100644 --- a/resources/assets/js/mixins/wizardAction.js +++ b/resources/assets/js/mixins/wizardAction.js @@ -72,6 +72,8 @@ export default { } this.$notify({ + verticalAlign: 'bottom', + horizontalAlign: 'left', message: response.data.message, timeout: timeout, icon: "error_outline", @@ -92,6 +94,8 @@ export default { } this.$notify({ + verticalAlign: 'bottom', + horizontalAlign: 'left', message: event.message, timeout: timeout, icon: "error_outline", diff --git a/resources/assets/js/views/auth/common.js b/resources/assets/js/views/auth/common.js index df1c6524e63..8a1d6223e84 100644 --- a/resources/assets/js/views/auth/common.js +++ b/resources/assets/js/views/auth/common.js @@ -54,6 +54,8 @@ const login = new Vue({ let type = notify.level; this.$notify({ + verticalAlign: 'bottom', + horizontalAlign: 'left', message: notify.message, timeout: 5000, icon: '', diff --git a/resources/assets/js/views/common/contacts.js b/resources/assets/js/views/common/contacts.js index df04d826941..b7567db7f50 100644 --- a/resources/assets/js/views/common/contacts.js +++ b/resources/assets/js/views/common/contacts.js @@ -69,6 +69,8 @@ const app = new Vue({ if (response.data.error) { this.$notify({ + verticalAlign: 'bottom', + horizontalAlign: 'left', message: response.data.message, timeout: 0, icon: 'fas fa-bell', diff --git a/resources/assets/js/views/modules/apps.js b/resources/assets/js/views/modules/apps.js index bffdda633cd..05045ea80b1 100644 --- a/resources/assets/js/views/modules/apps.js +++ b/resources/assets/js/views/modules/apps.js @@ -106,6 +106,8 @@ const app = new Vue({ add_to_cart_promise.then(response => { if (response.data.success) { this.$notify({ + verticalAlign: 'bottom', + horizontalAlign: 'left', message: response.data.message, timeout: 0, icon: "shopping_cart_checkout", diff --git a/resources/assets/js/views/wizard/Finish.vue b/resources/assets/js/views/wizard/Finish.vue index eeb55c6c322..e3de3cd7fb6 100644 --- a/resources/assets/js/views/wizard/Finish.vue +++ b/resources/assets/js/views/wizard/Finish.vue @@ -112,6 +112,8 @@ export default { }) .catch((error) => { this.$notify({ + verticalAlign: 'bottom', + horizontalAlign: 'left', message: this.translations.finish.error_message, timeout: 1000, icon: "",