Skip to content

Commit

Permalink
Merge pull request #15 from ecrum19/EDC_active
Browse files Browse the repository at this point in the history
random changes
  • Loading branch information
ecrum19 authored May 23, 2024
2 parents 216cddc + 2c62820 commit 9914b96
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 17 deletions.
83 changes: 78 additions & 5 deletions src/components/Styling/TheHeader.vue
Original file line number Diff line number Diff line change
@@ -1,26 +1,99 @@
<template>
<v-card color="#ccdff8">
<v-container>
<v-card-title justify="center">
<h1>TRIPLE App</h1>
</v-card-title>
<v-row align="center" justify="center">
<v-card-title justify="start">
<h1>TRIPLE App</h1>
</v-card-title>

<!--
<div class="account">
<div class="text-center">
<v-menu
v-model="menu"
:close-on-content-click="false"
location="end"
>
<template v-slot:activator="{ props }">
<v-btn
icon="mdi-account"
size="medium"
color="grey-darken-4"
justify="end"
></v-btn>
</template>
<v-card min-width="300">
<v-list>
<v-list-item
subtitle="{{ webID }}"
title="WebID:"
></v-list-item>
<v-divider></v-divider>
<v-list>
<div v-show="!loggedIn">
<v-list-item>
<v-btn
v-model="message"
color="blue"
label="Login"
@click= redirect...
></v-btn>
</v-list-item>
</div>
<div v-show="loggedIn">
<v-list-item>
<v-switch
v-model="message"
color="blue"
label="Logout"
@click= redirect...
></v-switch>
</v-list-item>
</div>
</v-list>
<v-card-actions>
<v-spacer></v-spacer>
<v-btn variant="text" @click="menu = false"> Cancel </v-btn>
</v-card-actions>
</v-card>
</v-menu>
</div>
</div>
-->
</v-row>
</v-container>
</v-card>
</template>

<script lang="ts">
export default {
data: () => ({}),
data: () => ({
loggedIn: false,
webID: '',
menu: false,
message: false,
}),
};
</script>

<style scoped>
h1 {
color: rgb(0, 0, 0);
margin: 0;
font-family: "Courier New", monospace;
font-size: 3rem; /* Adjust as needed */
text-align: center;
}
.account {
position: absolute;
right: 0;
top: 0;
padding: 15px; /* Optional: adjust the padding as needed */
}
</style>
25 changes: 13 additions & 12 deletions src/router.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { createRouter, createWebHistory } from "vue-router";
import { Component, defineAsyncComponent } from "vue";

import LandingPage from "./components/LandingPage.vue";
// import TheFooter from './components/Styling/TheFooter.vue'
Expand Down Expand Up @@ -27,34 +26,34 @@ const router = createRouter({
path: "/",
redirect: { name: "Home" }
},
{
name: "Login Page",
path: "login",
components: { default: PodLogin },
},
{
name: "Home",
path: "home",
path: "/home",
components: { default: LandingPage },
},
{
name: "Login Page",
path: "/login",
components: { default: PodLogin },
},
{
name: "Data Upload",
path: "dataUpload",
path: "/dataUpload",
components: { default: PodUpload },
},
{
name: "Pod Browser",
path: "podBrowser",
path: "/podBrowser",
components: { default: PodBrowser },
},
{
name: "Query",
path: "dataQuery",
path: "/dataQuery",
components: { default: DataQuery },
},
{
name: "Data Privacy",
path: "privacy",
path: "/privacy",
components: { default: EditPrivacy },
},
{
Expand All @@ -73,7 +72,9 @@ const router = createRouter({
setTimeout(() => {
router.beforeEach(function (to, from, next) {
// make sure the user is authenticated
if (!isLoggedin() && to.name !== "Login Page") {
if (!isLoggedin() && to.name !== "Login Page" && to.name !== "Home") {
next({ name: "Login Page" });
} else if ( !isLoggedin() && to.name !== "Login Page" ) {
next({ name: "Login Page" });
} else if (isLoggedin() && to.name === "Login Page") {
next({ name: "Home" });
Expand Down

0 comments on commit 9914b96

Please sign in to comment.