-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #800 from nih-sparc/add-repository-panels-to-profi…
…le-page Add repository panels to profile page
- Loading branch information
Showing
9 changed files
with
135 additions
and
17 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
<template> | ||
<el-card :style="{ border: 'none', maxWidth: width + 'rem' }" class="card centered"> | ||
<div class="image-container"> | ||
<img class="thumbnail" :src="thumbnailUrl" alt="thumbnail loading ..." /> | ||
</div> | ||
<div class="body1 mb-16"> | ||
{{description}} | ||
</div> | ||
<div class="body1 mb-16"> | ||
Status: <b>{{ status }}</b> | ||
</div> | ||
<a :href="buttonLink" target="_blank"> | ||
<el-button class='secondary'> | ||
Launch Pennsieve <svg-icon icon="icon-open" height="16" width="16" /> | ||
</el-button> | ||
</a> | ||
</el-card> | ||
</template> | ||
<script> | ||
export default { | ||
name: 'RespositoryCard', | ||
props: { | ||
width: { | ||
type: Number, | ||
default: 13.8 | ||
}, | ||
description: { | ||
type: String, | ||
default: null | ||
}, | ||
status: { | ||
type: String, | ||
default: null | ||
}, | ||
buttonLink: { | ||
type: String, | ||
default: null | ||
}, | ||
thumbnailUrl: { | ||
type: String, | ||
default: null | ||
}, | ||
} | ||
} | ||
</script> | ||
<style lang="scss" scoped> | ||
.centered { | ||
text-align: center; | ||
} | ||
.image-container { | ||
max-width: 75%; | ||
margin: auto; | ||
img { | ||
width: 100%; | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
import sparcLogo from '@/assets/logo-sparc-wave-primary.svg' | ||
import rejoinLogo from '@/assets/rejoin.jpg' | ||
|
||
const organizationsData = [ | ||
{ | ||
name: 'SPARC', | ||
id: process.env.SPARC_ORG_ID, | ||
logo: sparcLogo | ||
}, | ||
{ | ||
name: 'RE-JOIN', | ||
id: process.env.REJOIN_ORG_ID, | ||
logo: rejoinLogo | ||
} | ||
] | ||
|
||
export const getOrganizationInfo = id => { | ||
const org = organizationsData.find(org => org.id == id) | ||
return org ? org : null | ||
} | ||
|
||
export const getOrganizationStatus = org => { | ||
if (org.isOwner) | ||
return 'Owner Access' | ||
else if (org.isAdmin) | ||
return 'Admin Access' | ||
else if (org.isGuest) | ||
return 'Guest Access' | ||
else | ||
return 'Read Access' | ||
} |