mirror of
https://github.com/FreeTubeApp/FreeTube
synced 2024-12-04 08:01:16 +01:00
Fix linting,
Make toasts fit content rather than having the same width
This commit is contained in:
parent
0b988e72b9
commit
a26690b5be
@ -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;
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user