Skip to content

Commit

Permalink
Applied suggestions from PR
Browse files Browse the repository at this point in the history
  • Loading branch information
BT-Creator committed Jul 17, 2024
1 parent 941b72e commit 6e5827c
Show file tree
Hide file tree
Showing 3 changed files with 75 additions and 73 deletions.
File renamed without changes.
146 changes: 75 additions & 71 deletions loama/src/components/header/HeaderBase.vue
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<template>
<header>
<div class="wordmark">
<Loama/>
<Loama />
<span>Loama</span>
</div>
<nav>
<slot></slot>
<IconButton :rightIcon="PhShareFat" class="share">Share access</IconButton>
<LoButton :rightIcon="PhShareFat" class="share">Share access</LoButton>
</nav>
<img :src="pfpSrc" alt="User profile picture" @click="showContextMenu"/>
<img :src="pfpSrc" alt="User profile picture" @click="toggleContextMenu" />
<Suspense>
<HeaderContextMenu class="menu" :class="{hidden: isContextMenuHidden}" @click="showContextMenu"/>
<HeaderContextMenu class="menu" :class="{ hidden: isContextMenuHidden }" @click="toggleContextMenu" />
<template #fallback>
Loading context menu...
</template>
Expand All @@ -21,7 +21,7 @@
<script setup lang="ts">
import { ref } from 'vue';
import Loama from '../../assets/loama.svg'
import IconButton from '../IconButton.vue'
import LoButton from '../LoButton.vue'
import HeaderContextMenu from './HeaderContextMenu.vue'
import { PhShareFat } from '@phosphor-icons/vue';
defineProps<{
Expand All @@ -31,76 +31,80 @@ defineProps<{
const isContextMenuHidden = ref(true)
function showContextMenu() {
function toggleContextMenu() {
isContextMenuHidden.value = !isContextMenuHidden.value
}
</script>

<style scoped>
header, .wordmark, nav {
display: flex;
flex-flow: row nowrap;
}
.wordmark, img {
margin-bottom: calc(var(--base-unit));
}
header, img {
border: 0.25rem solid var(--solid-purple);
}
header {
width: 100%;
gap: calc(var(--base-unit)*5);
border-radius: 0 0 var(--base-corner) var(--base-corner);
border-bottom: 0.5rem solid var(--solid-purple);
border-top: 0;
padding: calc(var(--base-unit)*3) calc(var(--base-unit)*6) 0 calc(var(--base-unit)*3);
}
.wordmark > span {
font-family: "JetBrains Mono";
font-size: calc(var(--base-unit)*6);
font-style: normal;
font-weight: 700;
line-height: normal;
color: var(--solid-purple);
text-transform: uppercase;
}
nav {
flex-grow: 1;
align-items: end;
}
.share {
align-self: center;
margin-left: auto;
}
svg {
width: calc(var(--base-unit)*8);
height: calc(var(--base-unit)*8);
}
img {
border-radius: 100%;
width: calc(var(--base-unit)*8);
}
.hidden {
display: none;
}
.menu {
position: absolute;
right: var(--base-unit);
top: calc(var(--base-unit)*14);
min-width: fit-content;
min-height: fit-content;
max-width: 25vw;
max-height: 50vw;
}
header,
.wordmark,
nav {
display: flex;
flex-flow: row nowrap;
}
.wordmark,
img {
margin-bottom: calc(var(--base-unit));
}
header,
img {
border: 0.25rem solid var(--solid-purple);
}
header {
width: 100%;
gap: calc(var(--base-unit)*5);
border-radius: 0 0 var(--base-corner) var(--base-corner);
border-bottom: 0.5rem solid var(--solid-purple);
border-top: 0;
padding: calc(var(--base-unit)*3) calc(var(--base-unit)*6) 0 calc(var(--base-unit)*3);
}
.wordmark>span {
font-family: "JetBrains Mono";
font-size: calc(var(--base-unit)*6);
font-style: normal;
font-weight: 700;
line-height: normal;
color: var(--solid-purple);
text-transform: uppercase;
}
nav {
flex-grow: 1;
align-items: end;
}
.share {
align-self: center;
margin-left: auto;
}
svg {
width: calc(var(--base-unit)*8);
height: calc(var(--base-unit)*8);
}
img {
border-radius: 100%;
width: calc(var(--base-unit)*8);
}
.hidden {
display: none;
}
.menu {
position: absolute;
right: var(--base-unit);
top: calc(var(--base-unit)*14);
min-width: fit-content;
min-height: fit-content;
max-width: 25vw;
max-height: 50vw;
}
</style>
2 changes: 0 additions & 2 deletions loama/src/router/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,8 @@ const router = createRouter({
})

router.beforeEach(async (to) => {
console.log(store.session.info)
if (!store.session.info.isLoggedIn) {
await store.session.handleIncomingRedirect();
console.log(store.session.info)
if(store.session.info.isLoggedIn){
store.setUsedPod((await listPods(store.session as Session))[0])
}
Expand Down

0 comments on commit 6e5827c

Please sign in to comment.