Fix eslint warnings

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel
2020-11-27 19:27:44 +01:00
parent 487ac56b4c
commit da42522073
130 changed files with 702 additions and 734 deletions

View File

@@ -9,7 +9,7 @@
import { Component, Vue, Watch } from "vue-property-decorator";
import { PRIVACY } from "@/graphql/config";
import { IConfig } from "@/types/config.model";
import { InstancePrivacyType } from "@/types/admin.model";
import { InstancePrivacyType } from "@/types/enums";
@Component({
apollo: {
@@ -31,19 +31,18 @@ export default class Privacy extends Vue {
locale: string | null = null;
created() {
created(): void {
this.locale = this.$i18n.locale;
}
@Watch("config", { deep: true })
watchConfig(config: IConfig) {
watchConfig(config: IConfig): void {
if (config.privacy.type) {
console.log(this.config.privacy);
this.redirectToUrl();
}
}
redirectToUrl() {
redirectToUrl(): void {
if (this.config.privacy.type === InstancePrivacyType.URL) {
window.location.replace(this.config.privacy.url);
}

View File

@@ -7,10 +7,9 @@
</template>
<script lang="ts">
import { Component, Vue, Watch } from "vue-property-decorator";
import { Component, Vue } from "vue-property-decorator";
import { RULES } from "@/graphql/config";
import { IConfig } from "@/types/config.model";
import { InstanceTermsType } from "@/types/admin.model";
import RouteName from "../../router/name";
@Component({

View File

@@ -9,7 +9,7 @@
import { Component, Vue, Watch } from "vue-property-decorator";
import { TERMS } from "@/graphql/config";
import { IConfig } from "@/types/config.model";
import { InstanceTermsType } from "@/types/admin.model";
import { InstanceTermsType } from "@/types/enums";
@Component({
apollo: {
@@ -31,19 +31,18 @@ export default class Terms extends Vue {
locale: string | null = null;
created() {
created(): void {
this.locale = this.$i18n.locale;
}
@Watch("config", { deep: true })
watchConfig(config: IConfig) {
watchConfig(config: IConfig): void {
if (config.terms.type) {
console.log(this.config.terms);
this.redirectToUrl();
}
}
redirectToUrl() {
redirectToUrl(): void {
if (this.config.terms.type === InstanceTermsType.URL) {
window.location.replace(this.config.terms.url);
}