Move error back to bottom; set to dynamically adjust the bottom margin

This commit is contained in:
Brandon A 2025-11-01 17:20:27 +00:00
parent ad12026229
commit 13845a43d6

View File

@ -7,7 +7,7 @@
<Nuxt :key="currentLang" /> <Nuxt :key="currentLang" />
</div> </div>
<app-media-player-container ref="mediaPlayerContainer" /> <app-media-player-container ref="mediaPlayerContainer" :class="{ 'media-player': isShowingMediaPlayer }" />
<modals-item-edit-modal /> <modals-item-edit-modal />
<modals-collections-add-create-modal /> <modals-collections-add-create-modal />
@ -70,6 +70,14 @@ export default {
}, },
appContentMarginLeft() { appContentMarginLeft() {
return this.isShowingSideRail ? 80 : 0 return this.isShowingSideRail ? 80 : 0
},
isShowingMediaPlayer() {
if (this.$store.state.streamLibraryItem) {
document.body.classList.add('media-player')
} else {
document.body.classList.remove('media-player')
}
return this.$store.state.streamLibraryItem
} }
}, },
methods: { methods: {
@ -93,10 +101,11 @@ export default {
const toastUpdateOptions = { const toastUpdateOptions = {
content: content, content: content,
options: { options: {
toastClassName: 'toast-mb-48 lg:toast-mb-40',
timeout: timeout, timeout: timeout,
type: type, type: type,
closeButton: false, closeButton: false,
position: 'top-center', position: 'bottom-center',
onClose: () => { onClose: () => {
this.socketConnectionToastId = null this.socketConnectionToastId = null
}, },
@ -105,7 +114,13 @@ export default {
} }
this.$toast.update(this.socketConnectionToastId, toastUpdateOptions, false) this.$toast.update(this.socketConnectionToastId, toastUpdateOptions, false)
} else { } else {
this.socketConnectionToastId = this.$toast[type](content, { position: 'top-center', timeout: timeout, closeButton: false, closeOnClick: timeout !== null }) this.socketConnectionToastId = this.$toast[type](content, {
toastClassName: 'toast-mb-48 lg:toast-mb-40',
position: 'bottom-center',
timeout: timeout,
closeButton: false,
closeOnClick: timeout !== null
})
} }
}, },
connect() { connect() {
@ -644,6 +659,14 @@ export default {
font-size: 14px; font-size: 14px;
} }
.media-player .Vue-Toastification__toast.toast-mb-40 {
margin-bottom: calc(var(--spacing) * 40);
}
.media-player .Vue-Toastification__toast.toast-mb-48 {
margin-bottom: calc(var(--spacing) * 48);
}
#app-content { #app-content {
width: 100%; width: 100%;
} }