Skip to content
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

minor cleanup in prep for consolidation across projects #4

Merged
merged 3 commits into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
2 changes: 1 addition & 1 deletion nuxt.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export default defineNuxtConfig({
registryHomeURL: process.env.VUE_APP_REGISTRY_HOME_URL || '',
appEnv: `${process.env.VUE_APP_POD_NAMESPACE || 'unknown'}`,
requireLogin: true,
version: process.env.npm_package_version || '',
version: `BCROS Business Dashboard UI v${process.env.npm_package_version || ''}`,
kialj876 marked this conversation as resolved.
Show resolved Hide resolved
appName: process.env.npm_package_name || ''
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/router.options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default <RouterConfig> {
path: '/:identifier',
component: () => import('~/pages/dashboard.vue').then(r => r.default || r),
meta: {
layout: 'default',
layout: 'business',
title: 'Business Dashboard',
breadcrumbs: [getBcrosHomeCrumb, getRegistryDashCrumb, getBusinessDashCrumb]
}
Expand Down
6 changes: 5 additions & 1 deletion src/assets/styles/layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,10 @@
@apply bg-gray-100 text-gray-700 min-h-[100vh] flex flex-col;
}

.app-inner-container {
@apply max-w-[1360px] w-[100vw] mx-auto px-4;
}

.app-body {
@apply grow relative max-w-[1360px] w-[100vw] mx-auto my-0 px-4 py-0;
@apply grow relative;
}
2 changes: 1 addition & 1 deletion src/components/bcros/Breadcrumb.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div class="bg-blue-350" data-cy="bcros-breadcrumb">
<div class="flex flex-wrap divide-x divide-white mx-auto py-[7px] px-4 h-[45px] w-full max-w-[1360px] text-white">
<div class="flex flex-wrap divide-x divide-white py-[7px] h-[45px] text-white app-inner-container">
<UButton
class="mr-3 mt-[1px] px-1 h-[28px] w-[28px] rounded-full"
color="white"
Expand Down
2 changes: 1 addition & 1 deletion src/components/bcros/BusinessDetails.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div id="bcros-business-details" class="bg-white h-[150px]" data-cy="business-details">
<div class="grid grid-cols-2 m-auto px-4 pt-5 w-full max-w-[1360px] text-bcGovGray-900">
<div class="grid grid-cols-2 pt-5 text-bcGovGray-900 app-inner-container">
<div class="col-auto" data-cy="business-details-name">
<h2 class="font-bold text-xl">
{{ currentBusinessName }}
Expand Down
2 changes: 1 addition & 1 deletion src/components/bcros/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
class="flex items-center h-[56px] border-t-2 border-yellow-400 bg-bcGovColor-darkBlue text-sm"
data-cy="bcros-footer"
>
<div class="m-auto px-4 h-[30.5px] w-full max-w-[1360px]">
<div class="h-[30.5px] w-full app-inner-container">
<nav class="flex flex-grow">
<ul class="p-0 -ml-2 list-none">
<li v-for="link in links" :key="link.text" class="inline-block mr-2 pr-2 border-r last:mr-0 last:border-r-0">
Expand Down
2 changes: 1 addition & 1 deletion src/components/bcros/header/Index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
>
<div
id="bcros-main-header__container"
class="flex flex-wrap content-center m-auto px-4 h-[68px] w-full max-w-[1360px]"
class="flex flex-wrap content-center h-[68px] app-inner-container"
>
<nav id="bcros-main-header__container__actions" class="flex flex-wrap content-center h-[50px] w-full">
<a id="bcros-main-header__container__actions__home-redirect" class="flex" @click="goToBcrosHome()">
Expand Down
32 changes: 32 additions & 0 deletions src/layouts/business.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<template>
<div class="app-container" data-cy="default-layout">
<bcros-header />
<bcros-system-banner
class="justify-center"
:message="systemMessage"
/>
<bcros-breadcrumb v-if="crumbConstructors.length > 0" :crumb-constructors="crumbConstructors" />
<bcros-business-details />
<div class="app-inner-container app-body">
<slot />
</div>
<bcros-footer :about-text="version" />
</div>
</template>

<script setup lang="ts">
const route = useRoute()
const crumbConstructors = computed(() => (route?.meta?.breadcrumbs || []) as (() => BreadcrumbI)[])

const systemMessage = ref('')
onMounted(async () => {
await useBcrosLaunchdarkly().ldClient.waitUntilReady()
systemMessage.value = useBcrosLaunchdarkly().getStoredFlag('banner-text')
})

const version = useRuntimeConfig().public.version
</script>

<style scoped>

</style>
5 changes: 2 additions & 3 deletions src/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@
:message="systemMessage"
/>
<bcros-breadcrumb v-if="crumbConstructors.length > 0" :crumb-constructors="crumbConstructors" />
<bcros-business-details />
<div class="app-body">
<div class="app-inner-container app-body">
<slot />
</div>
<bcros-footer :about-text="'BCROS Business Dashboard UI v' + version" />
<bcros-footer :about-text="version" />
</div>
</template>

Expand Down
Loading