Added volume and WIP icons
This commit is contained in:
1 parent
011a8c6d56
commit
955bb2ace1
1 file changed
+55
-7
@@ -27,6 +27,7 @@ const {
|
|||||||
repeat,
|
repeat,
|
||||||
secondsPlayed,
|
secondsPlayed,
|
||||||
duration,
|
duration,
|
||||||
|
volume,
|
||||||
} = usePlayer()
|
} = usePlayer()
|
||||||
|
|
||||||
const secondsPlayedFormatted = computed(() =>
|
const secondsPlayedFormatted = computed(() =>
|
||||||
@@ -36,6 +37,8 @@ const secondsPlayedFormatted = computed(() =>
|
|||||||
const durationFormatted = computed(() =>
|
const durationFormatted = computed(() =>
|
||||||
new Date(duration.value * 1000).toISOString().slice(14, 19),
|
new Date(duration.value * 1000).toISOString().slice(14, 19),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const toast = useToast()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -83,7 +86,31 @@ const durationFormatted = computed(() =>
|
|||||||
<p>{{ durationFormatted }}</p>
|
<p>{{ durationFormatted }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="misc-btns"></div>
|
<div class="misc-btns">
|
||||||
|
<div class="volume">
|
||||||
|
<Icon name="lucide:volume-2" />
|
||||||
|
<RangeSlider
|
||||||
|
class="slider"
|
||||||
|
:model-value="volume"
|
||||||
|
@update:model-value="
|
||||||
|
(v) => {
|
||||||
|
if (v !== undefined) volume = v
|
||||||
|
}
|
||||||
|
"
|
||||||
|
:max="1"
|
||||||
|
:min="0"
|
||||||
|
:step="0.01"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<Icon
|
||||||
|
name="lucide:list"
|
||||||
|
@click="toast.show('Not yet implemented')"
|
||||||
|
/>
|
||||||
|
<Icon
|
||||||
|
name="lucide:expand"
|
||||||
|
@click="toast.show('Not yet implemented')"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</article>
|
</article>
|
||||||
</template>
|
</template>
|
||||||
@@ -117,6 +144,12 @@ const durationFormatted = computed(() =>
|
|||||||
&.active {
|
&.active {
|
||||||
transform: translateY(0);
|
transform: translateY(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
span {
|
||||||
|
font-size: 24px;
|
||||||
|
cursor: pointer;
|
||||||
|
transition: color 0.2s ease;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.track,
|
.track,
|
||||||
@@ -165,6 +198,7 @@ const durationFormatted = computed(() =>
|
|||||||
|
|
||||||
.slider {
|
.slider {
|
||||||
gap: 12px;
|
gap: 12px;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
& p {
|
& p {
|
||||||
@include fontSize(15px);
|
@include fontSize(15px);
|
||||||
@@ -172,14 +206,28 @@ const durationFormatted = computed(() =>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
|
||||||
font-size: 24px;
|
|
||||||
cursor: pointer;
|
|
||||||
transition: color 0.2s ease;
|
|
||||||
}
|
|
||||||
|
|
||||||
.repeating {
|
.repeating {
|
||||||
color: $color-accent;
|
color: $color-accent;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.misc-btns {
|
||||||
|
justify-content: end;
|
||||||
|
|
||||||
|
.volume {
|
||||||
|
min-width: 100px;
|
||||||
|
max-width: 150px;
|
||||||
|
|
||||||
|
display: flex;
|
||||||
|
gap: 0.5rem;
|
||||||
|
|
||||||
|
span {
|
||||||
|
font-size: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.slider {
|
||||||
|
flex: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
Reference in new issue
Block a user