From ab97176aeb94a5337e994d80220fd9d36456944e Mon Sep 17 00:00:00 2001 From: henrychoy Date: Mon, 23 Dec 2024 11:24:51 -0500 Subject: [PATCH 1/6] feat: right nav drawer --- src/frontend/src/App.vue | 32 ++++++++++++++--- src/frontend/src/assets/main.css | 1 + src/frontend/src/stores/LoginStore.ts | 3 +- src/frontend/src/views/CreateExperiment.vue | 38 +++++++++++++++++---- src/frontend/src/views/ExperimentsView.vue | 2 ++ 5 files changed, 64 insertions(+), 12 deletions(-) diff --git a/src/frontend/src/App.vue b/src/frontend/src/App.vue index ca1e8a32f..30f961bd7 100644 --- a/src/frontend/src/App.vue +++ b/src/frontend/src/App.vue @@ -1,9 +1,28 @@ \ No newline at end of file + + + + \ No newline at end of file diff --git a/src/frontend/src/views/ExperimentsView.vue b/src/frontend/src/views/ExperimentsView.vue index 312253f63..619cf8902 100644 --- a/src/frontend/src/views/ExperimentsView.vue +++ b/src/frontend/src/views/ExperimentsView.vue @@ -123,5 +123,7 @@ } } + const toggleRightDrawer = ref(false) + From ce75bca5da0e3a93f95b7a17ef29c2c90217003b Mon Sep 17 00:00:00 2001 From: henrychoy Date: Mon, 30 Dec 2024 13:09:36 -0500 Subject: [PATCH 2/6] feat: add working experiment history drawer --- src/frontend/src/App.vue | 15 +++- src/frontend/src/components/SnapshotList.vue | 85 ++++++++++++++++++ .../src/components/TableComponent.vue | 87 ++++++++++++++----- src/frontend/src/dialogs/LeaveFormDialog.vue | 4 +- src/frontend/src/router/index.ts | 3 +- src/frontend/src/stores/LoginStore.ts | 3 +- src/frontend/src/views/CreateExperiment.vue | 60 +++++++++---- src/frontend/src/views/CreateJob.vue | 2 +- 8 files changed, 212 insertions(+), 47 deletions(-) create mode 100644 src/frontend/src/components/SnapshotList.vue diff --git a/src/frontend/src/App.vue b/src/frontend/src/App.vue index 30f961bd7..18ecb044b 100644 --- a/src/frontend/src/App.vue +++ b/src/frontend/src/App.vue @@ -5,8 +5,8 @@ - - + + @@ -30,8 +30,9 @@ import NavBar from '@/components/NavBar.vue' import AccessibilityTest from '@/components/AccessibilityTest.vue' import { useQuasar } from 'quasar' - import { computed, provide, ref } from 'vue' + import { computed, provide, watch } from 'vue' import { useLoginStore } from '@/stores/LoginStore' + import SnapshotList from './components/SnapshotList.vue' const store = useLoginStore() @@ -50,4 +51,12 @@ provide('isMobile', isMobile) provide('isMedium', isMedium) + watch(route, (to) => { + // on every route change, close snapshot drawer if open + if(store.showRightDrawer) { + store.showRightDrawer = false + store.selectedSnapshot = null + } + }) + \ No newline at end of file diff --git a/src/frontend/src/components/SnapshotList.vue b/src/frontend/src/components/SnapshotList.vue new file mode 100644 index 000000000..c30efea6f --- /dev/null +++ b/src/frontend/src/components/SnapshotList.vue @@ -0,0 +1,85 @@ + + + \ No newline at end of file diff --git a/src/frontend/src/components/TableComponent.vue b/src/frontend/src/components/TableComponent.vue index 737b89cfa..5c9cbd721 100644 --- a/src/frontend/src/components/TableComponent.vue +++ b/src/frontend/src/components/TableComponent.vue @@ -7,14 +7,16 @@ :filter="filter" selection="single" v-model:selected="selected" - row-key="id" - :class="`q-mt-lg ${isMobile ? '' : '' }`" + :row-key="props.rowKey" + :class="'q-mt-lg'" flat bordered dense v-model:pagination="pagination" @request="onRequest" - :rows-per-page-options="[5,10,15,20,25,50,0]" + :tabindex="props.disableSelect ? '' : '0'" + @keydown="keydown" + :rows-per-page-options="props.showAll ? [0] : [5,10,15,20,25,50,0]" >