Skip to content

Remove auth options #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 11 additions & 5 deletions web/site/components/Sbc/Header/Main.vue
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
<script setup lang="ts">
const { mainLinks, openMobileNav, loggedInUserOptions, loggedOutUserOptions } = useSbcNav()
const {
mainLinks,
openMobileNav
// loggedInUserOptions, leaving out auth options for now
// loggedOutUserOptions
} = useSbcNav()
// const { t } = useI18n()
const localePath = useLocalePath()
// const localePath = useLocalePath()
const headerRef = ref<HTMLElement | null>(null)
const user = useCurrentUser()
// const user = useCurrentUser()
// expose template ref to access properties in parent
defineExpose({
headerRef
Expand Down Expand Up @@ -43,7 +48,8 @@ defineExpose({
<div class="flex gap-1">
<ColorModeSelect />
<LocaleSelect />
<UDropdown
<!-- leaving out auth options for now -->
<!-- <UDropdown
v-if="!user"
class="lg:hidden"
:items="loggedOutUserOptions"
Expand Down Expand Up @@ -101,7 +107,7 @@ defineExpose({
account-name=""
/>
</template>
</UDropdown>
</UDropdown> -->
<UButton
class="lg:hidden"
icon="i-mdi-menu"
Expand Down
15 changes: 11 additions & 4 deletions web/site/components/Sbc/MobileNav.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,15 @@
defineProps<{
accordianNavItems?: AccordianNavItem[] | undefined
}>()
const user = useCurrentUser()
// const user = useCurrentUser()
const { currentDir, tocLinks } = useDocPageData()
const { mainLinks, mobileNavRef, loggedInUserOptions, loggedOutUserOptions, closeMobileNav } = useSbcNav()
const {
mainLinks,
mobileNavRef,
// loggedInUserOptions, leave out auth options for now
// loggedOutUserOptions,
closeMobileNav
} = useSbcNav()
</script>
<template>
<UModal
Expand Down Expand Up @@ -48,7 +54,8 @@ const { mainLinks, mobileNavRef, loggedInUserOptions, loggedOutUserOptions, clos
<div class="flex gap-1">
<ColorModeSelect />
<LocaleSelect />
<UDropdown
<!-- leave out auth options for now -->
<!-- <UDropdown
v-if="!user"
:items="loggedOutUserOptions"
>
Expand Down Expand Up @@ -89,7 +96,7 @@ const { mainLinks, mobileNavRef, loggedInUserOptions, loggedOutUserOptions, clos
account-name=""
/>
</template>
</UDropdown>
</UDropdown> -->
<UButton
icon="i-mdi-window-close"
color="white"
Expand Down
11 changes: 6 additions & 5 deletions web/site/composables/sbcNav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,12 @@ export function useSbcNav () {
label: t('btn.products'),
to: localePath('/products')
},
{
icon: 'i-mdi-account',
label: t('btn.dashboard'),
to: localePath('/sbc/dashboard')
},
// exclude dashboard link for now
// {
// icon: 'i-mdi-account',
// label: t('btn.dashboard'),
// to: localePath('/sbc/dashboard')
// },
{
icon: 'i-mdi-book-open-variant',
label: 'Docs',
Expand Down
23 changes: 17 additions & 6 deletions web/site/nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,27 @@ export default defineNuxtConfig({
devtools: { enabled: false },
ssr: true,
nitro: {
routeRules: {
'/en-CA/sbc/**': { redirect: '/en-CA' }
},
prerender: {
routes: [
// '/en-CA/sbc/tos'
routes: [],
ignore: [
'/en-CA/sbc/dashboard',
'/en-CA/sbc/tos',
'/en-CA/sbc/auth/login',
'/en-CA/sbc/auth/logout'
]
}
},
routeRules: {
'/': { redirect: '/en-CA' }
},
modules: ['@nuxtjs/eslint-module', '@nuxt/test-utils/module', 'nuxt-vuefire'],
extends: ['@daxiom/sbc-nuxt-assets-layer'],
imports: {
dirs: ['stores', 'composables', 'enums', 'interfaces', 'types', 'utils']
},
routeRules: {
'/': { redirect: '/en-CA' }
},
i18n: {
locales: [
{
Expand Down Expand Up @@ -52,7 +59,11 @@ export default defineNuxtConfig({
default: 'github-light',
dark: 'github-dark'
}
}
},
ignores: [
'web-component',
'/sbc/tos'
]
},
colorMode: {
preference: 'light',
Expand Down
1 change: 1 addition & 0 deletions web/site/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"name": "sbc-apigw-site",
"private": true,
"type": "module",
"version": "0.1.0",
"scripts": {
"build-check": "nuxt build",
"build": "nuxt generate",
Expand Down
Loading