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

View File

@ -3,14 +3,6 @@
<Navigation <Navigation
:station-data="tableData" /> :station-data="tableData" />
<AppContent> <AppContent>
<Breadcrumbs
v-if="tableData.length > 0"
class="breadcrumbs">
<Breadcrumb title="Home" href="/" />
<Breadcrumb
:title="t('radio', 'Top')"
href="/Top" />
</Breadcrumbs>
<Table <Table
v-if="!pageLoading && tableData.length > 0" v-if="!pageLoading && tableData.length > 0"
:station-data="tableData" :station-data="tableData"
@ -42,37 +34,13 @@
</EmptyContent> </EmptyContent>
</template> </template>
</AppContent> </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> </Content>
</template> </template>
<script> <script>
import Content from '@nextcloud/vue/dist/Components/Content' import Content from '@nextcloud/vue/dist/Components/Content'
import AppContent from '@nextcloud/vue/dist/Components/AppContent' 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 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 Navigation from './Navigation'
import Table from './Table' import Table from './Table'
import { Howl } from 'howler' import { Howl } from 'howler'
@ -89,12 +57,8 @@ export default {
Navigation, Navigation,
Content, Content,
AppContent, AppContent,
Breadcrumbs,
Breadcrumb,
Table, Table,
EmptyContent, EmptyContent,
AppSidebar,
AppSidebarTab,
}, },
data: () => ({ data: () => ({
tableData: [], tableData: [],
@ -231,6 +195,7 @@ export default {
vm.$store.dispatch('isBuffering', false) vm.$store.dispatch('isBuffering', false)
}, },
}) })
audioPlayer.unload()
audioPlayer.play() audioPlayer.play()
audioPlayer.fade(0, vm.player.volume, 500) audioPlayer.fade(0, vm.player.volume, 500)

View File

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