fix correct order recent

This commit is contained in:
Jonas Heinrich 2020-11-15 23:02:55 +01:00
parent 803a4d2301
commit be069042ff
3 changed files with 4 additions and 38 deletions

View File

@ -25,6 +25,7 @@ class RecentMapper extends QBMapper {
$qb = $this->db->getQueryBuilder();
$qb->select('*')
->from('recent')
->orderBy('id', 'DESC')
->where($qb->expr()->eq('id', $qb->createNamedParameter($id, IQueryBuilder::PARAM_INT)))
->andWhere($qb->expr()->eq('user_id', $qb->createNamedParameter($userId)));
return $this->findEntity($qb);
@ -39,6 +40,7 @@ class RecentMapper extends QBMapper {
$qb = $this->db->getQueryBuilder();
$qb->select('*')
->from('recent')
->orderBy('id', 'DESC')
->where($qb->expr()->eq('user_id', $qb->createNamedParameter($userId)));
return $this->findEntities($qb);
}

View File

@ -3,14 +3,6 @@
<Navigation
:station-data="tableData" />
<AppContent>
<Breadcrumbs
v-if="tableData.length > 0"
class="breadcrumbs">
<Breadcrumb title="Home" href="/" />
<Breadcrumb
:title="t('radio', 'Top')"
href="/Top" />
</Breadcrumbs>
<Table
v-if="!pageLoading && tableData.length > 0"
:station-data="tableData"
@ -42,37 +34,13 @@
</EmptyContent>
</template>
</AppContent>
<AppSidebar v-show="showSidebar"
:title="sidebarStation.name"
:subtitle="stationTags"
@close="showSidebar=false">
<div>
<h3><span class="icon-tag" /> {{ t('radio', 'Stream URL') }}</h3>
<Multiselect
class="sidebar__tags"
:value="tags"
:auto-limit="false"
:limit="7"
:options="allTags"
:multiple="true"
:taggable="true"
:placeholder="t('bookmarks', 'Select tags and create new ones')"
:disabled="!isEditable"
@input="onTagsChange"
@tag="onAddTag" />
</div>
</AppSidebar>
</Content>
</template>
<script>
import Content from '@nextcloud/vue/dist/Components/Content'
import AppContent from '@nextcloud/vue/dist/Components/AppContent'
import Breadcrumbs from '@nextcloud/vue/dist/Components/Breadcrumbs'
import Breadcrumb from '@nextcloud/vue/dist/Components/Breadcrumb'
import EmptyContent from '@nextcloud/vue/dist/Components/EmptyContent'
import AppSidebar from '@nextcloud/vue/dist/Components/AppSidebar'
import AppSidebarTab from '@nextcloud/vue/dist/Components/AppSidebarTab'
import Navigation from './Navigation'
import Table from './Table'
import { Howl } from 'howler'
@ -89,12 +57,8 @@ export default {
Navigation,
Content,
AppContent,
Breadcrumbs,
Breadcrumb,
Table,
EmptyContent,
AppSidebar,
AppSidebarTab,
},
data: () => ({
tableData: [],
@ -231,6 +195,7 @@ export default {
vm.$store.dispatch('isBuffering', false)
},
})
audioPlayer.unload()
audioPlayer.play()
audioPlayer.fade(0, vm.player.volume, 500)

View File

@ -115,8 +115,7 @@ table {
background-color: var(--color-main-background-translucent);
z-index: 60;
position: sticky;
position: -webkit-sticky;
top: 99px;
top: 50px;
th {
border-bottom: 1px solid var(--color-border);