Merge pull request #755 from jmt-gh/update_sessions_table

Update Sessions page to have a matching "settings UI"
This commit is contained in:
advplyr 2022-06-19 18:28:35 -05:00 committed by GitHub
commit 2795f657b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 57 additions and 57 deletions

View File

@ -66,7 +66,7 @@ export default {
}, },
{ {
id: 'config-sessions', id: 'config-sessions',
title: 'Sessions', title: 'Listening Sessions',
path: '/config/sessions' path: '/config/sessions'
}, },
{ {

View File

@ -1,13 +1,14 @@
<template> <template>
<div class="w-full h-full"> <div class="w-full h-full">
<div class="bg-bg rounded-md shadow-lg border border-white border-opacity-5 p-0 sm:p-4 mb-8"> <div class="bg-bg rounded-md shadow-lg border border-white border-opacity-5 p-4 mb-8">
<div class="py-2"> <div class="flex items-center mb-2">
<div class="flex items-center mb-1"> <h1 class="text-xl">Listening Sessions</h1>
<h1 class="text-lg mb-2 text-white text-opacity-90 px-2 sm:px-0">Listening Sessions</h1> </div>
<div class="flex-grow" />
<div class="flex justify-end mb-2">
<ui-dropdown v-model="selectedUser" :items="userItems" label="Filter by User" small class="max-w-48" @input="updateUserFilter" /> <ui-dropdown v-model="selectedUser" :items="userItems" label="Filter by User" small class="max-w-48" @input="updateUserFilter" />
</div> </div>
<div v-if="listeningSessions.length" class="block max-w-full"> <div v-if="listeningSessions.length" class="block max-w-full">
<table class="userSessionsTable"> <table class="userSessionsTable">
<tr class="bg-primary bg-opacity-40"> <tr class="bg-primary bg-opacity-40">
@ -48,7 +49,7 @@
</td> </td>
</tr> </tr>
</table> </table>
<div class="flex items-center justify-end py-1"> <div class="flex items-center justify-end my-2">
<ui-icon-btn icon="arrow_back_ios_new" :size="7" icon-font-size="1rem" class="mx-1" :disabled="currentPage === 0" @click="prevPage" /> <ui-icon-btn icon="arrow_back_ios_new" :size="7" icon-font-size="1rem" class="mx-1" :disabled="currentPage === 0" @click="prevPage" />
<p class="text-sm mx-1">Page {{ currentPage + 1 }} of {{ numPages }}</p> <p class="text-sm mx-1">Page {{ currentPage + 1 }} of {{ numPages }}</p>
<ui-icon-btn icon="arrow_forward_ios" :size="7" icon-font-size="1rem" class="mx-1" :disabled="currentPage >= numPages - 1" @click="nextPage" /> <ui-icon-btn icon="arrow_forward_ios" :size="7" icon-font-size="1rem" class="mx-1" :disabled="currentPage >= numPages - 1" @click="nextPage" />
@ -56,7 +57,6 @@
</div> </div>
<p v-else class="text-white text-opacity-50">No sessions yet...</p> <p v-else class="text-white text-opacity-50">No sessions yet...</p>
</div> </div>
</div>
<modals-listening-session-modal v-model="showSessionModal" :session="selectedSession" /> <modals-listening-session-modal v-model="showSessionModal" :session="selectedSession" />
</div> </div>