diff --git a/src/renderer/components/ft-toast/ft-toast.css b/src/renderer/components/ft-toast/ft-toast.css index 1e95bb60..79ce9f80 100644 --- a/src/renderer/components/ft-toast/ft-toast.css +++ b/src/renderer/components/ft-toast/ft-toast.css @@ -4,10 +4,12 @@ transform: translate(-50%, 0); bottom: 50px; z-index: 1; + display: flex; + flex-direction: column; + align-items: center; } .toast { - display: flex; padding: 10px; margin: 5px; overflow-y: auto; diff --git a/src/renderer/components/ft-toast/ft-toast.js b/src/renderer/components/ft-toast/ft-toast.js index 14dc3c8a..94f5044d 100644 --- a/src/renderer/components/ft-toast/ft-toast.js +++ b/src/renderer/components/ft-toast/ft-toast.js @@ -28,12 +28,11 @@ export default Vue.extend({ setTimeout(this.clear, 300) } toast.isOpen = false - }, open: function (message, action, time) { const toast = { message: message, action: action || (() => { }), isOpen: false, timeout: null } toast.timeout = setTimeout(this.close, time || 3000, toast) - setImmediate(() => toast.isOpen = true) + setImmediate(() => { toast.isOpen = true }) if (this.toasts.length > 4) { for (let i = this.toasts.length - 1; i >= 0; i--) { if (!this.toasts[i].isOpen) {