Skip to content

Commit

Permalink
Consolidate banner boolean to one place
Browse files Browse the repository at this point in the history
  • Loading branch information
naglepuff committed Oct 17, 2024
1 parent e81b583 commit 0bdfbf6
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 13 deletions.
12 changes: 12 additions & 0 deletions web/src/components/AppBanner.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
<script lang="ts">
import { defineComponent, ref } from '@vue/composition-api';
export default defineComponent({
setup() {
const showAppBanner = ref(true);
return { showAppBanner };
},
});
</script>

<template>
<v-banner
v-if="showAppBanner"
color="blue"
dark
icon="mdi-information"
Expand Down
5 changes: 4 additions & 1 deletion web/src/store/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Vue from 'vue';
import CompositionApi, {
computed, ComputedRef, reactive, toRefs, watchEffect,
computed, ComputedRef, ref, reactive, toRefs, watchEffect,
} from '@vue/composition-api';
import { noop, uniqWith } from 'lodash';
import VueRouter from 'vue-router';
Expand Down Expand Up @@ -200,10 +200,13 @@ function acceptTerms() {

const stateRefs = toRefs(state);

const showAppBanner = ref(true);

export {
stateRefs,
dataObjectFilter,
unreactive,
showAppBanner,
acceptTerms,
getTreeData,
init,
Expand Down
3 changes: 1 addition & 2 deletions web/src/views/IndividualResults/SamplePage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ export default defineComponent({

<template>
<v-main v-if="result.id">
<!-- TODO: Reference a boolean variable defined elsewhere (TBD). -->
<AppBanner v-if="true" />
<AppBanner />
<v-container fluid>
<IndividualTitle :item="result" />
<AttributeList
Expand Down
3 changes: 1 addition & 2 deletions web/src/views/IndividualResults/StudyPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,7 @@ export default defineComponent({
<template>
<v-container fluid>
<v-main v-if="item !== null">
<!-- TODO: Reference a boolean variable defined elsewhere (TBD). -->
<AppBanner v-if="true" />
<AppBanner />
<v-row :class="{'flex-column': $vuetify.breakpoint.xs}">
<v-col
cols="12"
Expand Down
3 changes: 1 addition & 2 deletions web/src/views/Search/SearchLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,7 @@ export default defineComponent({
background-opacity="0"
style="position: fixed; top: 64; z-index: 2;"
/>
<!-- TODO: Reference a boolean variable defined elsewhere (TBD). -->
<AppBanner v-if="true" />
<AppBanner />
<v-container
fluid
class="py-0"
Expand Down
3 changes: 1 addition & 2 deletions web/src/views/SubmissionPortal/SubmissionView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,7 @@ export default defineComponent({

<template>
<v-main>
<!-- TODO: Reference a boolean variable defined elsewhere (TBD). -->
<AppBanner v-if="true" />
<AppBanner />
<v-container
v-if="!stateRefs.user.value && !req.loading.value"
>
Expand Down
3 changes: 1 addition & 2 deletions web/src/views/User/UserDetailPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,7 @@ export default defineComponent({

<template>
<v-main>
<!-- TODO: Reference a boolean variable defined elsewhere (TBD). -->
<AppBanner v-if="true" />
<AppBanner />
<v-container>
<div v-if="userLoading">
Loading...
Expand Down
3 changes: 1 addition & 2 deletions web/src/views/User/UserPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ export default defineComponent({

<template>
<v-main>
<!-- TODO: Reference a boolean variable defined elsewhere (TBD). -->
<AppBanner v-if="true" />
<AppBanner />
<v-container>
<v-card flat>
<v-card-title class="text-h4">
Expand Down

0 comments on commit 0bdfbf6

Please sign in to comment.