summaryrefslogtreecommitdiff
path: root/src/client/widgets/aichan.vue
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/widgets/aichan.vue')
-rw-r--r--src/client/widgets/aichan.vue59
1 files changed, 0 insertions, 59 deletions
diff --git a/src/client/widgets/aichan.vue b/src/client/widgets/aichan.vue
deleted file mode 100644
index 06c49090a1..0000000000
--- a/src/client/widgets/aichan.vue
+++ /dev/null
@@ -1,59 +0,0 @@
-<template>
-<MkContainer :naked="props.transparent" :show-header="false">
- <iframe class="dedjhjmo" ref="live2d" @click="touched" src="https://misskey-dev.github.io/mascot-web/?scale=1.5&y=1.1&eyeY=100"></iframe>
-</MkContainer>
-</template>
-
-<script lang="ts">
-import { defineComponent, markRaw } from 'vue';
-import define from './define';
-import MkContainer from '@client/components/ui/container.vue';
-import * as os from '@client/os';
-
-const widget = define({
- name: 'ai',
- props: () => ({
- transparent: {
- type: 'boolean',
- default: false,
- },
- })
-});
-
-export default defineComponent({
- extends: widget,
- components: {
- MkContainer,
- },
- data() {
- return {
- };
- },
- mounted() {
- window.addEventListener('mousemove', ev => {
- const iframeRect = this.$refs.live2d.getBoundingClientRect();
- this.$refs.live2d.contentWindow.postMessage({
- type: 'moveCursor',
- body: {
- x: ev.clientX - iframeRect.left,
- y: ev.clientY - iframeRect.top,
- }
- }, '*');
- }, { passive: true });
- },
- methods: {
- touched() {
- //if (this.live2d) this.live2d.changeExpression('gurugurume');
- }
- }
-});
-</script>
-
-<style lang="scss" scoped>
-.dedjhjmo {
- width: 100%;
- height: 350px;
- border: none;
- pointer-events: none;
-}
-</style>