From c2e57cf51a57349095d1eae49775b2b837be52d9 Mon Sep 17 00:00:00 2001 From: m1k1o Date: Sat, 13 Feb 2021 12:05:59 +0100 Subject: [PATCH] fix client linter --- client/src/components/avatar.vue | 42 ++++++++++++++++++-------------- client/src/components/video.vue | 20 ++++++++------- 2 files changed, 35 insertions(+), 27 deletions(-) diff --git a/client/src/components/avatar.vue b/client/src/components/avatar.vue index 9116bfa..abe7c11 100644 --- a/client/src/components/avatar.vue +++ b/client/src/components/avatar.vue @@ -2,13 +2,16 @@ -
+
{{ seed.substring(0, 2).toUpperCase() }}
@@ -32,21 +35,24 @@ name: 'neko-avatar', }) export default class extends Vue { - @Prop(String) readonly seed: string | undefined; - @Prop(Number) readonly size: number | undefined; + @Prop(String) readonly seed: string | undefined + @Prop(Number) readonly size: number | undefined Background(seed: string) { - let a = 0, b = 0, c = 0; - for(let i = 0; i < seed.length; i++) { - a += seed.charCodeAt(i) * 3; - b += seed.charCodeAt(i) * 5; - c += seed.charCodeAt(i) * 7; + let a = 0, + b = 0, + c = 0 + + for (let i = 0; i < seed.length; i++) { + a += seed.charCodeAt(i) * 3 + b += seed.charCodeAt(i) * 5 + c += seed.charCodeAt(i) * 7 } - let x = Math.floor(128 + (a % 128)); - let y = Math.floor(128 + (b % 128)); - let z = Math.floor(128 + (c % 128)); - return "rgb(" + x + "," + y + "," + z + ")"; + let x = Math.floor(128 + (a % 128)) + let y = Math.floor(128 + (b % 128)) + let z = Math.floor(128 + (c % 128)) + return 'rgb(' + x + ',' + y + ',' + z + ')' } } diff --git a/client/src/components/video.vue b/client/src/components/video.vue index 17ad2e2..3188844 100644 --- a/client/src/components/video.vue +++ b/client/src/components/video.vue @@ -37,7 +37,9 @@