Updated ToastContainer to move above player when visible

This commit is contained in:
lucast committed 2026-02-24 18:30:39 +01:00
1 parent 955bb2ace1
commit 49d4bd86f1
3 files changed
+15 -4

No files matched your search

+1 -1
View File
@@ -127,7 +127,7 @@ const toast = useToast()
position: fixed; position: fixed;
bottom: 1rem; bottom: 1rem;
height: 72px; height: $player-height;
border-radius: $border-radius-lg; border-radius: $border-radius-lg;
border: 1px solid $color-border; border: 1px solid $color-border;
+2
View File
@@ -10,3 +10,5 @@ $color-attention: #fc8181;
$border-radius-standard: 0.3rem; $border-radius-standard: 0.3rem;
$border-radius-lg: 0.6rem; $border-radius-lg: 0.6rem;
$player-height: 72px;
+12 -3
View File
@@ -1,9 +1,10 @@
<script setup lang="ts"> <script setup lang="ts">
const { toasts, remove } = useToast() const { toasts, remove } = useToast()
const song = useSong()
</script> </script>
<template> <template>
<div class="toast-container"> <div class="toast-container" :class="{ playerShown: song != undefined }">
<TransitionGroup name="toast"> <TransitionGroup name="toast">
<div <div
v-for="toast in toasts" v-for="toast in toasts"
@@ -27,11 +28,17 @@ const { toasts, remove } = useToast()
right: 0; right: 0;
z-index: 100; z-index: 100;
padding: 20px; padding: 2rem;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 10px; gap: 10px;
transition: trasnform 0.2s ease-out;
}
.playerShown {
transform: translateY(-$player-height);
} }
.toast { .toast {
@@ -44,7 +51,9 @@ const { toasts, remove } = useToast()
cursor: pointer; cursor: pointer;
transition: transform 0.2s ease, opacity 0.2s ease; transition:
transform 0.2s ease,
opacity 0.2s ease;
} }
.toast-enter-from { .toast-enter-from {