Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Philipp Wolfer
funkwhale
Commits
9bef2304
Commit
9bef2304
authored
Sep 20, 2021
by
Georg Krause
Browse files
Update track progress bars with css transitions
parent
e9de6863
Changes
5
Show whitespace changes
Inline
Side-by-side
front/src/components/Queue.vue
View file @
9bef2304
...
...
@@ -57,7 +57,7 @@
:class=
"['ui', 'small', 'vibrant', {'indicating': isLoadingAudio}, 'progress']"
@
click=
"touchProgress"
>
<div
class=
"buffer bar"
:data-percent=
"bufferProgress"
:style=
"{ 'width': bufferProgress + '%' }"
></div>
<div
class=
"position bar"
:data-percent=
"progress"
:style=
"{ '
width':
progress + '
%
' }"
></div>
<div
class=
"position bar"
:data-percent=
"progress"
:style=
"{ '
transform': 'scale(' +
progress + '
, 1)
' }"
></div>
</div>
</div>
<div
class=
"progress-area"
v-else
>
...
...
front/src/components/audio/Player.vue
View file @
9bef2304
...
...
@@ -7,7 +7,7 @@
<div
:class=
"['ui', 'top attached', 'small', 'inverted',
{'indicating': isLoadingAudio}, 'progress']">
<div
class=
"buffer bar"
:data-percent=
"bufferProgress"
:style=
"
{ 'width': bufferProgress + '%' }">
</div>
<div
class=
"position bar"
:data-percent=
"progress"
:style=
"
{ '
width':
progress + '
%
' }">
</div>
<div
class=
"position bar"
:data-percent=
"progress"
:style=
"
{ '
transform': 'scale(' +
progress + '
, 1)
' }">
</div>
</div>
<div
class=
"controls-row"
>
...
...
front/src/store/player.js
View file @
9bef2304
...
...
@@ -88,7 +88,7 @@ export default {
return
time
.
parse
(
Math
.
round
(
state
.
currentTime
))
},
progress
:
state
=>
{
return
Math
.
round
((
state
.
currentTime
/
state
.
duration
*
100
)
*
10
)
/
10
return
state
.
currentTime
/
state
.
duration
}
},
actions
:
{
...
...
front/src/style/components/_player.scss
View file @
9bef2304
...
...
@@ -75,7 +75,9 @@
.ui.progress
:not
([
data-percent
])
:not
(
.indeterminate
)
.bar.position
:not
(
.buffer
)
{
background
:
var
(
--
vibrant-color
);
min-width
:
0
;
width
:
100%
;
transition
:
transform
1
.1s
linear
0s
;
transform-origin
:
left
center
0px
;
}
.track-controls
{
...
...
front/src/style/components/_queue.scss
View file @
9bef2304
...
...
@@ -174,6 +174,9 @@
.ui.progress
:not
([
data-percent
])
:not
(
.indeterminate
)
.bar.position
:not
(
.buffer
)
{
background
:
var
(
--
vibrant-color
);
width
:
100%
;
transition
:
transform
1
.1s
linear
0s
;
transform-origin
:
left
center
0px
;
}
.indicating.progress
.bar
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment