Major refactoring using ESLint with rules from AirBnb and Vue. Enable most of the ESLint rules and do necessary linting in the code. Also add more information for rules that are disabled to describe what they are and why they are disabled. Allow logging (`console.log`) in test files, and in development mode (e.g. when working with `npm run serve`), but disable it when environment is production (as pre-configured by Vue). Also add flag (`--mode production`) in `lint:eslint` command so production linting is executed earlier in lifecycle. Disable rules that requires a separate work. Such as ESLint rules that are broken in TypeScript: no-useless-constructor (eslint/eslint#14118) and no-shadow (eslint/eslint#13014).
55 lines
1.1 KiB
Vue
55 lines
1.1 KiB
Vue
<template>
|
|
<div id="container">
|
|
<h1 class="child title" >{{ title }}</h1>
|
|
<h2 class="child subtitle">Enforce privacy & security on Windows and macOS</h2>
|
|
</div>
|
|
</template>
|
|
|
|
<script lang="ts">
|
|
import { Component, Vue } from 'vue-property-decorator';
|
|
import { ApplicationFactory } from '@/application/ApplicationFactory';
|
|
|
|
@Component
|
|
export default class TheHeader extends Vue {
|
|
public title = '';
|
|
|
|
public subtitle = '';
|
|
|
|
public async created() {
|
|
const app = await ApplicationFactory.Current.getApp();
|
|
this.title = app.info.name;
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style scoped lang="scss">
|
|
@use "@/presentation/assets/styles/main" as *;
|
|
|
|
#container {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-direction: column;
|
|
|
|
.child {
|
|
display: flex;
|
|
text-align: center;
|
|
}
|
|
|
|
.title {
|
|
margin: 0;
|
|
text-transform: uppercase;
|
|
font-family: $font-main;
|
|
font-size: 2.5em;
|
|
line-height: 1.1;
|
|
}
|
|
.subtitle {
|
|
margin: 0;
|
|
font-size: 1.5em;
|
|
color: $color-primary;
|
|
font-family: $font-artistic;
|
|
font-weight: 500;
|
|
line-height: 1.2;
|
|
}
|
|
}
|
|
</style>
|