Skip to content

Commit

Permalink
Merge pull request #540 from Deltares/DWO-606_Remove_roles_from_login…
Browse files Browse the repository at this point in the history
…_profile

Dwo 606 remove roles from login profile
  • Loading branch information
ekkelenkamp authored Dec 14, 2023
2 parents e24d1ac + 422c765 commit 3585e72
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 29 deletions.
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "fews-weboc-next",
"name": "fews-weboc",
"private": true,
"version": "0.6.0",
"type": "module",
Expand Down
6 changes: 1 addition & 5 deletions src/views/auth/DeltaresLogin.vue
Original file line number Diff line number Diff line change
@@ -1,17 +1,13 @@
<template>
<v-btn @click="login" color="primary">
<v-icon>mdi-microsoft-windows</v-icon> Sign in with {{ props.name }}
<v-icon>mdi-microsoft-windows</v-icon>Sign in
</v-btn>
</template>

<script setup lang="ts">
import { useRoute } from 'vue-router'
import { authenticationManager } from '../../services/authentication/AuthenticationManager.js'
const props = defineProps({
name: String,
})
const route = useRoute()
function login(): void {
Expand Down
14 changes: 1 addition & 13 deletions src/views/auth/LoginComponent.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div>
<v-btn v-if="requiresLogin" @click="login" variant="text"> Sign in </v-btn>
<v-btn v-if="requiresLogin" @click="login" variant="text"> Sign in</v-btn>
<div v-else>
<v-menu location="bottom" width="200">
<template #activator="{ props }">
Expand All @@ -10,18 +10,6 @@
</template>
<v-list density="compact">
<v-list-item>{{ name }}</v-list-item>
<v-list-item v-if="roles.length">
<template v-slot:prepend>
<v-icon>mdi-account-eye</v-icon>
</template>
<v-list-item-title>{{ roles[0].toLowerCase() }}</v-list-item-title>
</v-list-item>
<v-list-item v-else>
<template v-slot:prepend>
<v-icon>mdi-account-eye</v-icon>
</template>
<v-list-item-title>Guest</v-list-item-title>
</v-list-item>
<v-list-item @click="logout">
<v-list-item-title>Sign out</v-list-item-title>
</v-list-item>
Expand Down
9 changes: 1 addition & 8 deletions src/views/auth/LoginView.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
<template>
<v-app>
<v-main class="login-container">
<div>
<img
src="/images/deltares_logo.png"
alt="Deltares"
contain
style="max-width: 80%"
/>
</div>
<div>&nbsp;</div>
<h1 style="color: white">Delft-FEWS Web Operator Client</h1>
<div class="login-providers">
<deltares-login name="Deltares" />
Expand Down

0 comments on commit 3585e72

Please sign in to comment.