From 786b150ea75111b5f6102c256d5cfa42cb83d1fb Mon Sep 17 00:00:00 2001
From: syuilo <Syuilotan@yahoo.co.jp>
Date: Wed, 31 Aug 2022 00:24:33 +0900
Subject: refactor(client): align filename to component name

---
 .../client/src/components/img-with-blurhash.vue    | 76 ----------------------
 1 file changed, 76 deletions(-)
 delete mode 100644 packages/client/src/components/img-with-blurhash.vue

(limited to 'packages/client/src/components/img-with-blurhash.vue')

diff --git a/packages/client/src/components/img-with-blurhash.vue b/packages/client/src/components/img-with-blurhash.vue
deleted file mode 100644
index 80d7c201a4..0000000000
--- a/packages/client/src/components/img-with-blurhash.vue
+++ /dev/null
@@ -1,76 +0,0 @@
-<template>
-<div class="xubzgfgb" :class="{ cover }" :title="title">
-	<canvas v-if="!loaded" ref="canvas" :width="size" :height="size" :title="title"/>
-	<img v-if="src" :src="src" :title="title" :alt="alt" @load="onLoad"/>
-</div>
-</template>
-
-<script lang="ts" setup>
-import { onMounted } from 'vue';
-import { decode } from 'blurhash';
-
-const props = withDefaults(defineProps<{
-	src?: string | null;
-	hash?: string;
-	alt?: string;
-	title?: string | null;
-	size?: number;
-	cover?: boolean;
-}>(), {
-	src: null,
-	alt: '',
-	title: null,
-	size: 64,
-	cover: true,
-});
-
-const canvas = $ref<HTMLCanvasElement>();
-let loaded = $ref(false);
-
-function draw() {
-	if (props.hash == null) return;
-	const pixels = decode(props.hash, props.size, props.size);
-	const ctx = canvas.getContext('2d');
-	const imageData = ctx!.createImageData(props.size, props.size);
-	imageData.data.set(pixels);
-	ctx!.putImageData(imageData, 0, 0);
-}
-
-function onLoad() {
-	loaded = true;
-}
-
-onMounted(() => {
-	draw();
-});
-</script>
-
-<style lang="scss" scoped>
-.xubzgfgb {
-	position: relative;
-	width: 100%;
-	height: 100%;
-
-	> canvas,
-	> img {
-		display: block;
-		width: 100%;
-		height: 100%;
-	}
-
-	> canvas {
-		position: absolute;
-		object-fit: cover;
-	}
-
-	> img {
-		object-fit: contain;
-	}
-
-	&.cover {
-		> img {
-			object-fit: cover;
-		}
-	}
-}
-</style>
-- 
cgit v1.3.1-freya

