Files
privacy.sexy/src/presentation/components/App.vue
undergroundwires 2147eae687 Add developer toolkit UI component
The commit adds a new a UI component that's enabled in development mode.
This component, initially, provides a button that wen clicked, logs all
the script and category names to the console. It helps revising names
used throughout the application.

By having this component in a conditionally rendered component, it's
excluded from the production builds.
2023-10-07 15:14:53 +02:00

69 lines
1.9 KiB
Vue

<template>
<div id="app">
<div class="app__wrapper">
<TheHeader class="app__row" />
<TheSearchBar class="app__row" />
<TheScriptArea class="app__row" />
<TheCodeButtons class="app__row app__code-buttons" />
<TheFooter />
</div>
<OptionalDevToolkit />
</div>
</template>
<script lang="ts">
import { defineAsyncComponent, defineComponent } from 'vue';
import TheHeader from '@/presentation/components/TheHeader.vue';
import TheFooter from '@/presentation/components/TheFooter/TheFooter.vue';
import TheCodeButtons from '@/presentation/components/Code/CodeButtons/TheCodeButtons.vue';
import TheScriptArea from '@/presentation/components/Scripts/TheScriptArea.vue';
import TheSearchBar from '@/presentation/components/TheSearchBar.vue';
import { buildContext } from '@/application/Context/ApplicationContextFactory';
import { provideDependencies } from '../bootstrapping/DependencyProvider';
const singletonAppContext = await buildContext();
const OptionalDevToolkit = process.env.NODE_ENV !== 'production'
? defineAsyncComponent(() => import('@/presentation/components/DevToolkit/DevToolkit.vue'))
: null;
export default defineComponent({
components: {
TheHeader,
TheCodeButtons,
TheScriptArea,
TheSearchBar,
TheFooter,
OptionalDevToolkit,
},
setup() {
provideDependencies(singletonAppContext); // In Vue 3.0 we can move it to main.ts
},
});
</script>
<style lang="scss">
@use "@/presentation/assets/styles/main" as *;
#app {
margin-right: auto;
margin-left: auto;
max-width: 1600px;
.app__wrapper {
margin: 0% 2% 0% 2%;
background-color: $color-surface;
color: $color-on-surface;
box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.06);
padding: 2%;
display:flex;
flex-direction: column;
.app__row {
margin-bottom: 10px;
}
.app__code-buttons {
padding-bottom: 10px;
}
}
}
</style>