mirror of
				https://github.com/advplyr/audiobookshelf.git
				synced 2025-10-27 11:18:14 +01:00 
			
		
		
		
	Fix:Show toasts below appbar & toolbar #819
This commit is contained in:
		
							parent
							
								
									2b91bff1af
								
							
						
					
					
						commit
						21e704e12c
					
				| @ -225,4 +225,18 @@ Bookshelf Label | ||||
|   -webkit-line-clamp: 2; | ||||
|   /* number of lines to show */ | ||||
|   -webkit-box-orient: vertical; | ||||
| } | ||||
| 
 | ||||
| 
 | ||||
| /* Padding for toastification toasts in the top right to not cover appbar/toolbar */ | ||||
| .app-bar-and-toolbar .Vue-Toastification__container.top-right { | ||||
|   padding-top: 104px; | ||||
| } | ||||
| 
 | ||||
| .app-bar .Vue-Toastification__container.top-right { | ||||
|   padding-top: 64px; | ||||
| } | ||||
| 
 | ||||
| .no-bars .Vue-Toastification__container.top-right { | ||||
|   padding-top: 8px; | ||||
| } | ||||
| @ -5,5 +5,10 @@ | ||||
| </template> | ||||
| 
 | ||||
| <script> | ||||
| export default {} | ||||
| export default { | ||||
|   mounted() { | ||||
|     document.body.classList.remove('app-bar', 'app-bar-and-toolbar') | ||||
|     document.body.classList.add('no-bars') | ||||
|   } | ||||
| } | ||||
| </script> | ||||
| @ -40,6 +40,7 @@ export default { | ||||
|       if (this.$store.state.selectedLibraryItems) { | ||||
|         this.$store.commit('setSelectedLibraryItems', []) | ||||
|       } | ||||
|       this.updateBodyClass() | ||||
|     } | ||||
|   }, | ||||
|   computed: { | ||||
| @ -53,11 +54,23 @@ export default { | ||||
|       if (!this.$route.name) return false | ||||
|       return !this.$route.name.startsWith('config') && this.$store.state.libraries.currentLibraryId | ||||
|     }, | ||||
|     isShowingToolbar() { | ||||
|       return this.isShowingSideRail && this.$route.name !== 'upload' && this.$route.name !== 'account' | ||||
|     }, | ||||
|     appContentMarginLeft() { | ||||
|       return this.isShowingSideRail ? 80 : 0 | ||||
|     } | ||||
|   }, | ||||
|   methods: { | ||||
|     updateBodyClass() { | ||||
|       if (this.isShowingToolbar) { | ||||
|         document.body.classList.remove('no-bars', 'app-bar') | ||||
|         document.body.classList.add('app-bar-and-toolbar') | ||||
|       } else { | ||||
|         document.body.classList.remove('no-bars', 'app-bar-and-toolbar') | ||||
|         document.body.classList.add('app-bar') | ||||
|       } | ||||
|     }, | ||||
|     updateSocketConnectionToast(content, type, timeout) { | ||||
|       if (this.socketConnectionToastId !== null && this.socketConnectionToastId !== undefined) { | ||||
|         this.$toast.update(this.socketConnectionToastId, { content: content, options: { timeout: timeout, type: type, closeButton: false, position: 'bottom-center', onClose: () => null, closeOnClick: timeout !== null } }, false) | ||||
| @ -521,6 +534,7 @@ export default { | ||||
|     this.initializeSocket() | ||||
|   }, | ||||
|   mounted() { | ||||
|     this.updateBodyClass() | ||||
|     this.resize() | ||||
|     window.addEventListener('resize', this.resize) | ||||
|     window.addEventListener('keydown', this.keyDown) | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user