fix correct display recent
This commit is contained in:
parent
b6598370af
commit
524cd875e1
@ -23,8 +23,12 @@ class RecentMapper extends QBMapper {
|
|||||||
public function find(int $id, string $userId): Station {
|
public function find(int $id, string $userId): Station {
|
||||||
/* @var $qb IQueryBuilder */
|
/* @var $qb IQueryBuilder */
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
$qb->select('*')
|
$qb->selectDistinct('stationuuid')
|
||||||
|
->addSelect('name')
|
||||||
|
->addSelect('favicon')
|
||||||
|
->addSelect('urlresolved')
|
||||||
->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);
|
||||||
@ -37,8 +41,12 @@ class RecentMapper extends QBMapper {
|
|||||||
public function findAll(string $userId): array {
|
public function findAll(string $userId): array {
|
||||||
/* @var $qb IQueryBuilder */
|
/* @var $qb IQueryBuilder */
|
||||||
$qb = $this->db->getQueryBuilder();
|
$qb = $this->db->getQueryBuilder();
|
||||||
$qb->select('*')
|
$qb->selectDistinct('stationuuid')
|
||||||
|
->addSelect('name')
|
||||||
|
->addSelect('favicon')
|
||||||
|
->addSelect('urlresolved')
|
||||||
->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);
|
||||||
}
|
}
|
||||||
|
@ -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"
|
||||||
@ -40,7 +32,6 @@
|
|||||||
No stations were found matching your search term
|
No stations were found matching your search term
|
||||||
</template>
|
</template>
|
||||||
</EmptyContent>
|
</EmptyContent>
|
||||||
<Sidebar />
|
|
||||||
</template>
|
</template>
|
||||||
</AppContent>
|
</AppContent>
|
||||||
</Content>
|
</Content>
|
||||||
@ -49,18 +40,15 @@
|
|||||||
<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 generateUrl from '@nextcloud/router'
|
import { generateUrl } from '@nextcloud/router'
|
||||||
import { showError } from '@nextcloud/dialogs'
|
import { showError } from '@nextcloud/dialogs'
|
||||||
import axios from '@nextcloud/axios'
|
import axios from '@nextcloud/axios'
|
||||||
|
|
||||||
import Navigation from './Navigation'
|
import Navigation from './Navigation'
|
||||||
import Sidebar from './Sidebar'
|
|
||||||
import Table from './Table'
|
import Table from './Table'
|
||||||
|
|
||||||
import Howl from 'howler'
|
import { Howl } from 'howler'
|
||||||
|
|
||||||
let audioPlayer = null
|
let audioPlayer = null
|
||||||
|
|
||||||
@ -70,11 +58,8 @@ export default {
|
|||||||
Navigation,
|
Navigation,
|
||||||
Content,
|
Content,
|
||||||
AppContent,
|
AppContent,
|
||||||
Breadcrumbs,
|
|
||||||
Breadcrumb,
|
|
||||||
Table,
|
Table,
|
||||||
EmptyContent,
|
EmptyContent,
|
||||||
Sidebar,
|
|
||||||
},
|
},
|
||||||
data: () => ({
|
data: () => ({
|
||||||
tableData: [],
|
tableData: [],
|
||||||
|
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user