diff --git a/packages/frontend/src/components/MkEmojiPicker.vue b/packages/frontend/src/components/MkEmojiPicker.vue
index c94da9774..fe098c9de 100644
--- a/packages/frontend/src/components/MkEmojiPicker.vue
+++ b/packages/frontend/src/components/MkEmojiPicker.vue
@@ -12,7 +12,7 @@
tabindex="0"
@click="chosen(emoji, $event)"
>
-
+
@@ -81,7 +81,7 @@ import { ref, computed, watch, onMounted } from 'vue';
import * as Misskey from 'misskey-js';
import XSection from '@/components/MkEmojiPicker.section.vue';
import { emojilist, UnicodeEmojiDef, unicodeEmojiCategories as categories } from '@/scripts/emojilist';
-import Ripple from '@/components/MkRipple.vue';
+import MkRippleEffect from '@/components/MkRippleEffect.vue';
import * as os from '@/os';
import { isTouchUsing } from '@/scripts/touch';
import { deviceKind } from '@/scripts/device-kind';
@@ -288,7 +288,7 @@ function chosen(emoji: any, ev?: MouseEvent) {
const rect = el.getBoundingClientRect();
const x = rect.left + (el.offsetWidth / 2);
const y = rect.top + (el.offsetHeight / 2);
- os.popup(Ripple, { x, y }, {}, 'end');
+ os.popup(MkRippleEffect, { x, y }, {}, 'end');
}
const key = getKey(emoji);
diff --git a/packages/frontend/src/components/MkPlusOneEffect.vue b/packages/frontend/src/components/MkPlusOneEffect.vue
new file mode 100644
index 000000000..a0bb22db9
--- /dev/null
+++ b/packages/frontend/src/components/MkPlusOneEffect.vue
@@ -0,0 +1,66 @@
+
+
+ +1
+
+
+
+
+
+
diff --git a/packages/frontend/src/components/MkPostForm.vue b/packages/frontend/src/components/MkPostForm.vue
index b8784620c..5088de735 100644
--- a/packages/frontend/src/components/MkPostForm.vue
+++ b/packages/frontend/src/components/MkPostForm.vue
@@ -97,7 +97,7 @@ import { instance } from '@/instance';
import { $i, getAccounts, openAccountMenu as openAccountMenu_ } from '@/account';
import { uploadFile } from '@/scripts/upload';
import { deepClone } from '@/scripts/clone';
-import Ripple from '@/components/MkRipple.vue';
+import MkRippleEffect from '@/components/MkRippleEffect.vue';
const modal = inject('modal');
@@ -575,7 +575,7 @@ async function post(ev?: MouseEvent) {
const rect = el.getBoundingClientRect();
const x = rect.left + (el.offsetWidth / 2);
const y = rect.top + (el.offsetHeight / 2);
- os.popup(Ripple, { x, y }, {}, 'end');
+ os.popup(MkRippleEffect, { x, y }, {}, 'end');
}
let postData = {
diff --git a/packages/frontend/src/components/MkReactionsViewer.reaction.vue b/packages/frontend/src/components/MkReactionsViewer.reaction.vue
index f3c77231d..b10c7009f 100644
--- a/packages/frontend/src/components/MkReactionsViewer.reaction.vue
+++ b/packages/frontend/src/components/MkReactionsViewer.reaction.vue
@@ -19,6 +19,7 @@ import XReactionIcon from '@/components/MkReactionIcon.vue';
import * as os from '@/os';
import { useTooltip } from '@/scripts/use-tooltip';
import { $i } from '@/account';
+import MkPlusOneEffect from '@/components/MkPlusOneEffect.vue';
const props = defineProps<{
reaction: string;
@@ -57,7 +58,10 @@ const toggleReaction = () => {
const anime = () => {
if (document.hidden) return;
- // TODO: 新しくリアクションが付いたことが視覚的に分かりやすいアニメーション
+ const rect = buttonRef.value.getBoundingClientRect();
+ const x = rect.left + (buttonRef.value.offsetWidth / 2);
+ const y = rect.top + (buttonRef.value.offsetHeight / 2);
+ os.popup(MkPlusOneEffect, { x, y }, {}, 'end');
};
watch(() => props.count, (newCount, oldCount) => {
diff --git a/packages/frontend/src/components/MkRipple.vue b/packages/frontend/src/components/MkRippleEffect.vue
similarity index 100%
rename from packages/frontend/src/components/MkRipple.vue
rename to packages/frontend/src/components/MkRippleEffect.vue
diff --git a/packages/frontend/src/components/form/checkbox.vue b/packages/frontend/src/components/form/checkbox.vue
index ba3b2dc14..d869b600c 100644
--- a/packages/frontend/src/components/form/checkbox.vue
+++ b/packages/frontend/src/components/form/checkbox.vue
@@ -23,7 +23,7 @@
diff --git a/packages/frontend/src/directives/ripple.ts b/packages/frontend/src/directives/ripple.ts
index d32f7ab44..561177734 100644
--- a/packages/frontend/src/directives/ripple.ts
+++ b/packages/frontend/src/directives/ripple.ts
@@ -1,4 +1,4 @@
-import Ripple from '@/components/MkRipple.vue';
+import MkRippleEffect from '@/components/MkRippleEffect.vue';
import { popup } from '@/os';
export default {
@@ -12,7 +12,7 @@ export default {
const x = rect.left + (el.offsetWidth / 2);
const y = rect.top + (el.offsetHeight / 2);
- popup(Ripple, { x, y }, {}, 'end');
+ popup(MkRippleEffect, { x, y }, {}, 'end');
});
},
};