From ef9997508d0ab221bc50780b8acc9a054deb3a7a Mon Sep 17 00:00:00 2001 From: Jonas Heinrich <onny@project-insanity.org> Date: Fri, 8 Jan 2021 21:34:57 +0100 Subject: [PATCH] fix itemslider prop --- .../Version000000Date20181013124731.php | 2 +- src/components/ItemSlider.vue | 4 +- src/components/Player.vue | 52 +++++++++++++------ src/views/Browse.vue | 4 +- 4 files changed, 41 insertions(+), 21 deletions(-) diff --git a/lib/Migration/Version000000Date20181013124731.php b/lib/Migration/Version000000Date20181013124731.php index 2341222..225c31a 100644 --- a/lib/Migration/Version000000Date20181013124731.php +++ b/lib/Migration/Version000000Date20181013124731.php @@ -74,7 +74,7 @@ class Version000000Date20181013124731 extends SimpleMigrationStep { $table->addColumn('lastplayed', 'string'); $table->addColumn('enclosure', 'string'); $table->setPrimaryKey(['id']); - $table->addIndex(['user_id'], 'shows_user_id_index'); + $table->addIndex(['user_id'], 'episodes_user_id_index'); } return $schema; diff --git a/src/components/ItemSlider.vue b/src/components/ItemSlider.vue index 70250ef..34ab4f9 100644 --- a/src/components/ItemSlider.vue +++ b/src/components/ItemSlider.vue @@ -72,8 +72,8 @@ export default { default: '', }, podcasts: { - type: Object, - default() { return {} }, + type: Array, + default() { return [] }, }, }, data: () => ({ diff --git a/src/components/Player.vue b/src/components/Player.vue index c5f445e..ef89800 100644 --- a/src/components/Player.vue +++ b/src/components/Player.vue @@ -29,17 +29,22 @@ name="seek" min="0" max="1" - step=".05"> + step=".05" + value="0"> <span>Hallo Test</span> - <div - class="wrap" - :class="{ buffering: player.isBuffering }"> - <button - class="player" - :class="player.isPlaying ? 'pause' : 'play'" - @click="togglePlay" /> + <div class="playerControls"> + <div class="seekButton seekPrev" /> + <div + class="wrap" + :class="{ buffering: player.isBuffering }"> + <button + class="player" + :class="player.isPlaying ? 'pause' : 'play'" + @click="togglePlay" /> + </div> + <div class="seekButton seekNext" /> </div> - <div> + <div class="volumeControls"> <div class="volumeIcon" :class="player.volume == 0 ? 'volumeMute' : 'volumeFull'" @@ -100,6 +105,20 @@ export default { width: 200px; } + .playerControls { + display: flex; + align-items: center; + justify-content: center; + } + + .seekButton { + width: 35px; + height: 35px; + border: 2px solid #0082c9; + border-radius: 50%; + cursor: pointer; + } + .wrap { background: var(--color-main-background); border: 3px solid #0082c9; @@ -145,13 +164,18 @@ export default { } } + .volumeControls { + display: flex; + align-items: center; + justify-content: center; + margin-bottom: 10px; + } + .volumeIcon { width: 25px; height: 25px; - position: relative; - left: 85px; - top: 20px; cursor: pointer; + margin-right: 10px; } .volumeFull { @@ -170,10 +194,6 @@ export default { .volume{ width: 165px; - display: inline-block; - position: relative; - left: 40px; - top: -12px; } </style> diff --git a/src/views/Browse.vue b/src/views/Browse.vue index 70fa030..600d21f 100644 --- a/src/views/Browse.vue +++ b/src/views/Browse.vue @@ -51,8 +51,8 @@ export default { ItemSlider, }, data: () => ({ - podcastsHot: {}, - podcastsLatest: {}, + podcastsHot: [], + podcastsLatest: [], loading: true, }), mounted() { -- GitLab