Skip to content

Commit

Permalink
Refactored Pam #156
Browse files Browse the repository at this point in the history
  • Loading branch information
TheoWolf committed Mar 30, 2021
1 parent 7ab7da4 commit 5dd260a
Show file tree
Hide file tree
Showing 14 changed files with 31 additions and 218 deletions.
20 changes: 10 additions & 10 deletions client/src/components/landing/LoggedIn.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
>
Assets
</ExpansionItem>
<ExpansionItem
<!-- <ExpansionItem
v-if="bookmarks"
:data.sync="bookmarks"
:id.sync="bookmarkId"
Expand All @@ -27,21 +27,21 @@
@onClick="onClick"
>
Bookmarks
</ExpansionItem>
</ExpansionItem> -->
</q-list>
</template>
<template v-slot:after>
<div v-if="!createAssetType">
<DashboardEmbed
<Pam
v-if="isPamSelected"
ref="pam"
:selected="pamId"
/>
<DashboardBookmark
<!-- <DashboardBookmark
v-else-if="isBookmarkSelected"
ref="bookmark"
:selected="bookmarkId"
/>
/> -->
</div>
<CreateAsset
v-else
Expand All @@ -59,16 +59,16 @@ import _ from 'lodash'
import getAssetsByType from '@gql/getAssetsByType.gql'
import ExpansionItem from '@/components/shared/ExpansionItem.vue'
import ExpansionItem from '@/components/pam/ExpansionItem.vue'
import CreateAsset from '@/components/pam/CreateAsset.vue'
import DashboardEmbed from '@/components/pam/DashboardEmbed.vue'
import DashboardBookmark from '@/components/pam/DashboardBookmark.vue'
import Pam from '@/pages/Pam.vue'
// import DashboardBookmark from '@/components/pam/DashboardBookmark.vue'
export default {
name: 'LandingLoggedIn',
components: {
DashboardEmbed,
DashboardBookmark,
Pam,
// DashboardBookmark,
CreateAsset,
ExpansionItem
},
Expand Down
1 change: 0 additions & 1 deletion client/src/components/pam/BookmarkPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@
</template>

<script>
import Vue from 'vue'
import { gql } from '@apollo/client'
import { sync } from 'vuex-pathify'
Expand Down
3 changes: 1 addition & 2 deletions client/src/components/pam/CreateAsset.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@

<script>
import createAsset from '@gql/createAsset.gql'
import { sync, get } from 'vuex-pathify'
import { assertType } from 'graphql'
import { sync } from 'vuex-pathify'
export default {
props: {
Expand Down
File renamed without changes.
43 changes: 0 additions & 43 deletions client/src/components/pam/Panel2.vue

This file was deleted.

15 changes: 0 additions & 15 deletions client/src/components/pam/Panel3.vue

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</q-item-section>

<q-item-section class="text-bold">
Views
Projects
</q-item-section>
<q-item-section side>
<q-icon
Expand Down Expand Up @@ -44,8 +44,6 @@
</template>

<script>
import Vue from 'vue'
import { gql } from '@apollo/client'
import { sync } from 'vuex-pathify'
import _ from 'lodash'
Expand Down
125 changes: 0 additions & 125 deletions client/src/components/shared/modals/AddNewVolume.vue

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
<template>
<div v-if="!assetId" class="row">
<q-spinner
class="absolute-center"
color="primary"
size="3em"
/>
</div>
<div v-else>
<div class="q-pa-md">
<q-page>
<div v-if="!assetId" class="row">
<q-spinner
class="absolute-center"
color="primary"
size="3em"
/>
</div>
<div v-else class="q-pa-md">
<q-splitter
v-model="firstModel"
>
<template v-slot:before>
<q-scroll-area
:style="{height: ($q.screen.height-50-16-16-50-1)+'px'}"
>
<Panel1
<Projects
:createAssetType.sync="createAssetType"
:assetId.sync="assetId"
:selectedView.sync="selectedView"
Expand Down Expand Up @@ -46,21 +46,21 @@
</template>
</q-splitter>
</div>
</div>
</q-page>
</template>

<script>
import _ from 'lodash'
import Panel1 from './Panel1.vue'
import Projects from '../components/pam/Projects.vue'
import ProjectViewer from '@/pages/Project.vue'
import CreateAsset from '@/components/pam/CreateAsset.vue'
import FileManager from '@/components/fileManager/FileManager.vue'
export default {
name: 'Dashboard',
components: {
Panel1,
Projects,
ProjectViewer,
CreateAsset,
FileManager
Expand Down
10 changes: 5 additions & 5 deletions client/src/pages/Project.vue
Original file line number Diff line number Diff line change
Expand Up @@ -248,16 +248,16 @@ import { date } from 'quasar'
import { gql } from '@apollo/client'
import { call } from 'vuex-pathify'
import CitationBuilder from '@/components/shared/CitationBuilder'
import AddFunding from '@/components/shared/modals/AddFunding'
import AddLinks from '@/components/shared/modals/AddLinks'
import FileManager from '@/components/fileManager/FileManager'
import TextArea from '@/components/project/TextArea'
import Header from '@/components/project/Header'
import Links from '@/components/project/Links'
import Funding from '@/components/project/Funding'
import Collaborators from '@/components/project/Collaborators'
import CollaboratorsModal from '@/components/shared/modals/Collaborators'
import CollaboratorsModal from '@/components/project/modals/Collaborators'
import AddFunding from '@/components/project/modals/AddFunding'
import AddLinks from '@/components/project/modals/AddLinks'
import FileManager from '@/components/fileManager/FileManager'
import CitationBuilder from '@/components/shared/CitationBuilder'
const defaullDescription = 'View Description'
Expand Down
2 changes: 1 addition & 1 deletion client/src/router/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export default function routes (store) {
{
path: 'pam/:id',
name: 'pamLanding',
component: () => import('components/pam/DashboardEmbed.vue'),
component: () => import('pages/Pam.vue'),
beforeEnter: (to, from, next) => {
if (store.get('app/isLoggedIn')) next()
else next('/')
Expand Down

0 comments on commit 5dd260a

Please sign in to comment.