-
Notifications
You must be signed in to change notification settings - Fork 3
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 #171 from BBMRI-ERIC/feat/profile_settings_with_av…
…atar Feat/profile settings with avatar
- Loading branch information
Showing
9 changed files
with
168 additions
and
44 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 was deleted.
Oops, something went wrong.
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,138 @@ | ||
<template> | ||
<!-- Example single danger button --> | ||
<div class="btn-group"> | ||
<b-avatar | ||
type="button" | ||
variant="primary" | ||
:text="returnAcronymOfName" | ||
class="mr-3" | ||
data-bs-toggle="dropdown" | ||
aria-expanded="false" | ||
/> | ||
|
||
<ul class="dropdown-menu dropdown-menu-end mt-1"> | ||
<li class="container mb-3 mt-2"> | ||
<div class="d-flex flex-row"> | ||
<b-avatar | ||
type="button" | ||
variant="primary" | ||
:text="returnAcronymOfName" | ||
class="me-3 mt-1" | ||
data-bs-toggle="dropdown" | ||
aria-expanded="false" | ||
/> | ||
<div> | ||
<div>{{ user.email }}</div> | ||
<div class="text-muted"> | ||
{{ user.name }} | ||
</div> | ||
</div> | ||
<i class="bi bi-x ms-2 h4" /> | ||
</div> | ||
</li> | ||
<li><hr class="dropdown-divider"></li> | ||
<li> | ||
<a | ||
href="https://profile.aai.lifescience-ri.eu/profile" | ||
class="dropdown-item text-primary-text" | ||
> <i class="bi bi-gear" /> | ||
Profile Settings | ||
</a> | ||
</li> | ||
<li v-if="isRepresentative"> | ||
<a | ||
href=" https://perun.aai.lifescience-ri.eu/organizations/3353/groups/24879/subgroups" | ||
class="dropdown-item text-primary-text" | ||
> <i class="bi bi-person-gear" /> | ||
Authorization Settings | ||
</a> | ||
</li> | ||
<li><hr class="dropdown-divider"></li> | ||
<li> | ||
<a | ||
href="https://www.bbmri-eric.eu/wp-content/uploads/AoM_10_8_Access-Policy_FINAL_EU.pdfl" | ||
class="dropdown-item text-primary-text" | ||
> <i class="bi bi-shield-lock" /> | ||
Privacy Policy | ||
</a> | ||
</li> | ||
<li> | ||
<a | ||
href="https://www.bbmri-eric.eu/services/access-policies/" | ||
class="dropdown-item text-primary-text" | ||
> <i class="bi bi-clipboard-check" /> | ||
Access Policy | ||
</a> | ||
</li> | ||
<li v-if="featureFlagsFAQ"> | ||
<router-link | ||
class="dropdown-item text-primary-text" | ||
to="/FAQ" | ||
> | ||
<i class="bi bi-people" /> | ||
Support | ||
</router-link> | ||
</li> | ||
<li><hr class="dropdown-divider"></li> | ||
<li class="text-center sign-out"> | ||
<button | ||
class="btn me-2 " | ||
aria-current="page" | ||
@click.stop.prevent="signOutOidc" | ||
> | ||
<i class="bi bi-box-arrow-right" /> Sign Out | ||
</button> | ||
</li> | ||
</ul> | ||
</div> | ||
</template> | ||
|
||
<script> | ||
import { mapActions } from "vuex" | ||
import allFeatureFlags from "@/config/featureFlags.js" | ||
export default { | ||
name: "ProfileSettings", | ||
props: { | ||
user: { | ||
type: Object, | ||
default: {} | ||
}, | ||
isRepresentative: { | ||
type: Boolean, | ||
default: false | ||
} | ||
}, | ||
data () { | ||
return { | ||
featureFlagsFAQ: allFeatureFlags.faqPage | ||
} | ||
}, | ||
computed: { | ||
returnAcronymOfName () { | ||
const str = this.user?.name | ||
const matches = str.match(/\b(\w)/g) | ||
const acronym = matches.join(" ") | ||
return acronym | ||
} | ||
}, | ||
methods: { | ||
...mapActions([ | ||
"signOutOidc" | ||
]) | ||
} | ||
} | ||
</script> | ||
<style> | ||
.avatar { | ||
vertical-align: middle; | ||
width: 50px; | ||
height: 50px; | ||
border-radius: 50%; | ||
} | ||
.sign-out:hover { | ||
color: #dc3545; | ||
} | ||
</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